OSDN Git Service

2005-10-22 Erik Edelmann <eedelman@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
1 2005-10-22  Erik Edelmann  <eedelman@gcc.gnu.org>
2
3         PR fortran/24426
4         * decl.c (variable_decl): Don't assign default initializers to
5         pointers.
6
7 2005-10-21  Jakub Jelinek  <jakub@redhat.com>
8
9         * interface.c (compare_actual_formal): Issue error when attempting
10         to pass an assumed-size array as assumed-shape array argument.
11
12 2005-10-20  Erik Edelmann  <erik.edelmann@iki.fi>
13
14         PR fortran/21625
15         * resolve.c (expr_to_initialize): New function.
16         (resolve_allocate_expr): Take current statement as new 
17         argument. Add default initializers to variables of
18         derived types, if they need it.
19         (resolve_code): Provide current statement as argument to
20         resolve_allocate_expr().
21
22 2005-10-19  Paul Thomas  <pault@gcc.gnu.org>
23
24         PR fortran/24440
25         * resolve.c (resolve_symbol): Correct error in check for
26         assumed size array with default initializer by testing
27         for arrayspec before dereferencing it.
28
29 2005-10-17  Paul Thomas  <pault@gcc.gnu.org>
30
31         PR fortran/23446
32         * gfortran.h: Primitive for gfc_is_formal_arg.
33         * resolve.c(gfc_is_formal_arg): New function to signal across
34         several function calls that formal argument lists are being
35         processed.
36         (resolve_formal_arglist): Set/reset the flag for gfc_is_formal_arg.
37         *expr.c(check_restricted): Add check, via gfc_is_formal_arg, if
38         symbol is part of an formal argument declaration.
39
40         PR fortran/21459
41         * decl.c (add_init_expr_to_sym): Make a new character
42         length for each variable, when the expression is NULL
43         and link to cl_list.
44
45         PR fortran/20866
46         * match.c (recursive_stmt_fcn): New function that tests if
47         a statement function resurses through itself or other other
48         statement functions.
49         (gfc_match_st_function): Call recursive_stmt_fcn to check
50         if this is recursive and to raise error if so.
51
52         PR fortran/20849
53         PR fortran/20853
54         * resolve.c (resolve_symbol): Errors for assumed size arrays
55         with default initializer and for external objects with an
56         initializer.
57
58         PR fortran/20837
59         * decl.c (match_attr_spec): Prevent PUBLIC from being used
60         outside a module.
61
62 2005-10-16  Erik Edelmann  <erik.edelmann@iki.fi>
63
64         PR 22273
65         * expr.c (check_inquiry): Add "len" to inquiry_function.
66
67 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
68
69         * primary.c (match_boz_constant): Add missing break after gfc_error.
70
71 2005-10-12  Paul Thomas  <pault@gcc.gnu.org>
72
73         PR fortran/24092
74         * trans-types.c (gfc_get_derived_type): Insert code to obtain backend
75         declaration for derived types, building if necessary.  Return the
76         derived type if the fields have been built by this process.  Otherwise,
77         continue as before but using the already obtained backend_decls for the
78         derived type components.  Change the gcc_assert to act on the field.
79
80 2005-10-12  Paul Thomas  <pault@gcc.gnu.org>
81
82         PR fortran/18082
83         * decl.c (variable_decl): Make a new copy of the character
84         length for each variable, when the expression is not a
85         constant.
86
87 2005-10-12  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
88
89         * gfortran.h: Add bitmasks for different FPE traps. Add fpe
90         member to options_t.
91         * invoke.texi: Document the new -ffpe-trap option.
92         * lang.opt: Add -ffpe-trap option.
93         * options.c (gfc_init_options): Initialize the FPE option.
94         (gfc_handle_fpe_trap_option): New function to parse the argument
95         of the -ffpe-trap option.
96         (gfc_handle_option): Add case for -ffpe-trap.
97         * trans-decl.c: Declare a tree for the set_fpe library function.
98         (gfc_build_builtin_function_decls): Build this tree.
99         (gfc_generate_function_code): Generate a call to set_fpe at
100         the beginning of the main program.
101         * trans.h: New tree for the set_fpe library function.
102
103 2005-10-12  Paul Thomas  <pault@gcc.gnu.org>
104
105         PR fortran/20847
106         PR fortran/20856
107         * symbol.c (check_conflict): Prevent common variables and
108         function results from having the SAVE attribute,as required
109         by the standard.
110
111 2005-10-12  Paul Thomas  <pault@gcc.gnu.org>
112
113         PR fortran/24207
114         * resolve.c (resolve_symbol): Exclude use and host associated
115         symbols from the test for private objects in a public namelist.
116
117 2005-10-12  Jakub Jelinek  <jakub@redhat.com>
118
119         * trans-common.c (build_field): Fix comment typo.
120         (create_common): Set backend_decl of COMMON or EQUIVALENCEd
121         variables to a VAR_DECL with the COMPONENT_REF in
122         DECL_HAS_VALUE_EXPR rather than COMPONENT_REF directly.
123         * f95-lang.c (gfc_expand_function): Emit debug info for
124         EQUIVALENCEd variables if the equiv union is going to be output.
125
126 2005-10-11  Steven G. Kargl  <kargls@comcast.net>
127
128         PR fortran/20786
129         * iresolve.c (gfc_resolve_aint, gfc_resolve_anint): Type conversion
130         of the argument.
131
132 2005-10-11  Jakub Jelinek  <jakub@redhat.com>
133
134         * f95-lang.c (gfc_init_decl_processing): Initialize
135         void_list_node.
136
137 2005-10-07  Erik Edelmann  <erik.edelmann@iki.fi>
138
139         PR 18568
140         * resolve.c (find_array_spec): Search through the list of
141         components in the symbol of the type instead of the symbol of the
142         variable.
143
144 2005-10-05  Richard Guenther  <rguenther@suse.de>
145
146         PR fortran/24176
147         * parse.c (gfc_parse_file): Exit early for empty files.
148
149 2005-10-03  Steve Ellcey  <sje@cup.hp.com>
150
151         * fortran/trans-types.c (gfc_init_kinds): Only pass float, double,
152         and long double floating point types through to Fortran compiler.
153
154 2005-10-03  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
155
156         PR fortran/20120
157         * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Add support for long
158         double builtin function.
159         (gfc_init_builtin_functions): Add mfunc_longdouble,
160         mfunc_clongdouble and func_clongdouble_longdouble trees. Build
161         them for round, trunc, cabs, copysign and pow functions.
162         * iresolve.c (gfc_resolve_reshape, gfc_resolve_transpose): Add
163         case for kind 10 and 16.
164         * trans-decl.c: Add trees for cpowl10, cpowl16, ishftc16,
165         exponent10 and exponent16.
166         (gfc_build_intrinsic_function_decls): Build nodes for int16,
167         real10, real16, complex10 and complex16 types. Build all possible
168         combinations for function _gfortran_pow_?n_?n. Build function
169         calls cpowl10, cpowl16, ishftc16, exponent10 and exponent16.
170         * trans-expr.c (gfc_conv_power_op): Add case for integer(16),
171         real(10) and real(16).
172         * trans-intrinsic.c: Add suppport for long double builtin
173         functions in BUILT_IN_FUNCTION, LIBM_FUNCTION and LIBF_FUNCTION
174         macros.
175         (gfc_conv_intrinsic_aint): Add case for integer(16), real(10) and
176         real(16) kinds.
177         (gfc_build_intrinsic_lib_fndecls): Add support for real10_decl
178         and real16_decl in library functions.
179         (gfc_get_intrinsic_lib_fndecl): Add cases for real and complex
180         kinds 10 and 16.
181         (gfc_conv_intrinsic_exponent): Add cases for real(10) and real(16)
182         kinds.
183         (gfc_conv_intrinsic_sign): Likewise.
184         (gfc_conv_intrinsic_ishftc): Add case for integer(16) kind.
185         * trans-types.c (gfc_get_int_type, gfc_get_real_type,
186         gfc_get_complex_type, gfc_get_logical_type): Doesn't error out in
187         the case of kinds not available.
188         * trans.h: Declare trees for cpowl10, cpowl16, ishftc16,
189         exponent10 and exponent16.
190
191 2005-10-01  Paul Thomas  <pault@gcc.gnu.org>
192
193         PR fortran/16404
194         PR fortran/20835
195         PR fortran/20890
196         PR fortran/20899
197         PR fortran/20900
198         PR fortran/20901
199         PR fortran/20902
200         * gfortran.h: Prototype for gfc_add_in_equivalence.
201         * match.c (gfc_match_equivalence): Make a structure component
202         an explicit,rather than a syntax, error in an equivalence
203         group.  Call gfc_add_in_equivalence to add the constraints
204         imposed in check_conflict.
205         * resolve.c (resolve_symbol): Add constraints: No public
206         structures with private-type components and no public
207         procedures with private-type dummy arguments.
208         (resolve_equivalence_derived): Add constraint that prevents
209         a structure equivalence member from having a default
210         initializer.
211         (sequence_type): New static function to determine whether an
212         object is default numeric, default character, non-default
213         or mixed sequence. Add corresponding enum typespec.
214         (resolve_equivalence): Add constraints to equivalence groups
215         or their members: No more than one initialized member and
216         that different types are not equivalenced for std=f95.  All
217         the simple constraints have been moved to check_conflict.
218         * symbol.c (check_conflict): Simple equivalence constraints
219         added, including those removed from resolve_symbol.
220         (gfc_add_in_equivalence): New function to interface calls
221         match_equivalence to check_conflict.
222
223 2005-09-27  Jakub Jelinek  <jakub@redhat.com>
224
225         PR fortran/18518
226         * trans-common.c (build_equiv_decl): Add IS_SAVED argument.
227         If it is true, set TREE_STATIC on the decl.
228         (create_common): If any symbol in equivalence has SAVE attribute,
229         pass true as last argument to build_equiv_decl.
230
231 2005-09-24  Janne Blomqvist  <jblomqvi@cc.hut.fi>
232
233         * trans-io.c (gfc_build_io_library_fndecls): Add entry
234         iocall_x_array for transfer_array.
235         (transfer_array_desc): New function.
236         (gfc_trans_transfer): Add code to call transfer_array_desc.
237
238 2005-09-26  Jakub Jelinek  <jakub@redhat.com>
239
240         PR fortran/23677
241         * symbol.c (gfc_is_var_automatic): Return true if character length
242         is non-constant rather than constant.
243         * resolve.c (gfc_resolve): Don't handle !gfc_option.flag_automatic
244         here.
245         * options.c (gfc_post_options): Set gfc_option.flag_max_stack_var_size
246         to 0 for -fno-automatic.
247
248 2005-09-23  Paul Thomas  <pault@gcc.gnu.org>
249
250         PR fortran/16861
251         * module.c (mio_component_ref): Return if the symbol is NULL
252         and wait for another iteration during module reads.
253         (mio_symtree_ref): Suppress the writing of contained symbols,
254         when a symbol is available in the main namespace.
255         (read_module): Restrict scope of special treatment of contained
256         symbols to variables only and suppress redundant call to
257         find_true_name.
258
259 2005-09-22  Steven G. Kargl  <kargls@comcast.net>
260
261         PR fortran/24005
262         * interface.c (check_interface1): Fix NULL dereference.
263
264 2005-09-22  Erik Edelmann  <erik.edelmann@iki.fi>
265
266         PR fortran/23843
267         * resolve.c (derived_inaccessible): New function.
268         (resolve_transfer): Use it to check for private
269         components.
270
271 2005-09-22  Steven G. Kargl  <kargls@comcast.net>
272
273         PR fortran/23516
274         * intrinsic.c (add_function): Add IMAG, IMAGPART, and REALPART
275         intrinsics.
276         * intrinsic.h: Prototypes for gfc_simplify_realpart and
277         gfc_resolve_realpart.
278         * intrinsic.texi: Document intrinsic procedures.
279         * simplify.c (gfc_simplify_realpart): New function.
280         * irseolve.c (gfc_resolve_realpart): New function.
281
282 2005-09-21  Erik Edelmann  <erik.edelmann@iki.fi>
283
284         PR fortran/19929
285         * trans-stmt.c (gfc_trans_deallocate): Check if the 
286         object to be deallocated is an array by looking at 
287         expr->rank instead of expr->symtree->n.sym->attr.dimension.
288
289 2005-09-20  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
290
291         PR fortran/23420
292         * io.c (resolve_tag): Don't allow non-CHARACTER constants as formats.
293         (match_io): Fix usage of gfc_find_symbol.
294
295 2005-09-20  Jakub Jelinek  <jakub@redhat.com>
296
297         PR fortran/23663
298         * primary.c (match_actual_arg): Handle ENTRY the same way
299         as FUNCTION.
300
301 2005-09-18  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
302
303         * Make-lang.in: Make check-fortran alias for check-gfortran.
304
305 2005-09-18  Andreas Jaeger  <aj@suse.de>
306
307         * module.c (read_module): Add missed line from last patch.
308
309 2005-09-18  Erik Edelmann  <erik.edelmann@iki.fi>
310
311         PR fortran/15975
312         * resolve.c (resolve_symbol): Don't assign default
313         initializer to pointers.
314
315 2005-09-18  Paul Thomas  <pault@gcc.gnu.org>
316
317         PR fortran/16861
318         * module.c (read_module): Give symbols from module procedures
319         different true_name entries to those from the module proper.
320
321 2005-09-17  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
322
323         PR fortran/15586
324         * arith.c (gfc_arith_error): Add translation support for error
325         messages.
326         * array.c (gfc_match_array_ref): Likewise.
327         (gfc_match_array_spec): Likewise.
328         * check.c (must_be): Add msgid convention to third argument.
329         (same_type_check): Add translation support for error message.
330         (rank_check): Likewise.
331         (kind_value_check): Likewise.
332         (gfc_check_associated): Correct typo.
333         (gfc_check_reshape): Add translation support for error message.
334         (gfc_check_spread): Likewise.
335         * error.c (error_printf): Add nocmsgid convention to argument.
336         (gfc_warning, gfc_notify_std, gfc_warning_now, gfc_warning_check)
337         (gfc_error, gfc_error_now): Likewise.
338         (gfc_status): Add cmsgid convention to argument.
339         * expr.c (gfc_extract_int): Add translation support for error
340         messages.
341         (gfc_check_conformance): Add msgid convention to argument.
342         (gfc_check_pointer_assign): Correct tabbing.
343         * gfortran.h: Include intl.h header. Remove prototype for gfc_article.
344         * gfortranspec.c: Include intl.h header.
345         (lang_specific_driver): Add translation support for --version.
346         * io.c (check_format): Add translation support for error message.
347         (format_item_1): Likewise.
348         (data_desc): Likewise.
349         * matchexp.c: Likewise.
350         * misc.c (gfc_article): Remove function.
351         * module.c (bad_module): Use msgid convention. Add translation support
352         for error messages.
353         (require_atom): Add translation support for error messages.
354         * parse.c (gfc_ascii_statement): Likewise.
355         (gfc_state_name): Likewise.
356         * primary.c (match_boz_constant): Reorganise error messages for
357         translations.
358         * resolve.c (resolve_entries): Likewise.
359         (resolve_operator): Add translation support for error messages.
360         (gfc_resolve_expr): Use msgid convention. Reorganise error messages
361         for translations.
362         (resolve_symbol): Add translation support for error messages.
363         * symbol.c (gfc_add_procedure): Remove use of gfc_article function.
364         * trans-const.c (gfc_build_string_const): Use msgid convention.
365
366 2005-09-16  Paul Brook  <paul@codesourcery.com>
367
368         PR fortran/23906
369         * dependency.c (transform_sections): Divide by correct value.
370         Elaborate comment.
371
372 2005-09-14  Paul Thomas  <pault@gcc.gnu.org>
373
374         PR fortran/21875 Internal Unit Array I/O, NIST
375         * fortran/trans-io.c (gfc_build_io_library_fndecls): Add field for
376         array descriptor to IOPARM structure.
377         * fortran/trans-io.c (set_internal_unit): New function to generate code
378         to store the character (array) and the character length for an internal
379         unit.
380         * fortran/trans-io (build_dt): Use the new function set_internal_unit.
381         
382 2005-09-14  Paul Thomas  <pault@gcc.gnu.org>
383
384         PR fortran/19358
385         * trans-array.c (gfc_trans_dummy_array_bias): correct the typo
386         which uses dim[i].upper for lbound, rather than dim[i].lower.
387
388 2005-09-13  Erik Edelmann  <erik.edelmann@iki.fi>
389
390         PR fortran/17740
391         * trans-expr.c (gfc_trans_arrayfunc_assign): Check value
392         of attr.elemental for specific function instead of generic name.
393
394 2005-09-13  Richard Sandiford  <richard@codesourcery.com>
395
396         PR fortran/18899
397         * trans-intrinsic.c (gfc_conv_intrinsic_bound): Move initialization
398         of argse.  Remove now-redundant want_pointer assignment.
399         * trans-array.c (gfc_conv_expr_descriptor): When not assigning to
400         a pointer, keep the original bounds of a full array reference.
401
402 2005-09-13  Richard Sandiford  <richard@codesourcery.com>
403
404         PR target/19269
405         * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift)
406         (gfc_resolve_pack, gfc_resolve_reshape, gfc_resolve_spread)
407         (gfc_resolve_transpose, gfc_resolve_unpack): Add "_char" to the name
408         for character-based operations.
409         (gfc_resolve_pack): Remove ATTRIBUTE_UNUSED from array argument.
410         (gfc_resolve_unpack): Copy the whole typespec from the vector.
411         * trans-array.c (gfc_conv_expr_descriptor): In the EXPR_FUNCTION
412         case, get the string length from the scalarization state.
413
414 2005-09-14  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
415
416         * Make-lang.in: Change targets prefixes from f95 to fortran.
417         * config-lang.in: Change language name to "fortran".
418         * lang.opt: Change language name to "fortran".
419         * options.c: Change CL_F95 to CL_Fortran.
420
421 2005-09-09  Thomas Koenig  <Thomas.Koenig@online.de>
422
423         gfortran.texi:  Document IOSTAT= specifier.
424
425 2005-09-09  Thomas Koenig  <Thomas.Koenig@online.de>
426
427         * gfortran.h:  Add iomsg to gfc_open, gfc_close, gfc_filepos,
428         gfc_inquire and gfc_dt.
429         * dump-parse-tree.c (gfc_show_code_node):  Add iomsg
430         for open, close, file positioning, inquire and namelist.
431         * io.c (io_tag):  Add tag_iomsg.
432         (resolve_tag): Add standards warning for iomsg.
433         (match_open_element):  Add iomsg.
434         (gfc_free_open):  Add iomsg.
435         (gfc_resolve_open):  Add iomsg.
436         (gfc_free_close):  Add iomsg.
437         (match_close_element):  Add iomsg.
438         (gfc_resolve_close):  Add iomsg.
439         (gfc_free_filepos):  Add iomsg.
440         (match_file_element):  Add iomsg.
441         (gfc_resolve_filepos):  Add iostat and iomsg.
442         (match-dt_element):  Add iomsg.
443         (gfc_free_dt):  Add iomsg.
444         (gfc_resolve_dt):  Add iomsg.
445         (gfc_free_inquire):  Add iomsg.
446         (match_inquire_element):  Add iomsg.
447         (gfc_resolve_inquire):  Add iomsg.
448         * trans_io.c:  Add ioparm_iomsg and ioparm_iomsg_len.
449         (gfc_build_io_library_fndecls):  Add iomsg as last field.
450         (gfc_trans_open):  Add iomsg.
451         (gfc_trans_close):  Add iomsg.
452         (build_fileos):  Call set_string for iomsg.
453         (gfc_trans_inquire):  Add iomsg.
454         (build_dt):  Add iomsg.
455
456 2005-09-09  Richard Sandiford  <richard@codesourcery.com>
457
458         * match.h (gfc_match_equiv_variable): Declare.
459
460 2005-09-09  Richard Sandiford  <richard@codesourcery.com>
461
462         PR fortran/19239
463         * Makefile.in (fortran/trans-expr.o): Depend on dependency.h.
464         * dependency.h (gfc_ref_needs_temporary_p): Declare.
465         * dependency.c (gfc_ref_needs_temporary_p): New function.
466         (gfc_check_fncall_dependency): Use it instead of inlined check.
467         By so doing, take advantage of the fact that character substrings
468         within an array reference also need a temporary.
469         * trans.h (GFC_SS_VECTOR): Adjust comment.
470         * trans-array.c (gfc_free_ss): Remove GFC_SS_VECTOR case.
471         (gfc_set_vector_loop_bounds): New function.
472         (gfc_add_loop_ss_code): Call it after evaluating the subscripts of
473         a GFC_SS_SECTION.  Deal with the GFC_SS_VECTOR case by evaluating
474         the vector expression and caching its descriptor for use within
475         the loop.
476         (gfc_conv_array_index_ref, gfc_conv_vector_array_index): Delete.
477         (gfc_conv_array_index_offset): Handle scalar, vector and range
478         dimensions as separate cases of a switch statement.  In the vector
479         case, use the loop variable to calculate a vector index and use the
480         referenced element as the dimension's index.  Perform bounds checking
481         on this final index.
482         (gfc_conv_section_upper_bound): Return null for vector indexes.
483         (gfc_conv_section_startstride): Give vector indexes a start value
484         of 0 and a stride of 1.
485         (gfc_conv_ss_startstride): Adjust for new GFC_SS_VECTOR representation.
486         (gfc_conv_expr_descriptor): Expand comments.  Generalize the
487         handling of the !want_pointer && !direct_byref case.  Use
488         gfc_ref_needs_temporary_p to decide whether the variable case
489         needs a temporary.
490         (gfc_walk_variable_expr): Handle DIMEN_VECTOR by creating a
491         GFC_SS_VECTOR index.
492         * trans-expr.c: Include dependency.h.
493         (gfc_trans_arrayfunc_assign): Fail if the target needs a temporary.
494
495 2005-09-09  Richard Sandiford  <richard@codesourcery.com>
496
497         PR fortran/21104
498         * trans.h (gfc_interface_sym_mapping, gfc_interface_mapping): Moved
499         from trans-expr.c.
500         (gfc_init_interface_mapping, gfc_free_interface_mapping)
501         (gfc_add_interface_mapping, gfc_finish_interface_mapping)
502         (gfc_apply_interface_mapping): Declare.
503         * trans-array.h (gfc_set_loop_bounds_from_array_spec): Declare.
504         (gfc_trans_allocate_temp_array): Add pre and post block arguments.
505         * trans-array.c (gfc_set_loop_bounds_from_array_spec): New function.
506         (gfc_trans_allocate_array_storage): Replace loop argument with
507         separate pre and post blocks.
508         (gfc_trans_allocate_temp_array): Add pre and post block arguments.
509         Update call to gfc_trans_allocate_array_storage.
510         (gfc_trans_array_constructor, gfc_conv_loop_setup): Adjust for new
511         interface to gfc_trans_allocate_temp_array.
512         * trans-expr.c (gfc_interface_sym_mapping, gfc_interface_mapping):
513         Moved to trans.h.
514         (gfc_init_interface_mapping, gfc_free_interface_mapping)
515         (gfc_add_interface_mapping, gfc_finish_interface_mapping)
516         (gfc_apply_interface_mapping): Make extern.
517         (gfc_conv_function_call): Build an interface mapping for array
518         return values too.  Call gfc_set_loop_bounds_from_array_spec.
519         Adjust call to gfc_trans_allocate_temp_array so that code is
520         added to SE rather than LOOP.
521
522 2005-09-09  Richard Sandiford  <richard@codesourcery.com>
523
524         PR fortran/12840
525         * trans.h (gfor_fndecl_internal_realloc): Declare.
526         (gfor_fndecl_internal_realloc64): Declare.
527         * trans-decl.c (gfor_fndecl_internal_realloc): New variable.
528         (gfor_fndecl_internal_realloc64): New variable.
529         (gfc_build_builtin_function_decls): Initialize them.
530         * trans-array.h (gfc_trans_allocate_temp_array): Add a fourth argument.
531         * trans-array.c (gfc_trans_allocate_array_storage): Add an argument
532         to say whether the array can grow later.  Don't allocate the array
533         on the stack if so.  Don't call malloc for zero-sized arrays.
534         (gfc_trans_allocate_temp_array): Add a similar argument here.
535         Pass it along to gfc_trans_allocate_array_storage.
536         (gfc_get_iteration_count, gfc_grow_array): New functions.
537         (gfc_iterator_has_dynamic_bounds): New function.
538         (gfc_get_array_constructor_element_size): New function.
539         (gfc_get_array_constructor_size): New function.
540         (gfc_trans_array_ctor_element): Replace pointer argument with
541         a descriptor tree.
542         (gfc_trans_array_constructor_subarray): Likewise.  Take an extra
543         argument to say whether the variable-sized part of the constructor
544         must be allocated using realloc.  Grow the array when this
545         argument is true.
546         (gfc_trans_array_constructor_value): Likewise.
547         (gfc_get_array_cons_size): Delete.
548         (gfc_trans_array_constructor): If the loop bound has not been set,
549         split the allocation into a static part and a dynamic part.  Set
550         loop->to to the bounds for static part before allocating the
551         temporary.  Adjust call to gfc_trans_array_constructor_value.
552         (gfc_conv_loop_setup): Allow any constructor to determine the
553         loop bounds.  Check whether the constructor has a dynamic size
554         and prefer to use something else if so.  Expect the loop bound
555         to be set later.  Adjust call to gfc_trans_allocate_temp_array.
556         * trans-expr.c (gfc_conv_function_call): Adjust another call here.
557
558 2005-09-09  Paul Thomas  <pault@gcc.gnu.org>
559
560         PR fortran/18878
561         * module.c (find_use_name_n): Based on original
562         find_use_name. Either counts number of use names for a
563         given real name or returns use name n.
564         (find_use_name, number_use_names): Interfaces to the
565         function find_use_name_n.
566         (read_module): Add the logic and calls to these functions,
567         so that mutiple reuses of the same real name are loaded.
568
569 2005-09-09  Paul Thomas  <pault@gcc.gnu.org>
570
571         PR fortran/22304
572         PR fortran/23270
573         PR fortran/18870
574         PR fortran/16511
575         PR fortran/17917
576         * gfortran.h: Move definition of BLANK_COMMON_NAME from trans-
577         common.c so that it is accessible to module.c. Add common_head
578         field to gfc_symbol structure. Add field for the equivalence
579         name AND new attr field, in_equivalence.
580         * match.c (gfc_match_common, gfc_match_equivalence): In loops
581         that flag common block equivalences, emit an error if the
582         common blocks are different, using sym->common_head as the
583         common block identifier. Ensure that symbols that are equivalence
584         associated with a common block are marked as being in_common.
585         * module.c (write_blank_common): New.
586         (write_common): Use unmangled common block name.
587         (load_equiv): New function ported from g95.
588         (read_module): Call load_equiv.
589         (write_equiv): New function ported from g95. Correct
590         string referencing for gfc functions. Give module
591         equivalences a unique name.
592         (write_module): Call write_equiv and write_blank_common.
593         * primary.c (match_variable) Old gfc_match_variable, made
594         static and third argument provided to indicate if parent
595         namespace to be visited or not.
596         (gfc_match_variable) New. Interface to match_variable.
597         (gfc_match_equiv_variable) New. Interface to match_variable.
598         * trans-common.c (finish_equivalences): Provide the call
599         to create_common with a gfc_common_header so that
600         module equivalences are made external, rather than local.
601         (find_equivalences): Ensure that all members in common block
602         equivalences are marked as used. This prevents the subsequent
603         call to this function from making local unions.
604         * trans-decl.c (gfc_generate_function_code): Move the call to
605         gfc_generate_contained_functions to after the call to
606         gfc_trans_common so the use-associated, contained common
607         blocks produce the correct references.
608         (gfc_create_module_variable): Return for equivalenced symbols
609         with existing backend declaration.
610
611 2005-09-08  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
612
613         PR fortran/23765
614         * match.c (gfc_match_common): Remove unnecessary / wrong special
615         cases for end-of-statement.
616
617 2005-09-08  Janne Blomqvist  <jblomqvi@cc.hut.fi>
618
619         * gfortran.texi: Add section about implemented F2003 features.
620
621 2005-09-08  Richard Sandiford  <richard@codesourcery.com>
622
623         PR fortran/15326
624         * trans-array.c (gfc_add_loop_ss_code): Set ss->string_length in
625         the GFC_SS_FUNCTION case too.
626         * trans-expr.c (gfc_conv_function_val): Allow symbols to be bound
627         to function pointers as well as function decls.
628         (gfc_interface_sym_mapping, gfc_interface_mapping): New structures.
629         (gfc_init_interface_mapping, gfc_free_interface_mapping)
630         (gfc_get_interface_mapping_charlen, gfc_get_interface_mapping_array)
631         (gfc_set_interface_mapping_bounds, gfc_add_interface_mapping)
632         (gfc_finish_interface_mapping, gfc_apply_interface_mapping_to_cons)
633         (gfc_apply_interface_mapping_to_ref)
634         (gfc_apply_interface_mapping_to_expr)
635         (gfc_apply_interface_mapping): New functions.
636         (gfc_conv_function_call): Evaluate the arguments before working
637         out where the result should go.  Make the null pointer case provide
638         the string length in parmse.string_length.  Cope with non-constant
639         string lengths, using the above functions to evaluate such lengths.
640         Use a temporary typespec; don't assign to sym->cl->backend_decl.
641         Don't assign to se->string_length when returning a cached array
642         descriptor.
643
644 2005-09-08  Richard Sandiford  <richard@codesourcery.com>
645
646         PR fortran/19928
647         * trans-array.c (gfc_conv_array_ref): Call gfc_advance_se_ss_chain
648         after handling scalarized references.  Make "indexse" inherit from
649         "se" when handling AR_ELEMENTs.
650         (gfc_walk_variable_expr): Add GFC_SS_SCALAR entries for each
651         substring or scalar reference that follows an array section.
652         * trans-expr.c (gfc_conv_variable): When called from within a
653         scalarization loop, start out with "ref" pointing to the scalarized
654         part of the reference.  Don't call gfc_advance_se_ss_chain here.
655
656 2005-09-07  Richard Sandiford  <richard@codesourcery.com>
657
658         PR fortran/23373
659         * trans-expr.c (gfc_trans_pointer_assignment): Assign to a temporary
660         descriptor if the rhs is not a null pointer or variable.
661
662 2005-09-07  Thomas Koenig  <Thomas.Koenig@online.de>
663
664         PR fortran/20848
665         * symbol.c(check_conflict):  Add conflict for parameter/save,
666
667 2005-09-06  Richard Sandiford  <richard@codesourcery.com>
668
669         PR fortran/19269
670         * simplify.c (gfc_simplify_transpose): Set the result's typespec from
671         the source, not the first element of the return value.
672
673 2005-09-04  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
674
675         PR fortran/23661
676         * io.c (match_io): Correctly backup if PRINT followed by
677         symbol which is not a namelist.  Force blank between PRINT
678         and namelist in free form.
679
680 2005-08-31  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
681
682         PR fortran/20592
683         * gfortran.h (gfc_option_t): Add flag_automatic.
684         * invoke.texi: Document the -fno-automatic option.
685         * lang.opt: Add a -fautomatic option.
686         * options.c (gfc_init_options): Default for -fautomatic is on.
687         (gfc_handle_option): Add handling of -fautomatic option.
688         * resolve.c (gfc_resolve): When -fno-automatic is used, mark
689         needed variables as SAVE.
690
691 2005-08-27  Erik Edelmann  <erik.edelmann@iki.fi>
692
693         * trans-array.c (gfc_trans_deferred_array): Fix comments.
694
695 2005-08-27  Erik Schnetter  <schnetter@aei.mpg.de>
696
697         * primary.c (match_charkind_name): Fix typo in comment leading to
698         function.
699
700 2005-08-25  Erik Edelmann  <eedelman@acclab.helsinki.fi>
701
702         PR fortran/20363
703         * symbol.c (find_special): Remove.
704         (build_sym, add_init_expr, attr_decl1): Remove calls to
705         find_special in favor of calls to gfc_get_symbol.
706
707 2005-08-24  Thomas Koenig  <Thomas.Koenig@online.de>
708
709         PR fortran/17758
710         * gfortran.h (symbol_attribute):  Add noreturn to the structure.
711         (gfc_intrinsic_sym):  Add noreturn to the structure.
712         * intrinsic.c (make_noreturn):  New function.
713         (add_subroutines):  Mark subroutines abort and exit as noreturn.
714         (gfc_intrinsic_sub_interface):  Copy noreturn attribute from
715         isym to the resolved symbol.
716         * trans-decl.c (gfc_get_extern_function_decl): Set function
717         as VOLATILE (== noreturn) if the noreturn attribute is set.
718
719 2005-08-21  Steven G. Kargl  <kargls@comcast.net>
720
721         * decl.c: Typo in comment.
722
723 2005-08-21  Steven G. Kargl  <kargls@comcast.net>
724
725         * array.c: Bump GFC_MAX_AC_EXPAND from 100 to 65535.
726
727 2005-08-21  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
728
729         * gfortran.h (gfc_option_t): Remove source field.  Add
730         flag_d_lines field.
731         (gfc_new_file): Remove arguments in prototype.
732         (gfc_source_file): Make 'const char *'.
733         * f95-lang.c (gfc_init): Use gfc_source_file instead of
734         gfc_option.source.  Call gfc_new_file without arguments.
735         * invoke.texi: Document new options '-fd-lines-as-code' and
736         '-fd-lines-as-comment'.
737         * lang.opt: Add new options.  Alphabetize.
738         * options.c (gfc_init_options): Initialize gfc_source_file instead
739         of gfc_option.source.  Initialize gfc_option.flag_d_lines.
740         (form_from_filename): Move here from scanner.c.  Make
741         'filename' argument 'const'.
742         (gfc_post_options): Set gfc_source_file.  Determine source form.
743         Warn if 'd-lines*' are used in free form.
744         * scanner.c (gfc_source_file): Constify.
745         (skip_fixed_comments): Deal with d-lines.
746         (get_file): Constify argument 'name'.
747         (load_file): Constify argument 'filename'.
748         (form_from_filename): Moved to options.c.
749         (gfc_new_file): Remove arguments.  Don't initialize
750         gfc_source_file, don't determine source form.
751         * trans-const.c (gfc_init_constants): Use gfc_source_file instead
752         of gfc_option.source.
753
754 2005-08-19  Steven G. Kargl  <kargls@comcast.net>
755
756         PR fortran/23065
757         * gfortran.h: Remove PATH_MAX definition.
758         * module.c (write_module, gfc_dump_module): Use alloca to allocate
759         buffers.
760         * scanner.c (gfc_release_include_path, form_from_filename): Ditto.
761
762 2004-08-16  Huang Chun  <chunhuang73@hotmail.com>
763
764         * trans-expr.c (gfc_conv_power_op): Evaluate the expression before
765         expand.
766
767 2005-08-14  Asher Langton  <langton2@llnl.gov>
768
769         * parse.c (match): Enclose macro in do...while(0) and braces.
770
771 2005-08-14  Paul Thomas  <pault@gcc.gnu.org>
772
773         PR fortran/21432.
774         * gfortran.texi: Document PRINT namelist.
775
776 2005-08-14  Paul Thomas  <pault@gcc.gnu.org>
777
778         PR fortran/21432.
779         * io.c (match_io): Add code to implement PRINT namelist.
780
781 2005-08-14  Canqun Yang  <canqun@nudt.edu.cn>
782
783         * trans-stmt.c (gfc_trans_arithmetic_if): Optimized in case of equal
784         labels.
785
786 2005-08-11  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
787             Steven Bosscher  <stevenb@suse.de>
788
789         PR libfortran/20006
790         * gfortran.h: Add is_main_program member to symbol_attribute.
791         * trans-decl: Add a gfor_fndecl_set_std tree.
792         (gfc_build_builtin_function_decls): Create it.
793         (gfc_generate_function_code): Add this call at the beginning of
794         the main program.
795         * trans.c (gfc_generate_code): Move main_program and attr.
796         * trans.h: Add declaration for gfor_fndecl_set_std.
797
798 2005-08-10  Thomas Koenig  <Thomas.Koenig@online.de>
799
800         PR libfortran/22143
801         gfortran.h:  Declare new function gfc_resolve_dim_arg.
802         resolve.c:  New function gfc_resolve_dim_arg.
803         iresolve.c (gfc_resolve_all):  Use gfc_resolve_dim_arg.
804         (gfc_resolve_any):  Likewise.
805         (gfc_resolve_count):  Likewise.
806         (gfc_resolve_cshift):  Likewise.  If the kind of shift is less
807         gfc_default_integer_kind, convert it to default integer type.
808         (gfc_resolve_eoshift):  Likewise.
809         (gfc_resolve_maxloc):  Use gfc_resolve_dim_arg.
810         (gfc_resolve_maxval):  Likewise.
811         (gfc_resolve_minloc):  Likewise.
812         (gfc_resolve_minval):  Likewise.
813         (gfc_resolve_product):  Likewise.
814         (gfc_resolve_spread):  Likewise.
815         (gfc_resolve_sum):  Likewise.
816
817 2005-08-09  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
818
819         * check.c (gfc_check_ttynam_sub, gfc_check_isatty): Add check
820         functions for new intrinsics TTYNAM and ISATTY.
821         * intrinsic.c (add_functions, add_subroutines): Add new
822         intrinsics.
823         * intrinsic.h: Add prototypes for new check and resolve
824         functions.
825         * iresolve.c (gfc_resolve_isatty, gfc_resolve_ttynam_sub): New
826         resolve functions for intrinsics TTYNAM and ISATTY.
827         * gfortran.h (gfc_generic_isym_id): Add symbol for ISATTY.
828         * trans-intrinsic.c: Add case for GFC_ISYM_ISATTY.
829
830 2005-08-09  Jakub Jelinek  <jakub@redhat.com>
831
832         * scanner.c (preprocessor_line): Don't write beyond the end of flag
833         buffer.
834
835 2005-08-07   Janne Blomqvist  <jblomqvi@cc.hut.fi>
836
837         PR fortran/22390 
838         * dump-parse-tree.c (gfc_show_code_node): Add case for FLUSH.
839         * gfortran.h: Add enums for FLUSH.
840         * io.c (gfc_free_filepos,match_file_element,match_filepos): Modify
841         comment appropriately.  (gfc_match_flush): New function.
842         * match.c (gfc_match_if): Add match for flush.
843         * match.h: Add prototype.
844         * parse.c (decode_statement): Add flush to 'f' case.
845         (next_statement): Add case for flush. (gfc_ascii_statement): Likewise.
846         * resolve.c (resolve_code): Add flush case.
847         * st.c (gfc_free_statement): Add flush case.
848         * trans-io.c: Add prototype for flush.
849         (gfc_build_io_library_fndecls): Build fndecl for flush.
850         (gfc_trans_flush): New function.
851         * trans-stmt.h: Add prototype.
852         * trans.c (gfc_trans_code): Add case for flush.
853
854 2005-08-06  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
855
856         * primary.c (match_hollerith_constant): Fix typo.
857
858 2005-08-06  Kazu Hirata  <kazu@codesourcery.com>
859
860         * decl.c, dump-parse-tree.c, gfortran.texi, intrinsic.texi,
861         invoke.texi, resolve.c, trans-array.c, trans-array.h,
862         trans-common.c, trans-expr.c, trans-io.c, trans.h: Fix
863         comment/doc typos.  Follow spelling conventions.
864
865 2005-08-06  Jakub Jelinek  <jakub@redhat.com>
866
867         PR fortran/18833
868         PR fortran/20850
869         * primary.c (match_varspec): If equiv_flag, don't look at sym's
870         attributes, call gfc_match_array_ref up to twice and don't do any
871         substring or component processing.
872         * resolve.c (resolve_equivalence): Transform REF_ARRAY into
873         REF_SUBSTRING or nothing if needed.  Check that substrings
874         don't have zero length.
875
876 2005-08-05  Thomas Koenig  <Thomas.Koenig@online.de>
877
878         * trans-expr.c  (gfc_build_builtin_function_decls):  Mark
879         stop_numeric and stop_string as non-returning.
880
881 2005-08-04  Paul Brook  <paul@codesourcery.com>
882
883         * trans-expr.c (gfc_conv_expr, gfc_conv_expr_type): Update comments.
884         (gfc_conv_expr_lhs): Fix assertion.
885         (gfc_conv_expr_val): Merge post block.  Set se.expr to new value.
886
887 2005-08-02  David Edelsohn  <edelsohn@gnu.org>
888
889         PR fortran/22491
890         * expr.c (simplify_parameter_variable): Do not copy the subobject
891         references if the expression value is a constant.
892
893         * expr.c (gfc_simplify_expr): Evaluate constant substrings.
894
895 2005-07-31  Jerry DeLisle  <jvdelisle@verizon.net>
896
897         * intrinsic.texi: Add documentation for exponent, floor, and fnum and
898         fix description of ceiling in index.
899
900 2005-07-31  Steven Bosscher  <stevenb@suse.de>
901
902         * trans-decl.c (gfc_build_builtin_function_decls): Give the internal
903         malloc functions the 'malloc' attribute.  Give runtime_error the
904         'noreturn' attribute.
905
906 2005-07-31  Steven Bosscher  <stevenb@suse.de>
907
908         * trans-stmt.c (gfc_trans_goto): Jump to the known label instead
909         of the assigned goto variable.
910
911 2005-07-29  Steven Bosscher  <stevenb@suse.de>
912
913         * trans-types.h (gfc_array_range_type): Add missing GTY decl for this.
914
915 2005-07-28  Andrew Pinski  <pinskia@physics.uc.edu>
916
917         * fortran/f95-lang.c (language_function): Remove
918         named_labels, shadowed_labels, returns_value, returns_abnormally,
919         warn_about_return_type, and extern_inline fields.
920         (named_labels): Remove variable.
921         (gfc_init_decl_processing): Remove setting of named_labels.
922
923 2005-07-27  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
924
925         PR fortran/22503
926         * resolve.c (resolve_operator): Improve diagnostic for comparison
927         of logicals with invalid operator.
928
929 2005-07-25  Jakub Jelinek  <jakub@redhat.com>
930
931         PR fortran/20063
932         * data.c (gfc_assign_data_value_range): Call
933         create_character_initializer if last_ts is a character type.
934
935 2005-07-22  Manfred Hollstein  <mh@suse.com>
936
937         * match.c (gfc_match_symbol): Fix uninitialised warnings.
938         * matchexp.c (gfc_match_expr): Likewise.
939
940 2005-07-20  Giovanni Bajo  <giovannibajo@libero.it>
941
942         Make CONSTRUCTOR use VEC to store initializers.
943         * trans-array.c (gfc_build_null_descriptor,
944         gfc_trans_array_constructor_value, gfc_conv_array_initializer):
945         Update to cope with VEC in CONSTRUCTOR_ELTS.
946         * trans-common.c (create_common): Likewise.
947         * trans-expr.c (gfc_conv_structure): Likewise.
948         * trans-stmt.c (gfc_trans_character_select): Use
949         build_constructor_from_list instead of build_constructor.
950
951 2005-07-19  Paul Thomas  <pault@gcc.gnu.org>
952
953         PR fortran/16940
954         * resolve.c (resolve_symbol): A symbol with FL_UNKNOWN
955         is matched against interfaces in parent namespaces. If there
956         the symtree is set to point to the interface.
957
958 2005-07-16  David Edelsohn  <edelsohn@gnu.org>
959
960         PR fortran/21730
961         * decl.c (do_parm): Adjust character initializer to character length
962         of symbol before assigning.
963
964 2005-07-14  Steve Ellcey  <sje@cup.hp.com>
965
966         * trans-types.c (MAX_REAL_KINDS): Increase from 4 to 5.
967
968 2005-07-14  Jakub Jelinek  <jakub@redhat.com>
969
970         * gfortran.h (MAX_ERROR_MESSAGE): Remove.
971         (gfc_error_buf): Add allocated and index fields.  Change message
972         field from array to a pointer.
973         * error.c (use_warning_buffer, error_ptr, warning_ptr): Remove.
974         (cur_error_buffer): New variable.
975         (error_char): Use cur_error_buffer->{message,index} instead of
976         {warning,error}_{buffer.message,ptr}.  Reallocate message buffer
977         if too small.
978         (gfc_warning, gfc_notify_std, gfc_error, gfc_error_now): Setup
979         cur_error_buffer and its index rather than {warning,error}_ptr
980         and use_warning_buffer.
981         (gfc_warning_check, gfc_error_check): Don't print anything if
982         message is NULL.
983         (gfc_push_error): Allocate saved message with xstrdup.
984         (gfc_pop_error): Free saved message with gfc_free.
985         (gfc_free_error): New function.
986         * primary.c (match_complex_constant): Call gfc_free_error if
987         gfc_pop_error will not be called.
988         * match.c (gfc_match_st_function): Likewise.
989
990         PR fortran/22417
991         * scanner.c (preprocessor_line): Don't treat flag 3 as the start of a new
992         file.  Fix file left but not entered warning.
993
994 2005-07-14  Feng Wang  <fengwang@nudt.edu.cn>
995         Steven G. Kargl  <kargls@comcast.net>
996
997         * array.c (resolve_character_array_constructor): Allocate gfc_charlen
998         for the array and attach to namespace list for automatic deallocation.
999
1000 2005-07-13  Andreas Schwab  <schwab@suse.de>
1001
1002         * Make-lang.in (fortran/dependency.o): Depend on
1003         $(GFORTRAN_TRANS_DEPS).
1004
1005 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
1006
1007         * trans-stmt.c (gfc_trans_forall_loop): Clear maskindex before
1008         the outermost loop.
1009         (gfc_trans_assign_need_temp, gfc_trans_pointer_assign_need_temp,
1010         gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_2):
1011         Don't clear maskindexes here.
1012
1013 2005-07-08  Daniel Berlin  <dberlin@dberlin.org>
1014         
1015         * trans-decl.c (create_function_arglist): DECL_ARG_TYPE_AS_WRITTEN
1016         is removed.
1017
1018 2005-07-08  Jakub Jelinek  <jakub@redhat.com>
1019
1020         * primary.c (gfc_match_rvalue): Handle ENTRY the same way
1021         as FUNCTION.
1022
1023 2005-07-07  Jakub Jelinek  <jakub@redhat.com>
1024
1025         * scanner.c (load_line): Add pbuflen argument, don't make
1026         buflen static.  If maxlen == 0 or preprocessor_flag,
1027         don't truncate at buflen, but at maxlen.  In xrealloc add
1028         1 byte at the end for the terminating '\0'.  Don't fill
1029         with spaces up to buflen, but gfc_option.fixed_line_length.
1030         (load_file): Adjust load_line caller.  Add line_len variable.
1031
1032         * scanner.c (preprocessor_line): Only set current_file->line when errors
1033         have not been encountered.  Warn and don't crash if a file leave
1034         preprocessor line has no corresponding entering line.  Formatting.
1035
1036 2005-07-07  Steven Bosscher  <stevenb@suse.de>
1037
1038         * primary.c (match_hollerith_constant): Use int, not unsigned int,
1039         for the hollerith length.  Fix indentation.
1040
1041 2005-07-07  Feng Wang  <fengwang@nudt.edu.cn>
1042
1043         PR fortran/16531
1044         PR fortran/15966
1045         PR fortran/18781
1046         * arith.c (gfc_hollerith2int, gfc_hollerith2real,
1047         gfc_hollerith2complex, gfc_hollerith2character, gfc_hollerith2logical):
1048         New functions.
1049         (eval_intrinsic): Don't evaluate if Hollerith constant arguments exist.
1050         * arith.h (gfc_hollerith2int, gfc_hollerith2real,
1051         gfc_hollerith2complex, gfc_hollerith2character, gfc_hollerith2logical):
1052         Add prototypes.
1053         * expr.c (free_expr0): Free memery allocated for Hollerith constant.
1054         (gfc_copy_expr): Allocate and copy string if Expr is from Hollerith.
1055         (gfc_check_assign): Enable conversion from Hollerith to other.
1056         * gfortran.h (bt): Add BT_HOLLERITH.
1057         (gfc_expr): Add from_H flag.
1058         * intrinsic.c (gfc_type_letter): Return 'h' for BT_HOLLERITH.
1059         (add_conversions): Add conversions from Hollerith constant to other.
1060         (do_simplify): Don't simplify if  Hollerith constant arguments exist.
1061         * io.c (resolve_tag): Enable array in FORMAT tag under GFC_STD_GNU.
1062         * misc.c (gfc_basetype_name): Return "HOLLERITH" for BT_HOLLERITH.
1063         (gfc_type_name): Print "HOLLERITH" for BT_HOLLERITH.
1064         * primary.c (match_hollerith_constant): New function.
1065         (gfc_match_literal_constant): Add match Hollerith before Integer.
1066         * simplify.c (gfc_convert_constant): Add conversion from Hollerith
1067         to other.
1068         * trans-const.c (gfc_conv_constant_to_tree): Use VIEW_CONVERT_EXPR to
1069         convert Hollerith constant to tree.
1070         * trans-io.c (gfc_convert_array_to_string): Get array's address and
1071         length to set string expr.
1072         (set_string): Deal with array assigned Hollerith constant and character
1073         array.
1074         * gfortran.texi: Document Hollerith constants as extention support.
1075
1076 2005-07-07  Feng Wang  <fengwang@nudt.edu.cn>
1077
1078         PR fortran/22327
1079         * trans-array.c (gfc_trans_array_constructor_value): Fix index of data.
1080
1081 2005-07-07  Jakub Jelinek  <jakub@redhat.com>
1082
1083         * decl.c (gfc_match_entry): Allow ENTRY without parentheses
1084         even in FUNCTIONs.
1085
1086 2005-07-03  Kazu Hirata  <kazu@codesourcery.com>
1087
1088         * gfortran.texi, intrinsic.texi: Fix typos.
1089         * symbol.c: Fix a comment typo.
1090
1091 2005-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1092
1093         * error.c (error_printf, error_print): Use ATTRIBUTE_GCC_GFC.
1094         * gfortran.h (ATTRIBUTE_GCC_GFC): New.
1095         (gfc_warning, gfc_warning_now, gfc_error, gfc_error_now,
1096         gfc_fatal_error, gfc_internal_error, gfc_notify_std): Use
1097         ATTRIBUTE_GCC_GFC.
1098
1099 2005-07-03  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1100
1101         PR fortran/20842
1102         * io.c (match_dt_element): Do not allow END tag in PRINT or
1103         WRITE statement.
1104
1105 2005-07-02  Joseph S. Myers  <joseph@codesourcery.com>
1106
1107         * lang.opt: Remove "." from end of help texts.
1108
1109 2005-07-01  Jerry DeLisle  <jvdelisle@verizon.net>
1110
1111         * gfortran.texi: Fix typos and grammar.
1112         * invoke.texi: Fix typos and grammar.
1113         * intrinsic.texi: Add documentaion for eoshift, epsilon, etime, and
1114         exit. Fixed alignment of text for dtime syntax. Fixed a few line
1115         lengths.
1116
1117 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
1118
1119         * trans-stmt.c (gfc_trans_forall_1): Prefer to use smaller logical
1120         type than boolean_type_node.
1121
1122 2005-06-25  Kelley Cook  <kcook@gcc.gnu.org>
1123
1124         * all files: Update FSF address in copyright headers.
1125
1126 2005-06-24  Jerry DeLisle  <jvdelisle@verizon.net>
1127
1128         PR fortran/21915
1129         * gfortran.h: Add symbols for new intrinsic functions.
1130         * intrinsic.c: Add new functions acosh, asinh, and atanh.
1131         * intrinsic.h: Add prototypes for the new functions.
1132         * iresolve.c (gfc_resolve_acosh): New function.
1133         (gfc_resolve_asinh): New function.
1134         (gfc_resolve_atanh): New function.
1135         * mathbuiltins.def: Add defines.
1136         * simplify.c (gfc_simplify_acosh): New function.
1137         (gfc_simplify_asinh): New function.
1138         (gfc_simplify_atanh): New function.
1139
1140 2005-06-24  Feng Wang  <fengwang@nudt.edu.cn>
1141
1142         * simplify.c (gfc_simplify_modulo): Don't clear before get result.
1143
1144 2005-06-22  Paul Brook  <paul@codesourcery.com>
1145
1146         PR fortran/21034
1147         * symbol.c (gfc_is_var_automatic): New function.
1148         (save_symbol): Use it.
1149
1150 2005-06-21  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1151             Paul Thomas  <pault@gcc.gnu.org>
1152
1153         PR fortran/22010
1154         Port from g95.
1155         * module.c (mio_namelist): New function. Correct to set
1156         namelist_tail and to give error on renaming namelist by use
1157         association.
1158         (mio_symbol): Call mio_namelist.
1159
1160 2005-06-19  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1161
1162         * gfortran.h: Add flag_backslash compile-time option.
1163         * lang.opt: Add support for -fbackslash option.
1164         * options.c: Likewise.
1165         * primary.c: Implement behavior for -fno-backslash.
1166         * invoke.texi: Add doc for -fbackslash option.
1167         * gfortran.texi: Remove mention of -fno-backslash as a
1168         possible extension.
1169
1170 2005-06-20  Steven G. Kargl  <kargls@comcast.net>
1171         (port from g95)
1172
1173         PR fortran/21257
1174         * match.c (gfc_match_label): Detect duplicate labels.
1175
1176
1177 2005-06-20  Erik Edelmann  <erik.edelmann@iki.fi>
1178
1179         * intrinsic.c (check_intrinsic_standard): Fix spelling error
1180         in a warning message.
1181
1182 2005-06-18  Erik Edelman  <eedelman@acclab.helsinki.fi>
1183             Steven G. Kargl  <kargls@comast.net>
1184
1185         PR fortran/19926
1186         * primary.c (gfc_match_rvalue):  expr_type can be EXPR_CONSTANT
1187         for an array; check that sym->as is NULL.
1188
1189
1190 2005-06-18  Steven G. Kargl  <kargls@comcast.net>
1191
1192         * intrinsic.c (gfc_intrinsic_func_interface): Enable errors for generic
1193         functions whose simplification routine return FAILURE.
1194
1195 2005-06-13  Geoffrey Keating  <geoffk@apple.com>
1196
1197         * Make-lang.in (fortran.install-man): Doesn't depend on installdirs.
1198         (rule for installing f95.1 manpage): Does depend on installdirs.
1199
1200 2005-06-13  Jakub Jelinek  <jakub@redhat.com>
1201
1202         PR fortran/22038
1203         * trans-stmt.c (gfc_trans_forall_loop): Only increment maskindex
1204         in the innermost loop.
1205
1206         * trans-expr.c (gfc_conv_function_call): Return int instead of
1207         void.  Use a local variable for has_alternate_specifier and
1208         return it.  Avoid modification of function type's return value
1209         in place, since it may be shared.
1210         * trans.h (has_alternate_specifier): Remove.
1211         (gfc_conv_function_call): Change return type.
1212         * trans-stmt.c (has_alternate_specifier): Remove.
1213         (gfc_trans_call): Add a local has_alternate_specifier variable,
1214         set it from gfc_conv_function_call return value.
1215
1216 2005-06-12  Richard Henderson  <rth@redhat.com>
1217
1218         * trans-array.c (gfc_conv_descriptor_data_get): Rename from
1219         gfc_conv_descriptor_data.  Cast the result to the DATAPTR type.
1220         (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): New.
1221         (gfc_trans_allocate_array_storage): Use them.
1222         (gfc_array_allocate, gfc_array_deallocate): Likewise.
1223         (gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor): Likewise.
1224         (gfc_trans_deferred_array): Likewise.
1225         * trans-expr.c (gfc_conv_function_call): Likewise.
1226         (gfc_trans_subcomponent_assign): Likewise.
1227         (gfc_trans_pointer_assignment): Likewise.
1228         * trans-intrinsic.c (gfc_conv_allocated): Likewise.
1229         * trans-types.c (gfc_array_descriptor_base): New.
1230         (gfc_get_element_type): Use GFC_TYPE_ARRAY_DATAPTR_TYPE.
1231         (gfc_get_array_descriptor_base): Break out from ...
1232         (gfc_get_array_type_bounds): ... here.  Create type variants.
1233         * trans-array.h (gfc_conv_descriptor_data_get): Declare.
1234         (gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr): Declare.
1235
1236 2005-06-12  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1237
1238         * trans-expr.c (gfc_conv_variable): POINTER results don't need f2c
1239         calling conventions.  Look at sym instead of sym->result.
1240         * trans-types.c (gfc_sym_type): Remove workaround for frontend bug.
1241         Remove condition which is always false with workaround removed.
1242         (gfc_return_by_reference): Always look at sym, never at sym->result.
1243
1244 2005-06-11  Steven G. Kargl  <kargls@comcast.net>
1245         
1246         PR fortran/17792
1247         PR fortran/21375
1248         * trans-array.c (gfc_array_deallocate): pstat is new argument
1249         (gfc_array_allocate): update gfc_array_deallocate() call.
1250         (gfc_trans_deferred_array): ditto.
1251         * trans-array.h: update gfc_array_deallocate() prototype.
1252         * trans-decl.c (gfc_build_builtin_function_decls): update declaration
1253         * trans-stmt.c (gfc_trans_deallocate): Implement STAT= feature.
1254
1255 2005-06-07  Jerry DeLisle  <jvdelisle@verizon.net>
1256
1257         * intrinsic.texi: Add documentation for dcmplx, digits,
1258         dim, idim, ddim, dot_product, dprod, dreal, and dtime.
1259
1260 2005-06-05  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1261
1262         PR fortran/21912
1263         * trans-array.c (gfc_trans_array_constructor_value): Slightly reorder.
1264         Generate correct exit condition in case of negative steps in
1265         implied-do loops.
1266
1267         * invoke.texi: Fix description of flags required for compatibility
1268         with g77.
1269
1270 2005-06-04  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1271         Erik Schnetter  <schnetter@aei.mpg.de>
1272
1273         PR fortran/19195
1274         * trans.c (gfc_get_backend_locus): Remove unnecessary adjustment,
1275         remove FIXME comment. 
1276
1277 2005-06-04  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1278
1279         * match.c (match_forall_iterator): Don't immediately give error if '='
1280         is not followed by an expression.
1281
1282 2005-06-04  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1283         Erik Edelmann  <erik.edelmann@iki.fi>
1284
1285         * array.c (gfc_match_array_constructor): Disallow empty array
1286         constructor.
1287
1288 2005-06-03  Jerry DeLisle  <jvdelisle@verizon.net>
1289
1290         * fortran/intrinsic.texi: Add documentation for
1291         command_argument_count, conjg, dconjg, count,
1292         cpu_time, cshift, date_and_time, dble, dfloat.
1293
1294 2005-06-01  Roger Sayle  <roger@eyesopen.com>
1295
1296         * intrinsic.c (add_conv): No longer take a "simplify" argument as
1297         its always gfc_convert_constant, instead take a "standard" argument.
1298         (add_conversions): Change all existing calls of add_conv to pass
1299         GFC_STD_F77 as appropriate.  Additionally, if we're allowing GNU
1300         extensions support integer-logical and logical-integer conversions.
1301         (gfc_convert_type_warn): Warn about use the use of these conversions
1302         as a extension when appropriate, i.e. with -pedantic.
1303         * simplify.c (gfc_convert_constant): Add support for integer to
1304         logical and logical to integer conversions, using gfc_int2log and
1305         gfc_log2int.
1306         * arith.c (gfc_log2int, gfc_int2log): New functions.
1307         * arith.h (gfc_log2int, gfc_int2log): Prototype here.
1308         * gfortran.texi: Document this new GNU extension.
1309
1310 2005-06-01  Paul Thomas  <pault@gcc.gnu.org>
1311
1312         * fortran/trans-expr.c (gfc_conv_variable): Clean up bracketting.
1313         * fortran/trans-expr.c (gfc_conv_function_call): Insert spaces.
1314         Correct comments and replace convert of integer_one_node with
1315         build_int_cst.
1316
1317 2005-06-01  Jakub Jelinek  <jakub@redhat.com>
1318
1319         PR fortran/21729
1320         * resolve.c (resolve_contained_fntype): Use sym->attr.untyped
1321         to avoid giving error multiple times.
1322         (resolve_entries): Don't error about BT_UNKNOWN here.
1323         (resolve_unknown_f): Capitalize IMPLICIT for consistency.
1324         (resolve_fntype): New function.
1325         (gfc_resolve): Call resolve_fntype.
1326
1327 2005-06-01  Feng Wang  <fengwang@nudt.edu.cn>
1328
1329         PR fortran/20883
1330         * fortran/io.c (resolve_tag): Fix error message.
1331
1332 2005-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1333
1334         * fortran/trans-decl.c: Don't include errors.h.
1335         * fortran/Make-lang.in: Updates dependencies.
1336
1337 2005-05-31  Paul Thomas  <pault@gcc.gnu.org>
1338
1339         PR fortran/18109
1340         PR fortran/18283
1341         PR fortran/19107
1342         * fortran/trans-array.c (gfc_conv_expr_descriptor): Obtain the
1343         string length from the expression typespec character length value
1344         and set temp_ss->stringlength and backend_decl. Obtain the
1345         tree expression from gfc_conv_expr rather than gfc_conv_expr_val.
1346         Dereference the expression to obtain the character.
1347         * fortran/trans-expr.c (gfc_conv_component_ref): Remove the
1348         dereference of scalar character pointer structure components.
1349         * fortran/trans-expr.c (gfc_trans_subarray_assign): Obtain the
1350         string length for the structure component from the component
1351         expression.
1352
1353 2005-05-30  Roger Sayle  <roger@eyesopen.com>
1354
1355         * gfortran.h (GFC_STD_LEGACY): New "standard" macro.  Reindent.
1356         * options.c (gfc_init_options): By default, allow legacy extensions
1357         but warn about them.
1358         (gfc_post_options): Make -pedantic warn about legacy extensions
1359         even with -std=legacy.
1360         (gfc_handle_option): Make -std=gnu follow the default behaviour
1361         of warning about legacy extensions, but allowing them. Make the
1362         new -std=legacy accept everything and warn about nothing.
1363         * lang.opt (std=legacy): New F95 command line option.
1364         * invoke.texi: Document both -std=f2003 and -std=legacy.
1365         * gfortran.texi: Explain the two types of extensions and document
1366         how they are affected by the various -std= command line options.
1367
1368 2005-05-30  Kazu Hirata  <kazu@cs.umass.edu>
1369
1370         * trans-expr.c: Remove trailing ^M.
1371
1372         * trans-expr.c: Fix comment typos.
1373
1374 2005-05-29  Paul Thomas  <pault@gcc.gnu.org>
1375
1376         PR fortran/16939
1377         PR fortran/17192
1378         PR fortran/17193
1379         PR fortran/17202
1380         PR fortran/18689
1381         PR fortran/18890
1382         * fortran/trans-array.c (gfc_conv_resolve_dependencies): Add string
1383         length to temp_ss for character pointer array assignments.
1384         * fortran/trans-expr.c (gfc_conv_variable): Correct errors in
1385         dereferencing of characters and character pointers.
1386         * fortran/trans-expr.c (gfc_conv_function_call): Provide string
1387         length as return argument for various kinds of handling of return.
1388         Return a char[]* temporary for character pointer functions and
1389         dereference the temporary upon return.
1390
1391 2005-05-29  Janne Blomqvist  <jblomqvi@vipunen.hut.fi>
1392             Steven G. Kargl  <kargls@comcast.net>
1393   
1394         fortran/PR20846
1395         * io.c (gfc_match_inquire): Implement constraints on UNIT and FILE usage.
1396
1397 2005-05-29  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1398
1399         PR libfortran/20006
1400         * io.c (format_item_1): Add check and extension warning for
1401         $ edit descriptor.
1402
1403 2005-05-28  Steven G. Kargl  <kargls@comcast.net>
1404
1405         * arith.c (gfc_arith_init_1): Fix off by one problem;
1406         (gfc_check_integer_range): Chop extra bits in subnormal numbers.
1407
1408 2005-05-28  Jerry DeLisle   <jvdelisle@verizon.net>
1409             Steven G. Kargl  <kargls@comcast.net>
1410
1411         * intrinsic.texi: added documentation for BIT_SIZE, BTEST, CHAR, CEILING
1412         and CMPLX
1413
1414 2005-05-27  Steven G. Kargl  <kargls@comcast.net>
1415
1416         * trans-array.c (gfc_trans_deferred_array): Use build_int_cst to force
1417         like types in comparsion.
1418
1419 2005-05-26  Kazu Hirata  <kazu@cs.umass.edu>
1420
1421         * data.c, parse.c, trans-array.c, trans-decl.c,
1422         trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
1423         trans.h: Fix comment typos.  Follow spelling conventions.
1424
1425 2005-05-22  Roger Sayle  <roger@eyesopen.com>
1426
1427         * gfortran.texi: Document some more GNU extensions.
1428
1429 2005-05-22  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1430
1431         * error.c (gfc_warning): Fix typo in comment.
1432
1433 2005-05-18  Thomas Koenig  <Thomas.Koenig@online.de>
1434
1435         PR libfortran/21127
1436         * fortran/iresolve.c (gfc_resolve_reshape): Add 
1437         gfc_type_letter (BT_COMPLEX) for complex to
1438         to resolved function name.
1439
1440 2005-05-18  Erik Edelmann  <erik.edelmann@iki.fi>
1441
1442         * array.c (gfc_match_array_constructor): Support [ ... ]
1443         style array constructors.
1444
1445 2005-05-18  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1446
1447         * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_TRUNC
1448         and BUILT_IN_TRUNCF instead of BUILT_IN_FLOOR and BUILT_IN_FLOORF.
1449         * trans-intrinsic.c (build_fix_expr): Change 'op' argument
1450         to correct enum type.
1451         (gfc_conv_intrinsic_aint): Likewise.  Clarify comment in front of
1452         function.  Add default case to switch, deal with FIX_TRUNC_EXPR
1453         instead of FIX_FLOOR_EXPR.
1454
1455 2005-05-18  Feng Wang  <fengwang@nudt.edu.cn>
1456
1457         PR fortran/20954
1458         * trans-const.c (gfc_conv_const_charlen): Use gfc_charlen_type_node to
1459         build character length.
1460
1461 2005-05-17  Zdenek Dvorak  <dvorakz@suse.cz>
1462
1463         * trans-types.c (gfc_array_range_type): New variable.
1464         (gfc_init_types): Initialize gfc_array_range_type.
1465         (gfc_get_array_type_bounds): Use gfc_array_range_type.
1466
1467 2005-05-17  Jakub Jelinek  <jakub@redhat.com>
1468
1469         PR fortran/15080
1470         * trans-stmt.c (generate_loop_for_temp_to_lhs): Remove SIZE and COUNT2
1471         arguments.  If LSS is gfc_ss_terminator, increment COUNT1 by 1, instead
1472         of incrementing COUNT2 and using COUNT1+COUNT2 increment COUNT1 and use
1473         just that as index.
1474         (generate_loop_for_rhs_to_temp): Likewise.
1475         (compute_overall_iter_number): Add INNER_SIZE_BODY argument.
1476         It non-NULL, add it to body.
1477         (allocate_temp_for_forall_nest_1): New function, split from
1478         allocate_temp_for_forall_nest.
1479         (allocate_temp_for_forall_nest): Add INNER_SIZE_BODY argument,
1480         propagate it down to compute_overall_iter_number.  Use
1481         allocate_temp_for_forall_nest_1.
1482         (gfc_trans_assign_need_temp): Remove COUNT2.  Call
1483         compute_inner_temp_size into a new stmtblock_t.  Adjust calls to
1484         allocate_temp_for_forall_nest, generate_loop_for_rhs_to_temp
1485         and generate_loop_for_temp_to_lhs.
1486         (gfc_trans_pointer_assign_need_temp): Adjust calls to
1487         allocate_temp_for_forall_nest.
1488         (gfc_evaluate_where_mask): Call compute_inner_temp_size into a new
1489         stmtblock_t.  Call compute_overall_iter_number just once, then
1490         allocate_temp_for_forall_nest_1 twice with the same size.
1491         Initialize mask indexes if nested_forall_info != NULL.
1492         (gfc_trans_where_2): Initialize mask indexes before calling
1493         gfc_trans_nested_forall_loop.
1494
1495 2005-05-15  Feng Wang  <fengwang@nudt.edu.cn>
1496         Jerry DeLisle  <jvdelisle@verizon.net>
1497
1498         PR fortran/17432
1499         * trans-stmt.c (gfc_trans_label_assign): fix pointer type, to 
1500         resolve ICE on assign of format label.
1501         * trans-io.c (set_string): add fold-convert to properly
1502         handle assigned format label in write.
1503  
1504 2005-05-13  Paul Brook  <paul@codesourcery.com>
1505
1506         * trans-stmt.c (gfc_trans_forall_1): Fix comment typo.
1507
1508 2005-05-12  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1509
1510         * trans-types.c (gfc_is_nodesc_array): Remove redundant check.
1511
1512 2005-05-11  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1513
1514         PR fortran/21260
1515         * io.c (check_format): Look for literal characters inside
1516         hollerith constant.
1517
1518 2005-05-11  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1519
1520         * resolve.c (resolve_symbol): Copy 'pointer' and 'dimension'
1521         attribute from result symbol to function symbol.
1522         * trans-expr.c (gfc_conv_function_call): Look at sym->attr.dimension
1523         instead of sym->result->attr.dimension.
1524
1525 2005-05-10  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1526
1527         PR fortran/20178
1528         * gfortran.h (gfc_option): Add flag_f2c.
1529         * invoke.texi: Document '-ff2c' command line option.  Adapt
1530         documentation for '-fno-second-underscore' and '-fno-underscoring'.
1531         * lang.opt (ff2c): New entry.
1532         * options.c (gfc-init_options): Set default calling convention
1533         to -fno-f2c.  Mark -fsecond-underscore unset.
1534         (gfc_post_options): Set -fsecond-underscore if not explicitly set
1535         by user.        
1536         (handle_options): Set gfc_option.flag_f2c according to requested
1537         calling convention.
1538         * trans-decl.c (gfc_get_extern_function_decl): Use special f2c
1539         intrinsics where necessary.
1540         (gfc_trans_deferred_vars): Change todo error to assertion.
1541         * trans-expr.c (gfc_conv_variable): Dereference access
1542         to hidden result argument.
1543         (gfc_conv_function_call): Add hidden result argument to argument
1544         list if f2c calling conventions requested.  Slightly restructure
1545         tests.  Convert result of default REAL function to requested type
1546         if f2c calling conventions are used.  Dereference COMPLEX result
1547         if f2c cc are used.
1548         * trans-types.c (gfc_sym_type):  Return double for default REAL
1549         function if f2c cc are used.
1550         (gfc_return_by_reference): Slightly restructure logic.  Return
1551         COMPLEX by reference depending on calling conventions.
1552         (gfc_get_function_type): Correctly make hidden result argument a
1553         pass-by-reference argument for COMPLEX.  Remove old code which does
1554         this for derived types.
1555
1556 2005-05-09  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1557
1558         * match.c (gfc_match_return): Only require space after keyword when
1559         it is obligatory.  Only give stdwarn to after matching is successful.
1560         * dump-parse-tree.c (gfc_show_symbol): Deal with alternate returns.
1561
1562 2005-05-08  Kazu Hirata  <kazu@cs.umass.edu>
1563
1564         * intrinsic.texi: Fix typos.
1565
1566 2005-05-07  Steven G. Kargl  <kargls@comcast.net>
1567
1568         * intrinsic.texi:  Document ASSOCIATED and ATAN2.  Update Bessel function
1569         description to include information about scalar arguments.
1570
1571 2005-05-03  Kazu Hirata  <kazu@cs.umass.edu>
1572
1573         * Make-lang.in, dump-parse-tree.c, invoke.texi, lang.opt,
1574         match.h, trans-array.h: Update copyright.
1575
1576 2005-04-29  Tom Tromey  <tromey@redhat.com>
1577
1578         * f95-lang.c (poplevel): Updated for change to build_block.
1579
1580 2005-04-29  Jakub Jelinek  <jakub@redhat.com>
1581
1582         PR fortran/13082
1583         PR fortran/18824
1584         * trans-expr.c (gfc_conv_variable): Handle return values in functions
1585         with alternate entry points.
1586         * resolve.c (resolve_entries): Remove unnecessary string termination
1587         after snprintf.  Set result of entry master.
1588         If all entries have the same type, set entry master's type
1589         to that common type, otherwise set mixed_entry_master attribute.
1590         * trans-types.c (gfc_get_mixed_entry_union): New function.
1591         (gfc_get_function_type): Use it for mixed_entry_master functions.
1592         * gfortran.h (symbol_attribute): Add mixed_entry_master bit.
1593         * decl.c (gfc_match_entry): Set entry->result properly for
1594         function ENTRY.
1595         * trans-decl.c (gfc_get_symbol_decl): For entry_master, skip over
1596         __entry argument.
1597         (build_entry_thunks): Handle return values in entry thunks.
1598         Clear BT_CHARACTER's ts.cl->backend_decl, so that it is not
1599         shared between multiple contexts.
1600         (gfc_get_fake_result_decl): Use DECL_ARGUMENTS from
1601         current_function_decl instead of sym->backend_decl.  Skip over
1602         entry master's entry id argument.  For mixed_entry_master entries or
1603         their results, return a COMPONENT_REF of the fake result.
1604         (gfc_trans_deferred_vars): Don't warn about missing return value if
1605         at least one entry point uses RESULT.
1606         (gfc_generate_function_code): For entry master returning
1607         CHARACTER, copy ts.cl->backend_decl to all entry result syms.
1608         * trans-array.c (gfc_trans_dummy_array_bias): Don't consider return
1609         values optional just because they are in entry master.
1610
1611 2005-04-29  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1612
1613         * gfortran.h (gfc_namespace): Add seen_implicit_none field,
1614         Tobias forgot this in previous commit.
1615         
1616 2005-04-29  Paul Brook   <paul@codesourcery.com>
1617
1618         * trans-expr.c (gfc_conv_expr_present): Fix broken assert.  Update
1619         comment.
1620
1621 2005-04-29  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1622
1623         * gfortran.h (gfc_namespace): Add seen_implicit_none field.
1624         * symbol.c (gfc_set_implicit_none): Give error if there's a previous
1625         IMPLICIT NONE, set seen_implicit_none.
1626         (gfc_merge_new_implicit): Error if there's an IMPLICIT NONE statement.
1627
1628 2005-04-28  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1629
1630         * gfortran.h (gfc_gsymbol): Make name a const char *.
1631         * symbol.c (gfc_get_gsymbol): Allocate gsymbol name via
1632         gfc_get_string.
1633
1634 2005-04-28  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1635
1636         PR fortran/20865
1637         * resolve.c (resolve_actual_arglist): Issue an error if a statement
1638         functions is used as actual argument.
1639
1640 2005-04-27  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1641
1642         PR fortran/21177
1643         * interface.c (compare_parameter): Ignore type for EXPR_NULL
1644         only if type is BT_UNKNOWN.
1645
1646 2005-04-25  Paul Brook  <paul@codesourcery.com>
1647         Steven G. Kargl  <kargls@comcast.net>
1648
1649         PR fortran/20879
1650         * check.c (gfc_check_ichar_iachar): New function.
1651         * instinsic.h (gfc_check_ichar_iachar): Add prototype.
1652         * intrinsic.c (add_functions): Use it.
1653         * primary.c (match_varspec, gfc_match_rvalue): Clear incorrect
1654         character expression lengths.
1655
1656 2005-04-24  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1657
1658         PR fortran/20059
1659         * trans-common.c (translate_common): Cast offset and
1660         common_segment->offset to type int for warning message.
1661
1662 2005-04-23  DJ Delorie  <dj@redhat.com>
1663
1664         * trans-decl.c: Adjust warning() callers.
1665
1666 2005-04-23  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1667
1668         * trans-const.c (gfc_conv_mpfr_to_tree): Use hexadecimal string as
1669         intermediate representation.  Fix typo in comment.
1670
1671 2005-04-21  Steven G. Kargl  <kargls@comcast.net>
1672
1673         * trans-const.c (gfc_conv_mpfr_to_tree): Remove unneeded computation;
1674         simplify logic; Add a gcc_assert.
1675
1676 2005-04-19  Steven G. Kargl  <kargls@comcast.net>
1677
1678         * trans-const.c (gfc_conv_mpz_to_tree): Fix comment.
1679
1680 2005-04-19  Arnaud Desitter  <arnaud.desitter@ouce.ox.ac.uk>
1681             Steven G. Kargl  <kargls@comcast.net>
1682
1683         * invoke.texi: Update -Waliasing description
1684
1685 2005-04-19  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1686
1687         PR fortran/16861
1688         * resolve.c (resolve_variable): If e->symtree is not set, this
1689         ought to be a FAILURE, and not a segfault.
1690
1691 2005-04-17  Paul Thomas  <pault@gcc.gnu.org>
1692
1693         PR fortran/17472
1694         PR fortran/18209
1695         PR fortran/18396
1696         PR fortran/19467
1697         PR fortran/19657
1698         * fortran/trans-io.c (gfc_build_io_library_fndecls): Create
1699         declaration for st_set_nml_var and st_set_nml_var_dim. Remove
1700         declarations of old namelist functions.
1701         (build_dt): Simplified call to transfer_namelist_element.
1702         (nml_get_addr_expr): Generates address expression for start of 
1703         object data. New function.
1704         (nml_full_name): Qualified name for derived type components. New 
1705         function.
1706         (transfer_namelist_element): Modified for calls to new functions 
1707         and improved derived type handling.
1708
1709 2005-04-17  Richard Guenther  <rguenth@gcc.gnu.org>
1710
1711         * scanner.c (gfc_next_char_literal): Reset truncation flag
1712         for lines ending in a comment for both fixed and free form.
1713         (load_line): Do not set truncated flag if only truncating
1714         the EOL marker.
1715
1716 2005-04-15  Richard Guenther  <rguenth@gcc.gnu.org>
1717
1718         PR fortran/14569
1719         * gfortran.h (gfc_linebuf): Add truncated field.
1720         * parse.c (next_statement): Handle warning for truncated
1721         lines.
1722         * scanner.c (load_line): Return if line was truncated.
1723         No longer warn for truncated lines.  Remove unused parameters.
1724         (load_file): Store load_line return value to linebuf.
1725         (gfc_error_recovery): Do not advance line at the end.
1726
1727 2005-04-14  Steven G. Kargl  <kargls@comcast.net>
1728
1729         * gfortran.h (gfc_real_info): Add subnormal struct member.
1730         * arith.c (gfc_arith_init_1): Set it.
1731         (gfc_check_real_range): Use it.
1732         * simplify.c (gfc_simplify_nearest): Fix nearest(0.,1.).
1733
1734 2005-04-12  Kazu Hirata  <kazu@cs.umass.edu>
1735
1736         * simplify.c: Fix a comment typo.
1737
1738 2005-04-11  Richard Sandiford  <rsandifo@redhat.com>
1739
1740         * lang.opt: Refer to the GCC internals documentation instead of c.opt.
1741
1742 2005-04-11  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1743
1744         * simplify.c (gfc_simplify_nearest): Overhaul.
1745
1746 2005-04-10  Kazu Hirata  <kazu@cs.umass.edu>
1747
1748         * interface.c: Fix a comment typo.
1749
1750 2005-04-10  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1751
1752         * match.c (match_arithmetic_if): Arithmetic IF is obsolete in
1753         Fortran 95.
1754
1755 2005-04-09  Steven G. Kargl  <kargls@comcast.net>
1756
1757         * simplify.c (gfc_simplify_anint): Use mpfr_round()
1758         (gfc_simplify_dnint): ditto.
1759         (gfc_simplify_nint): ditto.
1760
1761 2005-04-09  Andrew Pinski  <pinskia@physics.uc.edu>
1762
1763         PR fortran/13257
1764         * io.c (check_format): Allow an optional comma
1765         between descriptors.
1766
1767 2005-04-09  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1768
1769         * match.c (match_arithmetic_if): Remove gfc_ prefix and correct
1770         comment according to GNU coding style.
1771         (gfc_match_if): Remove gfc_ prefix in call to
1772         match_arithmetic_if.
1773
1774 2005-04-08  Diego Novillo  <dnovillo@redhat.com>
1775
1776         * match.c (gfc_match_arithmetic_if): Declare static.
1777
1778 2005-04-08  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1779
1780         PR fortran/17229
1781         * match.c (gfc_match_arithmetic_if): New function to match an
1782         arithmetic IF statement.
1783         (gfc_match_if): Use gfc_match_arithmetic_if to match an
1784         arithmetic IF statement embedded in a simple IF statement.
1785
1786 2005-04-07  Steven G. Kargl  <kargls@comcast.net>
1787
1788         * simplify.c (gfc_simplify_exponent): Fix exponent(tiny(x))
1789
1790 2005-04-06  Steven G. Kargl  <kargls@comcast.net>
1791
1792         * invoke.texi: Remove documentation of -std=f90 
1793
1794 2005-04-06  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1795
1796         * expr.c (gfc_check_assign): Don't allow NULL as rhs in a
1797         non-pointer assignment.
1798
1799 2005-04-05  Feng Wang  <fengwang@nudt.edu.cn>
1800
1801         PR fortran/15959
1802         PR fortran/20713
1803
1804         * array.c (resolve_character_array_constructor): New function. Set
1805         constant character array's character length.
1806         (gfc_resolve_array_constructor): Use it.
1807         * decl.c (add_init_expr_to_sym): Set symbol and initializer character
1808         length.
1809         (gfc_set_constant_character_len): New function. Set constant character
1810         expression according the given length.
1811         * match.h (gfc_set_constant_character_len): Add prototype.
1812
1813 2005-04-04  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1814
1815         * intrinsic.texi: BES?? functions are not in the f95 standard.
1816
1817 2005-04-03  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1818
1819         * intrinsic.texi: Document COS, EXP, LOG, LOG10, SIN, SQRT, TAN.
1820
1821 2005-04-03  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1822
1823         * intrinsic.texi: Document BESJ0, BESJ1, BESJN, BESY0, BESY1,
1824         BESYN, ATAN, COSH, ERF, ERC, SINH, TANH.
1825
1826 2005-04-02  Steven G. Kargl  <kargls@comcast.net>
1827
1828         * intrinsic.texi: Document ALLOCATED, ANINT, ANY, ASIN; fix typos
1829
1830 2005-04-01  Kazu Hirata  <kazu@cs.umass.edu>
1831
1832         * decl.c, f95-lang.c, interface.c, module.c, trans-stmt.c,
1833         trans.h: Fix comment typos.
1834
1835 2005-03-29  Steven G. Kargl  <kargls@comcast.net>
1836
1837         * gfortran.h (option_t): Change d8, i8, r8 to flag_default_double,
1838         flag_default_integer, flag_default_real
1839         * invoke.texi: Update documentation
1840         * lang.opt: Remove d8, i8, r8 definitions; Add fdefault-double-8   
1841         fdefault-integer-8, and fdefault-real-8 definitions.
1842         * options.c (gfc_init_options): Set option defaults
1843         (gfc_handle_option): Handle command line options.
1844         * trans-types.c (gfc_init_kinds): Use options.
1845
1846 2005-03-29  Keith Besaw  <kbesaw@us.ibm.com>
1847
1848         * f95-lang.c (builtin_function): Process the attrs parameter
1849         and apply the "const" attribute to the builtin if found.
1850
1851 2005-03-27  Steven G. Kargl  <kargls@comcast.net>
1852
1853         * intrinsic.texi: Document AIMAG, AINT, ALL
1854
1855 2005-03-26  Steven G. Kargl  <kargls@comcast.net>
1856
1857         * arith.c (check_result): Fix illogical logic.
1858
1859 2005-03-26  Canqun Yang  <canqun@nudt.edu.cn>
1860
1861         * trans-common.c (create_common): Build RECORD_NODE for common blocks
1862         contain no equivalence objects.
1863         (add_equivalences): New argument saw_equiv.
1864         (trans_common): New local variable saw_equiv.
1865         (finish_equivalences): Add a local variable dummy, Always pass true
1866         for the 3rd parameter to create_common.
1867
1868 2005-03-25  Steven G. Kargl  <kargls@comcast.net>
1869
1870         * intrinsic.texi: Fix "make dvi"
1871
1872 2005-03-24  Steven G. Kargl  <kargls@comcast.net>
1873
1874         * intrinsic.texi: New file.
1875         * gfortran.texi: Include it; white space change; fix typo.
1876
1877 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
1878
1879         * f95-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
1880
1881 2005-03-23  Steven Bosscher  <stevenb@suse.de>
1882
1883         * convert.c (convert): Replace fold (buildN (...)) with fold_buildN.
1884         * trans-array.c (gfc_trans_allocate_array_storage,
1885         gfc_trans_allocate_temp_array gfc_trans_array_constructor_value,
1886         gfc_conv_array_index_ref, gfc_trans_array_bound_check,
1887         gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
1888         gfc_conv_array_ref, gfc_trans_preloop_setup, gfc_conv_ss_startstride,
1889         gfc_conv_loop_setup, gfc_array_init_size, gfc_trans_array_bounds,
1890         gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
1891         gfc_conv_expr_descriptor): Likewise.
1892         * trans-expr.c (gfc_conv_powi, gfc_conv_string_tmp,
1893         gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
1894         * trans-intrinsic.c (build_round_expr, gfc_conv_intrinsic_bound,
1895         gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_sign,
1896         gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
1897         gfc_conv_intrinsic_btest, gfc_conv_intrinsic_bitop,
1898         gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits,
1899         gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_ishftc,
1900         gfc_conv_intrinsic_merge, prepare_arg_info,
1901         gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_repeat): Likewise.
1902         * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do, gfc_trans_do_while,
1903         gfc_trans_forall_loop, gfc_do_allocate, generate_loop_for_temp_to_lhs,
1904         generate_loop_for_rhs_to_temp, compute_inner_temp_size,
1905         allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
1906         gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_assign):
1907         Likewise.
1908         * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Likewise.
1909         * trans.c (gfc_add_modify_expr): Likewise.
1910
1911 2005-03-22  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1912
1913         * check.c (gfc_check_chdir, gfc_check_chdir_sub, gfc_check_kill,
1914         gfc_check_kill_sub, gfc_check_link, gfc_check_link_sub,
1915         gfc_check_symlnk, gfc_check_symlnk_sub, gfc_check_rename,
1916         gfc_check_rename_sub, gfc_check_sleep_sub, gfc_check_gerror,
1917         gfc_check_getlog, gfc_check_hostnm, gfc_check_hostnm_sub,
1918         gfc_check_perror): new functions to check newly implemented
1919         g77 intrinsics.
1920         * gfortran.h: adding symbols for new intrinsics.
1921         * intrinsic.c (add_functions): adding new intrinsics.
1922         (add_subroutines): adding new intrinsics.
1923         * intrinsic.h: prototype for all checking and resolving
1924         functions.
1925         * iresolve.c (gfc_resolve_chdir, gfc_resolve_chdir_sub,
1926         gfc_resolve_hostnm, gfc_resolve_ierrno, gfc_resolve_kill,
1927         gfc_resolve_link, gfc_resolve_rename, gfc_resolve_symlnk,
1928         gfc_resolve_time, gfc_resolve_time8, gfc_resolve_rename_sub,
1929         gfc_resolve_kill_sub, gfc_resolve_link_sub,
1930         gfc_resolve_symlnk_sub, gfc_resolve_sleep_sub,
1931         gfc_resolve_gerror, gfc_resolve_getlog, gfc_resolve_hostnm_sub,
1932         gfc_resolve_perror): new functions to resolve intrinsics.
1933         * trans-intrinsic.c (gfc_conv_intrinsic_function): add case
1934         for new symbols.
1935
1936 2005-03-19  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1937
1938         * dump-parse-tree.c (gfc_show_expr): Dump name of namespace
1939         in which the variable is declared.
1940
1941         PR fortran/18525
1942         * resolve.c (was_declared): Also check for dummy attribute.
1943
1944 2005-03-19  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1945
1946         * gfortran.h (arith): Remove ARITH_0TO0.
1947         * arith.c (gfc_arith_error): Remove handling of ARITH_0TO0.
1948         (gfc_arith_power): Remove special casing of zero to integral
1949         power zero.
1950
1951 2005-03-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1952
1953         * Make-lang.in (fortran-warn): Remove -Wno-error.
1954         (expr.o-warn, resolve.o-warn, simplify.o-warn,
1955         trans-common.o-warn): Specify -Wno-error.
1956
1957 2005-03-17  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1958
1959         * trans-array.c (gfc_trans_static_array_pointer,
1960         get_array_ctor_var_strlen, gfc_conv_array_index_offset): Fix
1961         comment and formatting typos.
1962
1963 2005-03-17  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
1964
1965         * invoke.texi: Fix typos.
1966
1967 2005-03-15  Zack Weinberg  <zack@codesourcery.com>
1968
1969         * Make-lang.in (GFORTRAN_TEXI): Add gcc-vers.texi.
1970
1971 2005-03-15  Feng Wang  <fengwang@nudt.edu.cn>
1972
1973         * trans-stmt.c (gfc_trans_label_assign): Don't set DECL_ARTIFICIAL flag
1974         to zero on label_tree.
1975
1976 2005-03-15  Feng Wang  <fengwang@nudt.edu.cn>
1977
1978         PR fortran/18827
1979         * io.c (resolve_tag): Add checking on assigned label.
1980         (match_dt_format): Does not set symbol assign attribute.
1981         * match.c (gfc_match_goto):Does not set symbol assign attribute.
1982         * resolve.c (resolve_code): Add checking on assigned label.
1983         * trans-common.c (build_field): Deals with common variable assigned
1984         a label.
1985         * trans-stmt.c (gfc_conv_label_variable): New function.
1986         (gfc_trans_label_assign): Use it.
1987         (gfc_trans_goto): Ditto.
1988         * trans-io.c (set_string): Ditto.
1989         * trans.h (gfc_conv_label_variable): Add prototype.
1990
1991 2005-03-14  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
1992
1993         PR fortran/20467
1994         * symbol.c (check_conflict): A dummy argument can't be a statement
1995         function.
1996
1997 2005-03-14  Zdenek Dvorak  <dvorakz@suse.cz>
1998
1999         * fortran/trans-intrinsic.c (gfc_conv_intrinsic_ishft): Convert
2000         the argument of the shift to the unsigned type.
2001
2002 2005-03-13  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
2003
2004         PR fortran/16907
2005         * resolve.c (gfc_resolve_index): Allow REAL indices as an extension.
2006
2007 2005-03-13  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
2008
2009         PR fortran/20323
2010         * resolve.c (gfc_resolve): Check if character lengths are
2011         specification expressions.
2012
2013 2005-03-12  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
2014
2015         PR fortran/20361
2016         * trans-array.c (gfc_stack_space_left): Remove unused variable.
2017         (gfc_can_put_var_on_stack): Move to trans-decl.c, remove #if 0'ed
2018         code.
2019         * trans-array.h (gfc_stack_space_left, gfc_can_put_var_on_stack):
2020         Remove declaration / prototype.
2021         * trans-common.c (build_equiv_decl): Give union a name.  Check if
2022         it can be put on the stack.
2023         * trans-decl.c (gfc_stack_space_left): Move function here.
2024         (gfc_build_qualified_array): Fix comment typo.
2025         * trans.h (gfc_put_var_on_stack): Add prototype.
2026
2027 2005-03-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2028
2029         * Make-lang.in (fortran-warn): Set to $(STRICT_WARN) -Wno-error.
2030         * decl.c, trans.c: Don't use C++ style comments.
2031         * gfortran.h (sym_flavor, procedure_type, sym_intent, gfc_access,
2032         ifsrc): Give names to enums and use ENUM_BITFIELD.
2033         (gfc_access): Remove trailing comma.
2034
2035 2005-03-05  Steven G. Kargl  <kargls@comcast.net>
2036
2037         PR 19936
2038         * primary.c (match_complex_constant): Mangled complex constant may
2039         be an implied do-loop.  Give implied do-loop matcher a chance.
2040
2041 2005-03-05  Steven G. Kargl  <kargls@comcast.net>
2042
2043         PR fortran/19754
2044         * resolve.c (compare_shapes):  New function.
2045         (resolve_operator): Use it.
2046
2047 2005-03-05  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
2048
2049         * trans-const.c (gfc_conv_constant_to_tree): Use correct tree
2050         type for COMPLEX constants.
2051
2052 2005-03-04  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
2053
2054         PR fortran/19673
2055         * trans-expr.c (gfc_conv_function_call): Correctly dereference
2056         argument from a pointer function also if it has a result clause.
2057
2058 2005-03-04  Steven G. Kargl  <kargls@comcast.net>
2059
2060         * expr.c (gfc_copy_shape_excluding): Change && to ||.
2061
2062 2005-03-04  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
2063
2064         * trans-intrinsic.c (gfc_get_symbol_for_expr): Fix comment typo,
2065         clarify comment.
2066
2067 2005-02-28  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
2068         (port from g95)
2069
2070         PR fortran/19479
2071         * simplify.c (gfc_simplify_bound): Rename to ...
2072         (simplify_bound): ... this and overhaul.
2073
2074 2005-02-28  Steven G. Kargl  <kargl@gcc.gnu.org>
2075
2076         * trans-intrinsic.c (gfc_conv_intrinsic_iargc): remove boolean argument.
2077         (gfc_conv_intrinsic_function): update function calls
2078
2079 2005-02-27  Steven G. Kargl  <kargl@gcc.gnu.org>
2080
2081         PR fortran/20058
2082         * trans-types.c (gfc_max_integer_kind): Declare
2083         (gfc_init_kinds): Initialize it.
2084         * gfortran.h (gfc_max_integer_kind): extern it.
2085         * primary.c (match_boz_constant): Use it; remove gfortran extension
2086         of kind suffixes on BOZ literal constants
2087
2088
2089 2005-02-27  Steven G. Kargl  <kargls@comcast.net>
2090
2091         * arith.c (gfc_check_real_range):  Remove multiple returns
2092         (check_result): New function.
2093         (gfc_arith_uminus,gfc_arith_plus,gfc_arith_times,
2094         gfc_arith_divide,gfc_arith_power,gfc_arith_minus): Use it.
2095
2096
2097 2005-02-24  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2098
2099         * decl.c, resolve.c, trans-array.c, trans.h: Fix comment typo(s).
2100
2101
2102 2005-02-24  Tobias Schl"uter  <tobias.schlueter@physik.uni-meunchen.de>
2103
2104         Unrevert previously reverted patch.  Adding this fix:
2105         * module.c (find_true_name): Deal with NULL module.
2106
2107 2005-02-24  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
2108
2109         Revert yesterday's patch:
2110         2005-02-23  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
2111
2112                 * gfortran.h (gfc_component, gfc_actual_arglist, ...
2113                 ... argument.  Copy string instead of pointing to it.
2114
2115 2005-02-23  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
2116
2117         * gfortran.h (gfc_get_namespace): Add second argument to prototype.
2118         * intrinsic.c (gfc_intrinsic_init_1): Pass second argument to
2119         gfc_get_namespace.
2120         * module.c (mio_namespace_ref, load_needed): Likewise.
2121         * parse.c (parse_interface, parse_contained): Likewise.  Here the
2122         correct second argument matters.
2123         * symbol.c (gfc_get_namespace): Add parent_types argument, only copy
2124         parent's implicit types if this is set.
2125         (gfc_symbol_init_2): Pass second argument to gfc_get_namespace.
2126         * trans-common.c (build_common_decl): Likewise.
2127
2128         * gfortran.h (symbol_attribute): New 'untyped' field, fix comment
2129         formatting.
2130         * symbol.c (gfc_set_default_type): Issue error only once, by setting
2131         and checking 'untyped' attribute.
2132
2133         * gfortran.h (gfc_expr): Move 'operator', 'op1', 'op2', and 'uop'
2134         fields into new struct 'op' inside the 'value' union.
2135         * arith.c (eval_intrinsic): Adapt all users.
2136         * dependency.c (gfc_check_dependency): Likewise.
2137         * dump-parse-tree.c (gfc_show_expr): Likewise.
2138         * expr.c (gfc_get_expr): Don't clear removed fields.
2139         (free_expr0, gfc_copy_expr, gfc_type_convert_binary,
2140         gfc_is_constant_expr, simplify_intrinsic_op, check_init_expr,
2141         check_intrinsic_op): Adapt to new field names.
2142         * interface.c (gfc_extend_expr): Likewise.  Also explicitly
2143         nullify 'esym' and 'isym' fields of new function call.
2144         * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
2145         Adapt to renamed structure fields.
2146         * matchexp.c (build_node, match_level_1, match_expr): Likewise.
2147         * module.c (mio_expr): Likewise.
2148         * resolve.c (resolve_operator): Likewise.
2149         (gfc_find_forall_index): Likewise.  Only look through operands
2150         if dealing with EXPR_OP
2151         * trans-array.c (gfc_walk_op_expr): Adapt to renamed fields.
2152         * trans-expr.c (gfc_conv_unary_op, gfc_conv_power_op,
2153         gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
2154
2155         [ Reverted ]
2156         * gfortran.h (gfc_component, gfc_actual_arglist, gfc_user_op): Make
2157         'name' a 'const char *'.
2158         (gfc_symbol): Likewise, also for 'module'.
2159         (gfc_symtree): Make 'name' a 'const char *'.
2160         (gfc_intrinsic_sym): Likewise, also for 'lib_name'.
2161         (gfc_get_gsymbol, gfc_find_gsymbol): Add 'const' qualifier to
2162         'char *' argument.
2163         (gfc_intrinsic_symbol): Use 'gfc_get_string' instead of 'strcpy' to
2164         initialize 'SYM->module'.
2165         * check.c (gfc_check_minloc_maxloc, check_reduction): Check for NULL
2166         pointer instead of empty string.
2167         * dump-parse-tree.c (gfc_show_actual_arglist): Likewise.
2168         * interface.c (gfc_compare_types): Adapt check to account for possible
2169         NULL pointer.
2170         (compare_actual_formal): Check for NULL pointer instead of empty
2171         string.
2172         * intrinsic.c (gfc_current_intrinsic, gfc_current_intrinsic_arg):
2173         Add 'const' qualifier.
2174         (conv_name): Return a heap allocated string.
2175         (find_conv): Add 'const' qualifier to 'target'.
2176         (add_sym): Use 'gfc_get_string' instead of 'strcpy'.
2177         (make_generic): Check for NULL pointer instead of empty string.
2178         (make_alias): Use 'gfc_get_string' instead of 'strcpy'.
2179         (add_conv): No need to strcpy result from 'conv_name'.
2180         (sort_actual): Check for NULL pointer instead of empty  string.
2181         * intrinsic.h (gfc_current_intrinsic, gfc_current_intrinsic_arg):
2182         Adapt prototype.
2183         * module.c (compare_true_names): Compare pointers instead of strings
2184         for 'module' member.
2185         (find_true_name): Initialize string fields with gfc_get_string.
2186         (mio_pool_string): New function.
2187         (mio_internal_string): Adapt comment.
2188         (mio_component_ref, mio_component, mio_actual_arg): Use
2189         'mio_pool_string' instead of 'mio_internal_string'.
2190         (mio_symbol_interface): Add 'const' qualifier to string arguments.
2191         Add level of indirection. Use 'mio_pool_string' instead of
2192         'mio_internal_string'.
2193         (load_needed, read_module): Use 'gfc_get_string' instead of 'strcpy'.
2194         (write_common, write_symbol): Use 'mio_pool_string' instead of
2195         'mio_internal_string'.
2196         (write_symbol0, write_symbol1): Likewise, also check for NULL pointer
2197         instead of empty string.
2198         (write_operator, write_generic): Pass correct type variable to
2199         'mio_symbol_interface'.
2200         (write_symtree): Use 'mio_pool_string' instead of
2201         'mio_internal_string'.
2202         * primary.c (match_keyword_arg): Adapt check to possible
2203         case of NULL pointer.  Use 'gfc_get_string' instead of 'strcpy'.
2204         * symbol.c (gfc_add_component, gfc_new_symtree, delete_symtree,
2205         gfc_get_uop, gfc_new_symbol): Use 'gfc_get_string' instead of
2206         'strcpy'.
2207         (ambiguous_symbol): Check for NULL pointer instead of empty string.
2208         (gfc_find_gsymbol, gfc_get_gsymbol): Add 'const' qualifier on string
2209         arguments.
2210         * trans-array.c (gfc_trans_auto_array_allocation): Check for NULL
2211         pointer instead of empty string.
2212         * trans-decl.c (gfc_sym_mangled_identifier,
2213         gfc_sym_mangled_function_id, gfc_finish_var_decl, gfc_get_symbol_decl,
2214         gfc_get_symbol_decl): Likewise.
2215         * trans-io.c (gfc_new_nml_name_expr): Add 'const' qualifier to
2216         argument.  Copy string instead of pointing to it.
2217
2218 2005-02-23  Kazu Hirata  <kazu@cs.umass.edu>
2219
2220         * intrinsic.h, st.c: Update copyright.
2221
2222 2005-02-20  Steven G. Kargl  <kargls@comcast.net>
2223
2224         * symbol.c: Typos in comments.
2225
2226 2005-02-20  Steven G. Kargl  <kargls@comcast.net>
2227
2228         * expr.c (gfc_type_convert_binary): Typo in comment.
2229
2230 2005-02-19  Steven G. Kargl  <kargls@comcast.net>
2231
2232         * check.c (gfc_check_selected_int_kind): New function.
2233         * intrinsic.h: Prototype it.
2234         * intrinsic.c (add_function): Use it.
2235         * simplify (gfc_simplify_ceiling,gfc_simplify_floor): Change
2236           BT_REAL to BT_INTEGER and use gfc_default_integer_kind.
2237
2238 2005-02-19  Steven G. Kargl  <kargls@comcast.net>
2239
2240         * check.c (gfc_check_int): improve checking of optional kind
2241         * simplify.c (gfc_simplify_int): Change BT_REAL to BT_INTEGER
2242
2243 2005-02-19  Steven G. Kargl  <kargls@comcast.net>
2244
2245         * check.c (gfc_check_achar): New function
2246         * intrinsic.h: Prototype it.
2247         * intrinsic.c (add_function): Use it.
2248
2249 2005-02-13  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
2250
2251         * trans-stmt.c (generate_loop_for_temp_to_lhs,
2252         generate_loop_for_rhs_to_temp): Remove if whose condition is
2253         always true.
2254
2255 2005-02-12  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
2256
2257         * symbol.c (gfc_use_ha_derived): Remove, fold functionality into ...
2258         (gfc_use_derived): ... this function.
2259
2260 2005-02-09  Richard Henderson  <rth@redhat.com>
2261
2262         * f95-lang.c (gfc_init_builtin_functions): Call
2263         build_common_builtin_nodes; do not define any functions handled
2264         by it.
2265
2266 2005-02-08  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
2267
2268         * expr.c (gfc_copy_expr): Don't copy 'op1' and 'op2' for
2269         EXPR_SUBSTRING.
2270         (gfc_is_constant_expr): Check 'ref' to determine if substring
2271         reference is constant.
2272         (gfc_simplify_expr): Simplify 'ref' instead of 'op1' and 'op2'.
2273         (check_init_expr, check_restricted): Check 'ref' instead of 'op1'
2274         and 'op2'.
2275         * module.c (mio_expr): Read / write 'ref' instead of 'op1' and 'op2'.
2276
2277 2005-02-07  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
2278
2279         * gfortran.h (gfc_add_dimension, gfc_add_result, gfc_add_save,
2280         gfc_add_dummy, gfc_add_generic, gfc_add_in_common, gfc_add_data,
2281         gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
2282         gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
2283         gfc_add_procedure): Add argument.
2284         * array.c (gfc_set_array_spec), decl.c (var_element, get_proc_name,
2285         gfc_match_null, match_type_spec, match_attr_spec,
2286         gfc_match_formal_arglist, match_result, gfc_match_function_decl):
2287         Update callers to match.
2288         (gfc_match_entry) : Likewise, fix comment typo.
2289         (gfc_match_subroutine, attr_decl1, gfc_add_dimension,
2290         access_attr_decl, do_parm, gfc_match_save, gfc_match_modproc,
2291         gfc_match_derived_decl): Update callers.
2292         * interface.c (gfc_match_interface): Likewise.
2293         * match.c (gfc_match_label, gfc_add_flavor,
2294         gfc_match_call, gfc_match_common, gfc_match_block_data,
2295         gfc_match_namelist, gfc_match_module, gfc_match_st_function):
2296         Likewise.
2297         * parse.c (parse_derived, parse_interface, parse_contained),
2298         primary.c (gfc_match_rvalue, gfc_match_variable): Likewise.
2299         * resolve.c (resolve_formal_arglist, resolve_entries): Update callers.
2300         * symbol.c (check_conflict, check_used): Add new 'name' argument,
2301         use when printing error message.
2302         (gfc_add_dimension, gfc_add_result, gfc_add_save, gfc_add_dummy,
2303         gfc_add_generic, gfc_add_in_common, gfc_add_data,
2304         gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
2305         gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
2306         gfc_add_procedure): Add new 'name' argument.  Pass along to
2307         check_conflict and check_used.
2308         (gfc_add_allocatable, gfc_add_external, gfc_add_intrinsic,
2309         gfc_add_optional, gfc_add_pointer, gfc_add_target, gfc_add_elemental,
2310         gfc_add_pure, gfc_add_recursive, gfc_add_intent,
2311         gfc_add_explicit_interface, gfc_copy_attr): Pass NULL for new
2312         argument in calls to any of the modified functions.
2313
2314 2005-02-06  Joseph S. Myers  <joseph@codesourcery.com>
2315
2316         * gfortran.texi: Don't give last update date.
2317
2318 2006-01-30  Richard Henderson  <rth@redhat.com>
2319
2320         * options.c (gfc_init_options): Zero flag_errno_math.
2321
2322 2005-01-29  Paul Brook  <paul@codesourcery.com>
2323
2324         PR fortran/18565
2325         * check.c (real_or_complex_check): New function.
2326         (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc): New functions.
2327         * intrinsic.c (add_functions): Use new check functions.
2328         * intrinsic.h (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc):
2329         Add prototypes.
2330
2331 2005-01-29  Steven G. Kargl  <kargls@comcast.net>
2332
2333         PR fortran/19589
2334         * expr.c (gfc_check_assign):  Check for conformance of logical operands
2335
2336 2004-01-27  Steven Bosscher  <stevenb@suse.de>
2337
2338         * trans-decl.c (gfc_build_label_decl): Set DECL_ARTIFICAL and
2339         TREE_USED for all labels.
2340         (gfc_trans_entry_master_switch): Use it instead of building a
2341         label by hand.
2342         * trans-io.c (add_case): Likewise.
2343         * trans-stmt.c (gfc_trans_integer_select): Likewise.
2344
2345 2004-01-23  Paul Brook  <paul@codesourcery.com>
2346         Steven G. Kargl  <kargls@comcast.net>
2347
2348         PR fortran/17941
2349         * arith.c (gfc_convert_real): Remove sign handling.
2350         * primary.c (match_digits): Allow whitespace after initial sign.
2351         (match_real_const): Handle signs here.  Allow whitespace after
2352         initial sign.  Remove dead code.
2353         (match_const_complex_part): Remove.
2354         (match_complex_part): Use match_{real,integer}_const.
2355         (match_complex_constant): Cross-promote integer types.
2356
2357 2005-01-23  James A. Morrison  <phython@gcc.gnu.org>
2358
2359         PR fortran/19294
2360         * iresolve.c (gfc_resolve_transpose): Resolve to transpose_c4 or
2361         transpose_c8 for complex types.
2362
2363 2005-01-23  Kazu Hirata  <kazu@cs.umass.edu>
2364
2365         * data.c, dependency.c, f95-lang.c, io.c, trans-array.c,
2366         trans-decl.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
2367         trans-stmt.c, trans-types.c, trans.h: Fix comment typos.
2368         Follow spelling conventions.
2369
2370 2005-01-22  Bud Davis  <bdavis9659@comcast.net>
2371
2372         PR fortran/19313
2373         * trans-io.c (gfc_trans_inquire): Added code to support
2374         pad.
2375
2376 2005-01-22  Steven G. Kargl  <kargls@comcast.net>
2377
2378         * intrinsic.c (make_alias):  Add standard argument.
2379         (add_functions): Update make_alias calls.
2380
2381 2005-01-22  Paul Brook  <paul@codesourcery.com>
2382
2383         * trans-expr.c (gfc_conv_function_call): Remove bogus TODO.
2384
2385 2005-01-22  Paul Brook  <paul@codesourcery.com>
2386
2387         * gfortran.h (gfc_check_access): Add prototype.
2388         * match.c (gfc_match_namelist): Remove TODO.
2389         * module.c (check_access): Rename ...
2390         (gfc_check_access): ... to this.  Boolify.  Update callers.
2391         * resolve.c (resolve_symbol): Check for private objects in public
2392         namelists.
2393
2394 2005-01-22  Paul Brook  <paul@codesourcery.com>
2395
2396         * primary.c (gfc_match_rvalue): Only apply implicit type if variable
2397         does not have an explicit type.
2398         (gfc_match_variable): Resolve implicit derived types in all cases.
2399         Resolve contained function types from their own namespace, not the
2400         parent.
2401         * resolve.c (resolve_contained_fntype): Remove duplicate sym->result
2402         checking.  Resolve from the contained namespace, not the parent.
2403
2404 2005-01-22  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
2405
2406         PR fortran/19543
2407         * trans-const.c (gfc_conv_constant_to_tree): Give logical
2408         constants the correct type.
2409
2410         PR fortran/19194
2411         * trans-io.c (ADD_STRING): Use gfc_charlen_type_node for string
2412         length parameters.
2413         (gfc_build_io_library_fndecls): 'rec' and 'recl_in' are not
2414         pointer fields.
2415
2416 2005-01-18  Kazu Hirata  <kazu@cs.umass.edu>
2417
2418         * arith.c, array.c, check.c, decl.c, expr.c, f95-lang.c,
2419         gfortran.h, interface.c, intrinsic.c, io.c, iresolve.c,
2420         match.c, matchexp.c, misc.c, module.c, options.c, parse.c,
2421         scanner.c, simplify.c, symbol.c, trans-array.c, trans-expr.c,
2422         trans-io.c, trans-stmt.c, trans.c: Update copyright.
2423
2424 2005-01-17  Ira Rosen  <irar@il.ibm.com>
2425
2426         * f95-lang.c (gfc_init_builtin_functions): Call targetm.init_builtins.
2427
2428 2005-01-16  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2429
2430         PR fortran/19182
2431         * error.c (error_char): Line-buffer errors / warnings.
2432
2433 2005-01-16  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2434
2435         * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Fix signed /
2436         unsigned issue.  Use build_int_cst instead of converting
2437         integer_zero_node.  Remove unnecessary conversion.
2438
2439         * trans-types.c (gfc_get_character_type_len): : Use
2440         gfc_charlen_type_node as basic type for the range field.
2441
2442         * trans-intrinsic.c (build_fixbound_expr,
2443         gfc_conv_intrinsic_bound, gfc_conv_intrinsic_anyall,
2444         gfc_conv_intrinsic_count, gfc_conv_intrinsic_btest,
2445         gfc_conv_intrinsic_singlebitop): Use 'build_int_cst' instead
2446         of converting 'integer_zero_node' or 'integer_one_node'
2447         respectively.
2448         (gfc_conv_intrinsic_ishftc): Same, but store in local variable to
2449         evade re-building.
2450         (gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_rrspacing,
2451         gfc_conv_intrinsic_trim, gfc_conv_intrinsic_iargc): Use
2452         'build_int_cst' instead of converting 'integer_zero_node' or
2453         'integer_one_node' respectively.
2454
2455         * trans-intrinsic.c (gfc_conv_intrinsic_index,
2456         gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove
2457         'gfc'-prefix from local variable, remove dead code, use correct
2458         type when inserting argument.
2459
2460         * trans-intrinsic.c, trans-types.c: Update copyright years.
2461
2462 2005-01-16  Steven G. Kargl  <kargls@comcast.net>
2463
2464         PR 19168
2465         * resolve.c (check_case_overlap): Typo in comment.
2466         (validate_case_label_expr):  Fix up kinds of case values
2467         (resolve_select): Properly handle kind mismatches.
2468
2469 2004-01-16  Paul Brook  <paul@codesourcery.com>
2470
2471         PR fortran/17675
2472         * trans-common.c (translate_common): Remove duplicate function call.
2473         (finish_equivalences): Preserve alignment when biasing offsets.
2474
2475 2005-01-15  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de
2476
2477         * primary.c (check_digit): Call 'ISXDIGIT' instead of assuming
2478         ASCII-like character encoding.
2479
2480 2005-01-14  Steven G. Kargl  <kargls@comcast.net>
2481
2482         * resolve.c (compare_case): Cleanup.
2483
2484 2005-01-14  Steven G. Kargl  <kargls@comcast.net>
2485
2486         * resolve.c (compare_case): Give arguments correct type.
2487
2488 2005-01-13  Kazu Hirata  <kazu@cs.umass.edu>
2489
2490         * iresolve.c, trans-common.c, trans-types.c: Fix comment
2491         typos.
2492
2493 2005-01-09  Paul Brook  <paul@codesourcery.com>
2494
2495         PR fortran/17675
2496         * trans-common.c (current_common, current_offset): Remove.
2497         (create_common): Add head argument.
2498         (align_segment): New function.
2499         (apply_segment_offset): New function.
2500         (translate_common): Merge code from new_segment.  Handle alignment.
2501         (new_segment): Remove.
2502         (finish_equivalences): Ensure proper alignment.
2503
2504 2005-01-08  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
2505
2506         * trans-const.c: Don't include unused math.h.
2507
2508         * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl,
2509         gfc_conv_intrinsic_bound, gfc_conv_intrinsic_minmaxloc,
2510         gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_len): Remove
2511         trailing whitespace.
2512         (prepare_arg_info): Fix formatting, indenting and remove trailing
2513         whitespace.
2514         (gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_trim): Remove
2515         trailing whitespace.
2516
2517         * arith.c (arctangent2, gfc_arith_init_1, gfc_arith_done_1,
2518         gfc_constant_result, gfc_range_check, gfc_arith_power,
2519         eval_type_intrinsic0, eval_intrinsic_f2, gfc_real2real,
2520         gfc_real2complex, gfc_complex2int, gfc_complex2real,
2521         gfc_complex2complex): Fix whitespace issues.
2522         * check.c (must_be, type_check, numeric_check, int_or_real_check,
2523         logical_array_check, array_check, scalar_check, nonoptional_check,
2524         variable_check, dim_check, check_a_kind, gfc_check_a_ikind,
2525         gfc_check_a_xkind, gfc_check_abs, gfc_check_all_any,
2526         gfc_check_allocated, gfc_check_a_p, gfc_check_besn,
2527         gfc_check_btest, gfc_check_char, gfc_check_cmplx, gfc_check_count,
2528         gfc_check_cshift, gfc_check_dcmplx, gfc_check_dble,
2529         gfc_check_digits, gfc_check_dot_product, gfc_check_eoshift,
2530         gfc_check_fnum, gfc_check_g77_math1, gfc_check_huge, gfc_check_i,
2531         gfc_check_iand, gfc_check_ibclr, gfc_check_ibits, gfc_check_ibset,
2532         gfc_check_idnint, gfc_check_ieor, gfc_check_index, gfc_check_int,
2533         gfc_check_ior, gfc_check_ishft, gfc_check_ishftc, gfc_check_kind,
2534         gfc_check_lbound, gfc_check_logical, min_max_args,
2535         gfc_check_min_max_integer, gfc_check_min_max_real,
2536         gfc_check_min_max_double, gfc_check_matmul,
2537         gfc_check_minval_maxval, gfc_check_merge, gfc_check_nearest,
2538         gfc_check_pack, gfc_check_precision, gfc_check_radix,
2539         gfc_check_range, gfc_check_real, gfc_check_repeat,
2540         gfc_check_scale, gfc_check_scan, gfc_check_selected_real_kind,
2541         gfc_check_set_exponent): Fix formatting issues.
2542         (gfc_check_size, gfc_check_sign): Alphabetize function order,
2543         remove whitespace-only line.
2544         (gfc_check_fstat, gfc_check_fstat_sub, gfc_check_stat,
2545         gfc_check_stat_sub, gfc_check_transfer, gfc_check_transpose,
2546         gfc_check_ubound, gfc_check_unpack, gfc_check_verify, gfc_check_x,
2547         gfc_check_cpu_time, gfc_check_date_and_time, gfc_check_mvbits,
2548         gfc_check_random_number, gfc_check_random_seed,
2549         gfc_check_second_sub, gfc_check_system_clock,
2550         gfc_check_getcwd_sub, gfc_check_exit, gfc_check_flush,
2551         gfc_check_umask, gfc_check_umask_sub, gfc_check_unlink,
2552         gfc_check_unlink_sub): Fix formatting issues.
2553
2554 2005-01-08  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
2555
2556         * gfortran.h: Remove outdated comment.  Don't include stdio.h
2557         explicitly.
2558
2559 2005-01-06  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2560
2561         * gfortranspec.c (lang_specific_driver): Change year to 2005 in
2562         output of 'gfortran --version'.
2563
2564 2005-01-03  Steven G. Kargl  <kargls@comcast.net>
2565
2566         * arith.c: Add system.h; remove string.h
2567         * decl.c: Ditto
2568         * matchexp.c: Ditto
2569         * parse.c: Ditto
2570         * resolve.c: Ditto
2571         * st.c: Ditto
2572         * check.c: Remove stdlib.h and stdarg.h
2573         * error.c: Remove stdlib.h, stdarg.h, stdio.h, string.h
2574         * expr.c: Add system.h; remove stdarg.h, stdio.h, and string.h
2575         * f95-lang.c: Add system.h; remove stdio.h
2576         * interface.c: Add system.h; remove stdlib.h and string.h
2577         * intrinsic.c: Remove stdarg.h, stdio.h, and string.h
2578         * io.c: Remove string.h
2579         * simplify.c: Ditto
2580         * match.c: Remove stdarg.h and string.h
2581         * misc.c: Update copyright; add system.h; remove stdlib.h,
2582         string.h, and sys/stat.h
2583         * module.c: Add system.h; remove string.h, stdio.h, errno.h,
2584         unistd.h, and time.h
2585         * option.c: Remove string.h and stdlib.h
2586         * primary.c: Ditto
2587         * scanner.c: Update copyright; add system.h; remove stdlib.h,
2588         stdio.h, string.h, and strings.h
2589         * symbol.c: Add system.h; remove stdlib.h, stdio.h, and string.h
2590         * trans-array.c: Remove stdio.h and gmp.h
2591         * trans-const.c: Ditto
2592         * trans-expr.c: Ditto
2593         * trans-io.c: Ditto
2594         * trans-stmt.c: Ditto
2595         * trans.c: Ditto
2596         * trans-intrinsic.c: Remove stdio.h and string.h
2597
2598 2004-12-29  Steven G. Kargl  <kargls@comcast.net>
2599
2600         * gfortran.h (gfc_case): fix typo in comment.
2601
2602 2004-12-27  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2603
2604         * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Change to
2605         logical shift.  Call fold.  Remove 0-bit shift shortcut.
2606         (gfc_conv_intrinsic_ishftc): Convert first argument to at least
2607         4 bytes bits.  Convert 2nd and 3rd argument to 4 bytes.  Convert
2608         result if width(arg 1) < 4 bytes.  Call fold.
2609
2610         PR fortran/19032
2611         * trans-intrinsic.c (gfc_conv_intrinsic_mod): Update comment
2612         in front of function to match the standard.  Correct handling
2613         of MODULO.
2614
2615 2004-12-27  Andrew Pinski  <pinskia@physics.uc.edu>
2616
2617         * trans-expr.c (gfc_conv_cst_int_power): Only check for
2618         flag_unsafe_math_optimizations if we have a float type.
2619
2620 2004-12-23  Steven G. Kargl  <kargls@comcast.net>
2621
2622         * gfortran.texi: Fix typo.
2623
2624 2004-12-16  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2625
2626         * trans-intrinsic.c (build_fixbound_expr): Clarify comment, fix
2627         comment typo.
2628
2629 2004-12-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2630
2631         PR fortran/18993
2632         * match.c (gfc_match_if): Don't explicitly skip optional whitespace.
2633         (gfc_match_nullify): Make sure that ')' is in front of the end of
2634         statement.
2635
2636         * scanner.c (skip_fixed_comments): Fix typo in comment preceding
2637         function.
2638
2639 2004-12-14  Richard Henderson  <rth@redhat.com>
2640
2641         * gfortran.h (gfc_expr.function.name): Make const.
2642         (gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
2643         (gfc_get_string): Update prototype.
2644         * iresolve.c: Include tree.h.
2645         (string_node, HASH_SIZE, string_head, hash): Remove.
2646         (gfc_get_string): Use vsnprintf, get_identifier.
2647         (free_strings, gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
2648         * misc.c (gfc_init_1): Don't call gfc_iresolve_init_1.
2649         (gfc_done_1): Don't call gfc_iresolve_done_1.
2650         * module.c (mio_allocated_string): Take and return const char *,
2651         instead of modifying char**.
2652         (mio_expr): Update to match.
2653         * resolve.c (pure_function): Constify name argument.
2654         (resolve_function): Constify name.
2655         * trans-intrinsic.c (gfc_conv_intrinsic_function): Likewise.
2656
2657 2004-12-12  Richard Henderson  <rth@redhat.com>
2658
2659         * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
2660         gfc_resolve_cshift, gfc_resolve_dot_product, gfc_resolve_eoshift,
2661         gfc_resolve_matmul, gfc_resolve_maxloc, gfc_resolve_maxval,
2662         gfc_resolve_minloc, gfc_resolve_minval, gfc_resolve_pack,
2663         gfc_resolve_product, gfc_resolve_reshape, gfc_resolve_shape,
2664         gfc_resolve_spread, gfc_resolve_sum, gfc_resolve_transpose,
2665         gfc_resolve_unpack: Use PREFIX.
2666
2667 2004-12-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2668
2669         PR fortran/18869
2670         * match.c (gfc_match_common): Skip whitespace.
2671
2672 2004-12-12  Steven G. Kargl  <kargls@comcast.net>
2673
2674         PR fortran/16581
2675         * check.c (gfc_check_iand, gfc_check_ibclr, gfc_check_ibits,
2676         gfc_check_ibset, gfc_check_ieor, gfc_check_ior): Remove default
2677         integer kind check; Issue error for -std=f95 when needed.
2678         * intrinsic.c (add_functions): Change ieor from GFC_STD_GNU to
2679         GFC_STD_F95.
2680         * iresolve.c (gfc_resolve_iand, gfc_resolve_ieor, gfc_resolve_ior):
2681         Promote arguments to same kind.
2682
2683 2004-12-12  Steven G. Kargl  <kargls@comcast.net>
2684         Paul Brook  <paul@codesourcery.com>
2685
2686         PR fortran/16222
2687         * resolve.c (gfc_resolve_iterator_expr): New function.
2688         (gfc_resolve_iterator): Use it.  Add real_ok argument.  Convert
2689         start, end and stride to correct type.
2690         (resolve_code): Pass extra argument.
2691         * array.c (resolve_array_list): Pass extra argument.
2692         * gfortran.h (gfc_resolve): Add prototype.
2693         * trans-stmt.c (gfc_trans_do): Remove redundant type conversions.
2694         Handle real type iterators.
2695
2696 2004-12-11  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2697
2698         PR fortran/17175
2699         * iresolve.c (gfc_resolve_scale): Convert 'I' argument if not of
2700         same kind as C's 'int'.
2701         (gfc_resolve_set_exponent): Convert 'I' argument if not of kind 4.
2702
2703 2004-12-08  Richard Henderson  <rth@redhat.com>
2704
2705         * intrinsic.c (gfc_convert_type_warn): Propagate the input shape
2706         to the output expression.
2707         * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift): Suppress
2708         warning conversion.
2709         (gfc_resolve_reshape): Force convert SHAPE and ORDER parameters
2710         to index kind.
2711
2712 2004-12-08  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2713
2714         PR fortran/18826
2715         * resolve.c (resolve_code): Impose correct restrictions on
2716         assigned variable.
2717
2718         * decl.c (gfc_match_end): Use locus of END when eos is an error.
2719
2720 2004-12-02  Steven G. Kargl  <kargls@comcast.net>
2721         Paul Brook  <paul@codesourcery.com>
2722
2723         * check.c (gfc_check_flush, gfc_check_fnum): New functions.
2724         (gfc_check_fstat, gfc_check_fstat_sub): New functions.
2725         (gfc_check_stat, gfc_check_stat_sub): New functions.
2726         * gfortran.h (GFC_ISYM_FNUM,GFC_ISYM_FSTAT,GFC_ISYM_STAT): New symbols
2727         * intrinsic.c (add_functions,add_subroutines): Add flush, fnum,
2728         fstat, and stat to intrinsics symbol tables.
2729         * intrinsic.h (gfc_check_flush, gfc_resolve_stat_sub): Add prototypes.
2730         (gfc_resolve_fstat_sub, gfc_resolve_stat): Ditto.
2731         * iresolve.c (gfc_resolve_fnum, gfc_resolve_fstat): New functions.
2732         (gfc_resolve_stat, gfc_resolve_flush): New functions.
2733         (gfc_resolve_stat_sub,gfc_resolve_fstat_sub): New functions
2734         * trans-intrinsic.c (gfc_conv_intrinsic_function): Add new intrinsics.
2735
2736 2004-12-02  Steven G. Kargl  <kargls@comcast.net>
2737
2738         * intrinsic.c: Fix and add comments, fix function declarations
2739         (OPTIONAL,REQUIRED): New symbols
2740         (add_functions,add_subroutines): Use symbols
2741         (gmp.h): Remove unused include
2742
2743 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
2744
2745         * f95-lang.c, gfortranspec.c, trans-decl.c: Avoid ` as left quote
2746         in diagnostics.
2747
2748 2004-11-24  Steven Bosscher  <stevenb@suse.de>
2749
2750         * options.c (gfc_post_options): Don't clear flag_inline_functions.
2751
2752 2004-11-20  Steven G. Kargl  <kargls@comcast.net>
2753
2754         * check.c (gfc_check_getcwd_sub): Fix seg fault.
2755
2756         * check.c (gfc_check_exit,gfc_check_umask,gfc_check_umask_sub,
2757         gfc_check_unlink,gfc_check_unlink_sub): New functions
2758         * gfortran.h (GFC_ISYM_UMASK,GFC_ISYM_UNLINK): New symbols
2759         * intrinsic.c (add_functions,add_subroutines): Add umask, unlink,
2760         exit to intrinsics symbol tables.
2761         * intrinsic.h (gfc_check_umask,gfc_check_unlink,gfc_check_exit,
2762         gfc_check_umask_sub,gfc_check_unlink_sub,gfc_resolve_umask,
2763         gfc_resolve_unlink,gfc_resolve_exit,gfc_resolve_umask_sub,
2764         gfc_resolve_unlink_sub): Add and sort prototypes.
2765         * iresolve.c (gfc_resolve_umask,gfc_resolve_unlink,gfc_resolve_exit,
2766         gfc_resolve_umask_sub,gfc_resolve_unlink_sub): New functions
2767         * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbols
2768
2769 2004-11-16  Paul Brook  <paul@codesourcery.com>
2770
2771         PR fortran/13010
2772         * trans-array.c (gfc_trans_allocate_temp_array): Use gfc_get_dtype.
2773         (gfc_array_init_size, gfc_conv_expr_descriptor): Ditto.
2774         * trans-types.c (gfc_get_dtype): Accept array type rather than element
2775         type.
2776         (gfc_get_nodesc_array_type): Don't set GFC_TYPE_ARRAY_DTYPE.
2777         (gfc_get_array_type_bounds): Ditto.
2778         (gfc_get_derived_type): Recurse into derived type pointers.
2779         * trans-types.h (gfc_get_dtype): Add prototype.
2780         * trans.h (GFC_TYPE_ARRAY_DTYPE): Add comment.
2781
2782 2004-11-15  Paul Brook  <paul@codesourcery.com>
2783
2784         * trans-types.c (gfc_get_dtype): Remove obsolete TODO.
2785
2786 2004-11-10  Paul Brook  <paul@codesourcery.com>
2787
2788         PR fortran/18375
2789         * trans-expr.c (gfc_trans_subarray_assign): Free shape before ss.
2790         * trans-io.c (transfer_array_component): Ditto.
2791
2792 2004-11-10  Paul Brook  <paul@codesourcery.com>
2793
2794         * invoke.texi: Fix typo.
2795
2796 2004-11-08  Kazu Hirata  <kazu@cs.umass.edu>
2797
2798         * arith.c, array.c, decl.c, expr.c, f95-lang.c, gfortran.h,
2799         gfortranspec.c, interface.c, intrinsic.c, iresolve.c, match.c,
2800         module.c, parse.c, parse.h, primary.c, resolve.c, scanner.c,
2801         trans-array.c, trans-array.h, trans-expr.c, trans-intrinsic.c,
2802         trans-io.c, trans-stmt.c, trans.h: Fix comment formatting.
2803
2804 2004-11-06  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2805
2806         PR fortran/18023
2807         * io.c (resolve_tag): Tighten up exception for assigned FORMAT.
2808
2809 2004-11-06  Kazu Hirata  <kazu@cs.umass.edu>
2810
2811         * gfortranspec.c: Replace GNU CC with GCC.
2812
2813 2004-11-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2814
2815         * gfortranspec.c (lang_specific_driver): Change year to 2004.
2816
2817 2004-11-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2818
2819         PR fortran/18111
2820         *  trans-decl.c (create_function_arglist): Set DECL_ARTIFICIAL for
2821         hidden parameters.
2822
2823 2004-11-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2824
2825         PR fortran/15164
2826         * trans-decl.c (gfc_finish_var_decl): Don't declare arguments to
2827         module procedures as if they were module variables.
2828
2829 2004-11-03  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2830
2831         PR fortran/17535
2832         PR fortran/17583
2833         PR fortran/17713
2834         * module.c (write_symbol1): Set module_name for dummy arguments.
2835
2836 2004-11-02  Paul Brook  <paul@codesourcery.com>
2837
2838         * intrinsic.c (check_intrinsic_standard): Include error locus.
2839         Remove VLA.
2840         (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Pass
2841         locus to check_intrinsic_standard.
2842
2843 2004-10-31  Janne Blomqvist  <jblomqvi@cc.hut.fi>
2844
2845         PR fortran/17590
2846         * gfortran.h: Change GFC_STD_* flags to more appropriate
2847         ones. (struct gfc_intrinsic_isym): Add field for standard. (struct
2848         gfc_option_t): Add field for warning about use of nonstandard
2849         intrinsics.
2850         * intrinsic.c (add_sym): Add parameter for standard version, check
2851         this against current standard.
2852         (add_sym_0): Pass standard parameter to add_sym.
2853         (add_sym_1, add_sym_0s, add_sym_1s, add_sym_1m, add_sym_2): Ditto.
2854         (add_sym_2s, add_sym_3, add_sym_3ml, add_sym_3red, add_sym_3s): Ditto.
2855         (add_sym_4, add_sym_4s, add_sym_5, add_sym_5s): Ditto.
2856         (make_generic): Add parameter for standard, check this
2857         against currently selected standard.
2858         (add_functions, add_subroutines): Add parameter to tell which
2859         standard an intrinsic belongs to.
2860         (check_intrinsic_standard): New function.
2861         (gfc_intrinsic_func_interface): Add call to check_intrinsic_standard.
2862         (gfc_intrinsic_sub_interface): Ditto.
2863         * lang.opt: Add Wnonstd-intrinsics option.
2864         * options.c (gfc_init_options): Change to use new GFC_STD_* flags,
2865         init new warning.
2866         (set_Wall): Add warning about nonstd intrinsics.
2867         (gfc_handle_option): Change to use new GFC_STD_* flags,
2868         handle new warning.
2869         * invoke.texi: Update manual to include -Wnonstd-intrinsics.
2870
2871 2004-10-30  Andrew Pinski  <pinskia@physics.uc.edu>
2872
2873         * f95-lang.c (lang_tree_node): Add chain_next to be the TREE_CHAIN.
2874
2875 2004-10-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2876
2877         * simplify.c (twos_complement): Calculate mask in GMP arithmetic.
2878
2879 2004-10-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2880
2881         * trans.c (gfc_trans_code): Set global locus after recursing. Fix
2882         comment typo.
2883
2884 2004-10-30  Canqun Yang  <canqun@nudt.edu.cn>
2885
2886         * check.c (gfc_check_rand): Allow missing optional argument.
2887         (gfc_check_irand): Ditto.
2888         * intrinsic.c (add_functions): Set arg optional flag for {i,}rand.
2889
2890 2004-10-28  Scott Robert Ladd  <scott.ladd@coyotegulch.com>
2891
2892         PR fortran/13490, PR fortran/17912
2893         * gcc/fortran/gfortran.h: Added pedantic_min_int to gfc_integer_info
2894         * gcc/fortran/gfortran.h: Added ARITH_ASYMMETRIC to arith
2895         * gcc/fortran/arith.c: Added support for an "asymmetric integer"
2896         warning when compiling with pedantic.
2897         * gcc/fortran/arith.c: Set minimum integer values to reflect
2898         realities of two's complement signed integers. Added
2899         pedantic minimum.
2900
2901 2004-10-17  Andrew Pinski  <pinskia@physics.uc.edu>
2902
2903         * Make-lang.in (F95_ADDITIONAL_OBJS): Kill.
2904         (f951): Do not depend on F95_ADDITIONAL_OBJS and don't
2905         link it in.
2906
2907 2004-10-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2908
2909         * trans-decl.c (generate_local_decl): Simplify logic, fix comment
2910         typo.
2911         (gfc_generate_function_code): Fix formatting issue.
2912
2913 2004-10-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2914
2915         * module.c: Fix formatting issues.
2916
2917 2004-10-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2918
2919         * module.c (mio_interface_rest): Set where member of interface
2920         while loading.
2921
2922 2004-10-08  Andrew Pinski  <pinskia@physics.uc.edu>
2923
2924         PR fortran/17901
2925         * options.c (gfc_handle_option): Add break after handing the
2926         J/M option.
2927
2928 2004-10-08  Tobias Schlueter  <tobias.shclueter@physik.uni-muenchen.de>
2929
2930         * arith.c: Fix formatting issues.
2931
2932 2004-10-07  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2933
2934         PR fortran/17676
2935         * resolve.c (resolve_operator): Use correct operator name in message.
2936
2937 2004-10-07  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2938
2939         * primary.c (match_boz_constant): Allow kind parameter suffixes.
2940         Move standard warning further to the front.
2941
2942 2004-10-07  Kazu Hirata  <kazu@cs.umass.edu>
2943
2944         * trans-stmt.c: Fix a comment typo.
2945
2946 2004-10-07  Paul Brook  <paul@codesourcery.com>
2947
2948         PR fortran/17678
2949         * trans-array.c (gfc_trans_deferred_array): Leave use associated
2950         variables alone.
2951
2952 2004-10-06  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2953
2954         PR fortran/17568
2955         * simplify.c (twos_complement): New function.
2956         (gfc_simplify_ishft, gfc_simplify_ishftc): Revise.
2957
2958         * simplify.c (gfc_simplify_abs): Use mpfr_hypot for CABS.
2959
2960 2004-10-06  Paul Brook  <paul@codesourcery.com>
2961
2962         * trans-stmt.c (gfc_trans_simple_do): New function.
2963         (gfc_trans_do): Use it.  Evaluate iteration bounds before entering
2964         loop.  Update comments.
2965
2966 2004-10-04  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2967
2968         PR fortran/17283
2969         * iresolve.c (gfc_resolve_pack): Choose function depending if mask
2970         is scalar.
2971
2972         PR fortran/17631
2973         * intrinsic.c (add_sym_5): Remove.
2974         (add_subroutines): Add resolution function for MVBITS.
2975         * intrinsic.h (gfc_resolve_mvbits): Declare resolution function for
2976         MVBITS
2977         * iresolve.c (gfc_resolve_mvbits): New function.
2978         (gfc_resolve_random_number): Remove empty line at end of function.
2979
2980         * trans-const.c (gfc_build_cstring_const): New function.
2981         (gfc_init_cst): Use new function.
2982         * trans-const.h (gfc_build_cstring_const): Add prototype.
2983         * trans-io.c (set_string, set_error_locus): Use new function.
2984         * trans-stmt.c (gfc_trans_goto): Use new function.
2985
2986         PR fortran/17708
2987         * parse.c (accept_statement): Don't treat END DO like END IF and
2988         END SELECT.
2989         (parse_do_block): Generate possible END DO label inside END DO
2990         block.
2991
2992         PR fortran/17776
2993         * check.c (gfc_check_system_sub): New function.
2994         * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SYSTEM.
2995         * intrinsic.c (add_functions): Add 'system'.
2996         (add_subroutines): Add 'system'.
2997         * intrinsic.h (gfc_check_etime_sub, gfc_check_getcwd_sub):
2998         Move prototypes to other suborutines.
2999         (gfc_check_system_sub, gfc_resolve_system, gfc_resolve_system_sub):
3000         Add prototype.
3001         (gfc_resolve_system_clock): Fix formatting of prototype.
3002         * iresolve.c (gfc_resolve_system, gfc_resolve_system_sub): New
3003         functions.
3004         * trans-intrinsic.c (gfc_conv_intrinsic_function): Deal with
3005         GFC_ISYM_SYSTEM.
3006
3007 2004-10-04  Erik Schnetter  <schnetter@aei.mpg.de>
3008
3009         * scanner.c (preprocessor_line): Accept preprocessor lines without
3010         file names.  Check file names for closing quotes.  Handle escaped
3011         quotes in file names.
3012
3013 2004-10-04  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3014         Paul Brook  <paul@codesourcery.com>
3015
3016         * trans-array.c (gfc_conv_expr_descriptor): Check for substriungs.
3017         Use gfc_get_expr_charlen.
3018         * trans-expr.c (gfc_get_expr_charlen): New function.
3019         * trans.h (gfc_get_expr_charlen): Add prototype.
3020
3021 2004-10-04  Kazu Hirata  <kazu@cs.umass.edu>
3022
3023         * trans-intrinsic.c: Fix a comment typo.
3024
3025 2004-10-03  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3026
3027         * simplify.c (range_check): Remove blank line at beginning of function.
3028         (gfc_simplify_dint): Same at end of function.
3029         (gfc_simplify_exponent, gfc_simplify_fraction): Simplify calculations.
3030         (gfc_simplify_bound): Fix indentation.
3031         (gfc_simplify_log10): Simplify calculation.
3032         (gfc_simplify_min, gfc_simplify_max): Remove blank line at beginning
3033         of function.
3034         (gfc_simplify_nearest): Same at end of function.
3035         (gfc_simplify_nint, gfc_simplify_idnint): Same at beginning of
3036         function.
3037         (gfc_simplify_rrspacing, gfc_simplify_set_exponent,
3038         gfc_simplify_spacing): Simplify calulations.
3039
3040 2004-10-03  Feng Wang  <fengwang@nudt.edu.cn>
3041
3042         * trans-intrinsic.c: Fix comments on spacing and rrspacing
3043         (gfc_conv_intrinsic_rrspacing): Add fold on constant trees.
3044
3045 2004-10-01  Jan Hubicka  <jh@suse.cz>
3046
3047         * f95-lang.c (gfc_expand_function): Update call of
3048         tree_rest_of_compilation.
3049         * trans-decl.c (gfc_generate_constructors): Likewise.
3050
3051 2004-09-26  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3052
3053         * trans-intrinsic.c: Comment fixes.
3054
3055 2004-09-25  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3056
3057         * decl.c (add_init_expr_to_sym, variable_decl): Comment fixes.
3058
3059 2004-09-24  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3060
3061         * trans-types.c (gfc_return_by_reference): Remove superfluous
3062         assertion.
3063
3064         * intrinsic.h (gfc_resolve_getcwd): Update prototype.
3065         * iresolve.c (gfc_resolve_getcwd): Add second argument to function.
3066
3067         PR fortran/17615
3068         * trans-expr.c (gfc_trans_arrayfunc_assign): Look at resolved
3069         function to determine return type.
3070
3071 2004-09-20  Jan Hubicka  <jh@suse.cz>
3072
3073         * trans-decl.c (build_entry_thunks): Finalize the function; do not lower
3074         tree.
3075         (gfc_generate_function_code): Likewise.
3076
3077 2004-09-20  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3078
3079         PR fortran/15957
3080         * simplify.c (gfc_simplify_reshape): Set shape of return value
3081         correctly.
3082
3083 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
3084             Zack Weinberg  <zack@codesourcery.com>
3085
3086         * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class
3087         enumeration constants.
3088
3089 2004-09-17  Paul Brook  <paul@codesourcery.com>
3090
3091         * gfortran.h (struct gfc_linebuf): Don't use C99 empty arrays.
3092         (gfc_linebuf_header_size): Define.
3093         * scanner.c (load_file): Use it.
3094
3095 2004-09-16  Kazu Hirata  <kazu@cs.umass.edu>
3096
3097         * array.c, data.c, decl.c, dependency.c, error.c, f95-lang.c,
3098         interface.c, intrinsic.c, io.c, misc.c, module.c, parse.h,
3099         resolve.c, scanner.c, trans-array.c, trans-array.h,
3100         trans-common.c, trans-const.h, trans-decl.c, trans-expr.c,
3101         trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
3102         trans.h: Fix comment typos.  Follow spelling conventions.
3103
3104 2004-09-16  Victor Leikehman  <lei@il.ibm.com>
3105
3106         PR/15364
3107         * trans-io.c (transfer_array_component): New function.
3108         (transfer_expr): For array fields, call transfer_array_component.
3109
3110 2004-09-16  Kazu Hirata  <kazu@cs.umass.edu>
3111
3112         * gfortran.texi: Fix a typo.
3113
3114 2004-09-15  Aaron W. LaFramboise  <aaronavay62@aaronwl.com>
3115
3116         * parse.c (eof_buf): Rename eof to eof_buf.
3117         (unexpected_eof): Same.
3118         (gfc_parse_file): Same.
3119
3120 2004-09-15  Steven G. Kargl  <kargls@comcast.net>
3121
3122         * check.c (gfc_check_getcwd_sub): New function.
3123         * gfortran.h (GFC_ISYM_GETCWD): New symbol.
3124         * intrinsic.c (add_functions): Add function definition;
3125         Use symbol.
3126         * intrinsic.c (add_subroutines): Add subroutine definitions.
3127         * intrinsic.h: Add prototypes.
3128         * iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub):
3129         New functions.
3130         * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol.
3131
3132 2004-09-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3133
3134         PR fortran/16485
3135         * module.c (write_symbol): Don't fill in module name here.
3136         (write_symbol0): Fill in here instead.
3137
3138 2004-09-14  Kazu Hirata  <kazu@cs.umass.edu>
3139
3140         * data.c, decl.c, f95-lang.c, gfortran.h, match.c,
3141         trans-array.c, trans-common.c, trans-expr.c,
3142         trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.h: Fix
3143         comment typos.  Follow spelling conventions.
3144
3145 2004-09-09  Paul Brook  <paul@codesourcery.com>
3146
3147         * scanner.c (get_file): Add ATTRIBUTE_UNUSED.
3148
3149 2004-09-08  Paul Brook  <paul@codesourcery.com>
3150
3151         * array.c: Don't include assert.h.
3152         * data.c: Don't include assert.h.  Replace assert and abort with
3153         gcc_assert and gcc_unreachable.
3154         * dependency.c: Ditto.
3155         * f95-lang.c: Ditto.
3156         * iresolve.c: Ditto.
3157         * resolve.c: Ditto.
3158         * simplify.c: Ditto.
3159         * symbol.c: Ditto.
3160         * trans-array.c: Ditto.
3161         * trans-common.c: Ditto.
3162         * trans-const.c: Ditto.
3163         * trans-decl.c: Ditto.
3164         * trans-expr.c: Ditto.
3165         * trans-intrinsic.c: Ditto.
3166         * trans-io.c: Ditto.
3167         * trans-stmt.c: Ditto.
3168         * trans-types.c: Ditto.
3169         * trans.c: Ditto.
3170
3171 2004-09-07  Per Bothner  <per@bothner.com>
3172         Paul Brook  <paul@codesourcery.com>
3173
3174         * error.c (show_locus): Handle mapped locations.
3175         * f95-lang.c (gfc_be_parse_file): Initialize mapped locations.
3176         * gfortran.h: Include input.h.
3177         (struct gfc_linebuf): Use source_location.
3178         * scanner.c (get_file): Initialize linemap.
3179         (preprocessor_line): Pass extra argument to get_file.
3180         (load_file): Ditto.  Setup linemap.
3181         (gfc_new_file): Handle mapped locations.
3182         * trans-common.c (build_field, build_equiv_decl, build_common_decl):
3183         Set decl source locations.
3184         (gfc_trans_common): Set blank common block location.
3185         * trans-decl.c (gfc_set_decl_location): New function.
3186         (gfc_get_label_decl, gfc_get_symbol_decl): Use it.
3187         (trans_function_start): Move call to gfc_set_backend_locus..
3188         (build_function_decl): ... to here.
3189         (build_entry_thunks): Set and restore the backend locus.
3190         (gfc_generate_constructors): Remove excess arguments to
3191         init_function_start.
3192         (gfc_generate_block_data): Add comments.  Set the decl locus.
3193         * trans-io.c (set_error_locus): Handle mapped locations.
3194         * trans.c (gfc_get_backend_locus, gfc_get_backend_locus): Ditto.
3195         (gfc_trans_code): Use SET_EXPR_LOCATION.
3196         (gfc_generate_code): Override the location of the new symbol.
3197         * trans.h (gfc_set_decl_location): Add prototype.
3198
3199 2004-08-31  Paul Brook  <paul@codesourcery.com>
3200
3201         * trans-types.c (gfc_type_for_mode): Return NULL for unknown modes.
3202
3203 2004-09-01  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3204
3205         PR fortran/15327
3206         * trans-intrinsic.c (gfc_conv_intrinsic_merge): Do the right thing for
3207         strings.
3208
3209 2004-09-01  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3210
3211         PR fortran/16400
3212         PR fortran/16404
3213         (port from g95)
3214         * resolve.c (resolve_transfer): New function.
3215         (resolve_code): Call resolve_transfer in case of EXEC_TRANSFER.
3216
3217 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3218
3219         PR fortran/16579
3220         * trans-types.c (gfc_init_types): Make gfc_character1_type_node an
3221         unsigned char.
3222
3223 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3224
3225         * CONTRIB, NEWS, README, TODO: Remove obsolete files.
3226
3227 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3228
3229         PR fortran/17244
3230         * trans-types.c (gfc_return_by_reference): Remove TODO error,
3231         add comment pointing out possible issue WRT compatibility with g77.
3232
3233 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3234
3235         * trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace
3236         all occurences of 'gfc_strlen_type_node' by
3237         'gfc_charlen_type_node'.
3238         * trans-types.h: Same. Also update comment accordingly.
3239
3240 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3241
3242         * primary.c: Update copyright boilerplate to say GCC.
3243         * f95-lang.c: Change initial comment to say gfortran.
3244
3245 2004-08-31  Paul Brook  <paul@codesourcery.com>
3246
3247         * trans-types.h: Add comments.
3248         (intmax_type_node, string_type_node, const_string_type_node): Remove.
3249
3250 2004-08-30  Richard Henderson  <rth@redhat.com>
3251
3252         * Make-lang.in (fortran/f95-lang.o): Update dependencies.
3253         (fortran/trans-decl.o, fortran/trans-types.o): Likewise.
3254         * gfortran.h (gfc_integer_info): Add c_char, c_short, c_int,
3255         c_long, c_long_long.
3256         (gfc_logical_info): Add c_bool.
3257         (gfc_real_info): Add mode_precision, c_float, c_double, c_long_double.
3258         * trans-array.c (gfc_array_allocate): Use TYPE_PRECISION
3259         rather than gfc_int[48]_type_node for allocate choice.
3260         * trans-decl.c (gfc_build_intrinsic_function_decls): Cache
3261         local copies of some kind type nodes.
3262         (gfc_build_builtin_function_decls): Likewise.
3263         * trans-expr.c (gfc_conv_power_op): Likewise.
3264         * trans-intrinsic.c (gfc_conv_intrinsic_index,
3265         gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify,
3266         gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Likewise.
3267         * trans-stmt.c (gfc_trans_pause, gfc_trans_stop,
3268         gfc_trans_character_select, gfc_trans_allocate): Likewise.
3269         * trans-io.c (gfc_pint4_type_node): Move into ...
3270         (gfc_build_io_library_fndecls): ... here.  Cache local copies of
3271         some kind type nodes.
3272         * trans-types.c (gfc_type_nodes): Remove.
3273         (gfc_character1_type_node, gfc_strlen_type_node): New.
3274         (gfc_integer_types, gfc_logical_types): New.
3275         (gfc_real_types, gfc_complex_types): New.
3276         (gfc_init_kinds): Fill in real mode_precision.
3277         (gfc_build_int_type, gfc_build_real_type): New.
3278         (gfc_build_complex_type, gfc_build_logical_type): New.
3279         (c_size_t_size): New.
3280         (gfc_init_types): Loop over kinds.
3281         (gfc_get_int_type, gfc_get_real_type): Use gfc_validate_kind.
3282         (gfc_get_complex_type, gfc_get_logical_type): Likewise.
3283         (gfc_get_character_type_len): Likewise.
3284         (gfc_type_for_size): Loop over kinds; use a reduced set of
3285         unsigned type nodes.
3286         (gfc_type_for_mode): Loop over kinds.
3287         (gfc_signed_or_unsigned_type): Use gfc_type_for_size.
3288         (gfc_unsigned_type, gfc_signed_type): Use gfc_signed_or_unsigned_type.
3289         * trans-types.h (F95_INT1_TYPE, F95_INT2_TYPE, F95_INT4_TYPE,
3290         F95_INT8_TYPE, F95_INT16_TYPE, F95_REAL4_TYPE, F95_REAL8_TYPE,
3291         F95_REAl16_TYPE, F95_COMPLEX4_TYPE, F95_COMPLEX8_TYPE,
3292         F95_COMPLEX16_TYPE, F95_LOGICAL1_TYPE, F95_LOGICAL2_TYPE,
3293         F95_LOGICAL4_TYPE, F95_LOGICAL8_TYPE, F95_LOGICAL16_TYPE,
3294         F95_CHARACTER1_TYPE, NUM_F95_TYPES, gfc_type_nodes,
3295         gfc_int1_type_node, gfc_int2_type_node, gfc_int4_type_node,
3296         gfc_int8_type_node, gfc_int16_type_node, gfc_real4_type_node,
3297         gfc_real8_type_node, gfc_real16_type_node, gfc_complex4_type_node,
3298         gfc_complex8_type_node, gfc_complex16_type_node,
3299         gfc_logical1_type_node, gfc_logical2_type_node,
3300         gfc_logical4_type_node, gfc_logical8_type_node,
3301         gfc_logical16_type_node, gfc_strlen_kind): Remove.
3302         (gfc_character1_type_node): Turn in to a variable.
3303         (gfc_strlen_type_node): Likewise.
3304
3305 2004-08-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3306
3307         * gfortran.h (gfc_namespace): Add new field is_block_data.
3308         * parse.c (accept_statement): Remove special handling for BLOCK DATA.
3309         (parse_block_data): Record BLOCK DATA name, set is_block_data field.
3310         * trans.c (gfc_generate_code): Handle BLOCK DATA units.
3311         * trans.h (gfc_generate_block_data): Add prototype.
3312         * trans-decl.c (gfc_generate_block_data): New function.
3313
3314 2004-08-29  Richard Henderson  <rth@redhat.com>
3315
3316         * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_export.
3317         * trans-types.c (gfc_init_kinds): Reject integer kinds larger
3318         than two HOST_WIDE_INT.
3319
3320 2004-08-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3321
3322         PR fortran/13910
3323         * decl.c (free_variable, free_value, gfc_free_data, var_list,
3324         var_element, top_var_list, match_data_constant, top_val_list,
3325         gfc_match_data): Move here from match.c.
3326         (match_old_style_init): New function.
3327         (variable_decl): Match old-style initialization.
3328         * expr.c (gfc_get_variable_expr): New function.
3329         * gfortran.h (gfc_get_variable_expr): Add prototype.
3330         * gfortran.texi: Start documentation for supported extensions.
3331         * match.c: Remove the functions moved to decl.c.
3332         * match.h (gfc_match_data): Move prototype to under decl.c.
3333         * symbol.c (gfc_find_sym_tree, gfc_find_symbol): Add/correct
3334         comments.
3335
3336 2004-08-29  Steven G. Kargl  <kargls@comcast.net>
3337         Paul Brook  <paul@codesourcery.com>
3338
3339         * check.c (gfc_check_besn, gfc_check_g77_math1): New functions.
3340         * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Define.
3341         (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
3342         (build_builtin_fntypes): New function.
3343         (gfc_init_builtin_functions): Use it.
3344         * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_{J,Y}{0,1,N}
3345         and GFC_ISYM_ERF{,C}.
3346         (gfc_c_int_kind): Declare.
3347         * intrinsic.c (add_functions): Add [d]bes* and [d]erf*.
3348         * intrinsic.h (gfc_check_besn, gfc_check_g77_math1, gfc_resolve_besn,
3349         gfc_resolve_g77_math1): Add prototypes.
3350         * resolve.c (gfc_resolve_besn, gfc_resolve_g77_math1): New functions.
3351         * mathbuiltins.def: Add comment.  Change third argument.  Use
3352         DEFINE_MATH_BUILTIN_C.  Add bessel and error functions.
3353         * trans-intrinsic.c (BUILT_IN_FUNCTION): Define.
3354         (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
3355         * trans-types.c (gfc_c_int_kind): Declare.
3356         (gfc_init_kinds): Set it.
3357
3358 2004-08-29  Steven G. Kargl  <kargls@comcast.net>
3359         Paul Brook  <paul@codesourcery.com>
3360
3361         * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
3362         (gfc_check_f, gfc_simplify_f): Add f0.
3363         * intrinsic.c (do_check): Call f0.  Flatten.
3364         (add_sym_0): Fix prototype.  Set f0.
3365         (add_functions): Add getgid, getgid and getuid.
3366         (resolve_intrinsic): Remove obsolete comment.
3367         (do_simplify): Call f0.
3368         * intrinsic.h (gfc_resolve_getgid, gfc_resolve_getpid,
3369         gfc_resolve_getuid): Add prototypes.
3370         * iresolve.c (gfc_resolve_getgid, gfc_resolve_getpid,
3371         gfc_resolve_getuid): New functions.
3372         * trans-intrinsic.c (gfc_conv_intrinsic_function): Handle
3373         GFC_ISYM_GET?ID.
3374
3375 2004-08-28  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3376
3377         * error.c (gfc_error_init_1): Remove blank line in front of
3378         function body. Add missing blank.
3379         (gfc_buffer_error, error_char, error_string): Remove blank line in
3380         front of function body.
3381         (show_locus): Add comma in comment.
3382         (gfc_clear_warning, gfc_warning_check, gfc_clear_error,
3383         gfc_push_error, gfc_pop_error): Remove blank line in front of
3384         function body.
3385         (gfc_get_errors): Typo fix in comment in front of function. Remove
3386         blank line in front of function body.
3387
3388 2004-08-27  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3389
3390         * gfortran.h (gfc_default_*_kind): Remove prototypes, add extern
3391         variable declaration of same name.
3392         * arith.c, check.c, decl.c, dump_parse_tree.c, expr.c,
3393         intrinsic.c, io.c, iresolve.c, match.c, options.c, primary.c,
3394         resolve.c, simplify.c, symbol.c, trans-const.c, trans-io.c:
3395         Replace all calls to gfc_default_*_kind with variable accesses.
3396         * trans-types.c: Same as above.
3397         (gfc_default_*_kind_1): Rename to gfc_default_*_kind, remove
3398         static qualifier. Replace all occurences.
3399         (gfc_default_*_kind): Remove functions.
3400
3401 2004-08-26  Richard Henderson  <rth@redhat.com>
3402
3403         * arith.c: Include system.h, not real system headers.
3404         (MPZ_NULL, MPF_NULL, DEF_GFC_INTEGER_KIND, DEF_GFC_LOGICAL_KIND,
3405         DEF_GFC_REAL_KIND, GFC_SP_KIND, GFC_SP_PREC, GFC_SP_EMIN, GFC_SP_EMAX,
3406         GFC_DP_KIND, GFC_DP_PREC, GFC_DP_EMIN, GFC_DP_EMAX, GFC_QP_KIND,
3407         GFC_QP_PREC, GFC_QP_EMIN, GFC_QP_EMAX): Remove.
3408         (gfc_integer_kinds, gfc_logical_kinds, gfc_real_kinds,
3409         gfc_index_integer_kind, gfc_default_integer_kind,
3410         gfc_default_real_kind,gfc_default_double_kind,
3411         gfc_default_character_kind, gfc_default_logical_kind,
3412         gfc_default_complex_kind, validate_integer, validate_real,
3413         validate_logical, validate_character,
3414         gfc_validate_kind): Move to trans-types.c.
3415         (gfc_set_model_kind): Use gfc_validate_kind.
3416         (gfc_set_model): Just copy the current precision to default.
3417         (gfc_arith_init_1): Use mpfr precision 128 for integer setup.
3418         * f95-lang.c (gfc_init_decl_processing): Invoke gfc_init_kinds.
3419         * gfortran.h: Update file commentary.
3420         * trans-types.c (MAX_INT_KINDS, MAX_REAL_KINDS): New.
3421         (gfc_default_integer_kind_1, gfc_default_real_kind_1,
3422         gfc_default_double_kind_1, gfc_default_character_kind_1,
3423         gfc_default_logical_kind_1, gfc_default_complex_kind_1): New.
3424         (gfc_init_kinds): New.
3425         (gfc_init_types): Don't set gfc_index_integer_kind here.
3426         * trans-types.h (gfc_init_kinds): Declare.
3427         * doc/invoke.texi: Clarify DOUBLE PRECISION behaviour wrt -r8.
3428
3429 2004-08-26  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3430
3431         * check.c (gfc_check_atan2): New function.
3432         * intrinsic.c (add_functions): Use gfc_check_atan2 for ATAN2
3433         * intrinsic.h (gfc_check_atan2): Add prototype.
3434
3435 2004-08-25  Richard Henderson  <rth@redhat.com>
3436
3437         * arith.c (gfc_validate_kind): Add may_fail argument; abort if
3438         false and we don't validate the kind.
3439         (gfc_check_integer_range, gfc_check_real_range): Update to match.
3440         * check.c (kind_check): Likewise.
3441         * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Likewise.
3442         (match_char_spec, match_logical_spec): Likewise.
3443         * gfortran.h (gfc_validate_kind): Likewise.
3444         * options.c (gfc_handle_option): Likewise.
3445         * primary.c (match_integer_constant, match_real_constant,
3446         match_string_constant, match_logical_constant,
3447         match_const_complex_part): Likewise.
3448         * simplify.c (get_kind, gfc_simplify_bit_size, gfc_simplify_digits,
3449         gfc_simplify_epsilon, gfc_simplify_huge, gfc_simplify_ibclr,
3450         gfc_simplify_ibset, gfc_simplify_ishft, gfc_simplify_ishftc,
3451         gfc_simplify_maxexponent, gfc_simplify_minexponent,
3452         gfc_simplify_nearest, gfc_simplify_not, gfc_simplify_precision,
3453         gfc_simplify_radix, gfc_simplify_range, gfc_simplify_rrspacing,
3454         gfc_simplify_scale, gfc_simplify_spacing, gfc_simplify_tan,
3455         gfc_simplify_tiny): Likewise.
3456         * trans-intrinsic.c (gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod,
3457         gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
3458         prepare_arg_info): Likewise.
3459
3460 2004-08-25  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3461
3462         * expr.c (gfc_check_assign): Add comment. Add new warning.
3463         * trans-expr.c (gfc_conv_function_call): Correctly dereference
3464         result of pointer valued function when not in pointer assignment.
3465
3466 2004-08-25  Paul Brook  <paul@codesourcery.com>
3467
3468         * config-lang.in: Remove dead commented line.
3469         * module.c: Replace g95 with gfortran in comment.
3470
3471 2004-08-25  Paul Brook  <paul@codesourcery.com>
3472
3473         PR fortran/17190
3474         * arith.c (gfc_mpfr_to_mpz): Workaround mpfr bug.
3475
3476 2004-08-25  Paul Brook  <paul@codesourcery.com>
3477
3478         PR fortran/17144
3479         * trans-array.c (gfc_trans_allocate_temp_array): Remove
3480         string_length argument.
3481         (gfc_trans_array_ctor_element): New function.
3482         (gfc_trans_array_constructor_subarray): Use it.
3483         (gfc_trans_array_constructor_value): Ditto.  Handle constant
3484         character arrays.
3485         (get_array_ctor_var_strlen, get_array_ctor_strlen): New functions.
3486         (gfc_trans_array_constructor): Use them.
3487         (gfc_add_loop_ss_code): Update to new gfc_ss layout.
3488         (gfc_conv_ss_descriptor): Remember section string length.
3489         (gfc_conv_scalarized_array_ref): Ditto.  Remove dead code.
3490         (gfc_conv_resolve_dependencies): Update to new gfc_ss layout.
3491         (gfc_conv_expr_descriptor): Ditto.
3492         (gfc_conv_loop_setup): Ditto.  Spelling fixes.
3493         * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
3494         * trans-const.c (gfc_conv_constant):  Update to new gfc_ss layout.
3495         * trans-expr.c (gfc_conv_component_ref): Turn error into ICE.
3496         (gfc_conv_variable): Set string_length from section.
3497         (gfc_conv_function_call): Remove extra argument.
3498         (gfc_conv_expr, gfc_conv_expr_reference): Update to new gfc_ss layout.
3499         * trans-types.c (gfc_get_character_type_len): New function.
3500         (gfc_get_character_type): Use it.
3501         (gfc_get_dtype): Return zero for internal types.
3502         * trans-types.h (gfc_get_character_type_len): Add prototype.
3503         * trans.h (struct gfc_ss): Move string_length out of union.
3504
3505 2004-08-25  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3506
3507         * trans.h (build2_v, build3_v): New macros.
3508         (build_v): Remove.
3509         * f95-lang.c (gfc_truthvalue_conversion): Use build2 instead of
3510         build.
3511         * trans-array.c (gfc_conv_descriptor_data,
3512         gfc_conv_descriptor_offset, gfc_conv_descriptor_dimension,
3513         gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
3514         gfc_conv_descriptor_ubound, gfc_trans_allocate_array_storage,
3515         gfc_trans_allocate_temp_array,
3516         gfc_trans_array_constructor_subarray,
3517         gfc_trans_array_constructor_value, gfc_conv_array_index_ref,
3518         gfc_trans_array_bound_check, gfc_conv_array_index_offset,
3519         gfc_conv_scalarized_array_ref, gfc_conv_array_ref,
3520         gfc_conv_array_ref, gfc_trans_preloop_setup,
3521         gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
3522         gfc_conv_loop_setup, gfc_array_init_size,
3523         gfc_conv_array_initializer, gfc_trans_array_bounds,
3524         gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
3525         gfc_conv_expr_descriptor, gfc_conv_array_parameter,
3526         gfc_trans_deferred_array): Use buildN and buildN_v macros instead
3527         of build and build_v as appropriate.
3528         * trans-common.c (create_common): Same.
3529         * trans-decl.c (gfc_trans_auto_character_variable,
3530         gfc_trans_entry_master_switch, gfc_generate_function_code): Same.
3531         * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
3532         gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
3533         gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
3534         gfc_conv_expr_op, gfc_conv_function_call,
3535         gfc_trans_structure_assign): Same.
3536         * trans-intrinsic.c (build_fixbound_expr, build_round_expr,
3537         gfc_conv_intrinsic_aint, gfc_conv_intrinsic_bound,
3538         gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
3539         gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
3540         gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_minmax,
3541         gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
3542         gfc_conv_intrinsic_arith, gfc_conv_intrinsic_minmaxloc,
3543         gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
3544         gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_singlebitop,
3545         gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
3546         gfc_conv_intrinsic_merge, gfc_conv_intrinsic_strcmp,
3547         gfc_conv_allocated, gfc_conv_associated, prepare_arg_info,
3548         gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
3549         gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat,
3550         gfc_conv_intrinsic_iargc): Same.
3551         * trans-io.c (set_parameter_value, set_parameter_ref, set_string,
3552         set_flag, add_case, io_result, transfer_namelist_element,
3553         transfer_expr): Same.
3554         * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_if_1,
3555         gfc_trans_arithmetic_if, gfc_trans_do, gfc_trans_do_while,
3556         gfc_trans_integer_select, gfc_trans_logical_select,
3557         gfc_trans_character_select, gfc_trans_forall_loop,
3558         gfc_trans_nested_forall_loop, gfc_do_allocate,
3559         generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
3560         compute_inner_temp_size, compute_overall_iter_number,
3561         allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
3562         gfc_trans_forall_1, gfc_evaluate_where_mask,
3563         gfc_trans_where_assign, gfc_trans_allocate): Same.
3564         * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Same.
3565         * trans.c (gfc_add_modify_expr, gfc_finish_block,
3566         gfc_build_array_ref, gfc_build_function_call,
3567         gfc_trans_runtime_check): Same.
3568
3569 2004-08-25  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3570
3571         * trans-const.c (gfc_conv_mpz_to_tree): Change call to
3572         build_int_cst to build_int_cst_wide in accordance to Nathan's
3573         previous patch.
3574
3575 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
3576
3577         * trans-array.c (gfc_trans_array_constructor_value): Adjust
3578         build_int_cst calls.
3579         * trans-const.c (gfc_build_string_const, gfc_init_constants,
3580         gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise.
3581         * trans-decl.c (gfc_get_symbol_decl, build_entry_thunks,
3582         gfc_trans_entry_master_switch): Likewise.
3583         * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
3584         gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
3585         * trans-io.c (add_case, set_error_locus,
3586         transfer_namelist_element, transfer_expr): Likewise.
3587         * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
3588         gfc_trans_stop, gfc_trans_character_select): Likewise.
3589         * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
3590         * trans.c (gfc_trans_runtime_check): Likewise.
3591
3592 2004-08-24  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3593
3594         * trans-decl.c, trans-types.c: Add and remove blank lines as
3595         required.
3596
3597 2004-08-24  Richard Henderson  <rth@redhat.com>
3598
3599         * trans-const.c (gfc_conv_mpz_to_tree): Fix 64-bit shift warning.
3600
3601 2004-08-24  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3602
3603         * resolve.c (merge_argument_lists): Revert unintentionally
3604         committed change.
3605
3606 2004-08-24  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3607
3608         * trans-decl.c (build_function_decl): Fix spelling in comment.
3609         (build_entry_thunks): Remove code with no function.
3610         (gfc_build_intrinsic_function_decls): Remove empty line.
3611
3612         * resolve.c (resolve_entries): Fix a bunch of comment typos.
3613
3614 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
3615
3616         * f95-lang.c (gfc_init_decl_processing): Adjust
3617         build_common_tree_nodes call.
3618
3619 2004-08-24  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3620
3621         * trans-types.c: Spelling and formatting fixes.
3622
3623 2004-08-23  Richard Henderson  <rth@redhat.com>
3624
3625         * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_getlimbn instead
3626         of going through an intermediate string.  Fix 32/64 int/long bug.
3627
3628 2004-08-23  Eric Christopher  <echristo@redhat.com>
3629
3630         * trans-types.c (gfc_type_for_mode): Remove VECTOR_TYPE_SUPPORTED_P
3631         usage. Use build_vector_type_for_mode for vector types.
3632
3633 2004-08-22  Richard Henderson  <rth@redhat.com>
3634
3635         PR 13465
3636         * data.c (find_con_by_offset): Search ordered list; handle
3637         elements with repeat counts.
3638         (gfc_assign_data_value_range): New.
3639         * gfortran.h (struct gfc_data_value): Make repeat unsigned.
3640         (gfc_assign_data_value_range): Declare.
3641         * match.c (top_val_list): Extract repeat count into a temporary.
3642         * resolve.c (values): Make left unsigned.
3643         (next_data_value): Don't decrement left.
3644         (check_data_variable): Use gfc_assign_data_value_range.
3645
3646 2004-08-22  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3647
3648         * trans-const.c, trans-decl.c, trans-expr.c: Spelling fixes.
3649
3650 2004-08-22  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3651
3652         * check.c (gfc_check_reduction): Rename to ...
3653         (check_reduction): ... this. Make static. Don't check type of
3654         first argument.
3655         (gfc_check_minval_maxval, gfc_check_prodcut_sum): New functions.
3656         * intrinsic.c (add_functions): Change MAXVAL, MINVAL, PRODUCT and
3657         SUM to use new check functions.
3658         (check_specific): Change logic to call new functions.
3659         * intrinsic.h (gfc_check_minval_maxval, gfc_check_product_sum):
3660         Add prototypes.
3661         (gfc_check_reduction): Remove prototype.
3662
3663 2004-08-20  Paul Brook  <paul@codesourcery.com>
3664         Canqun Yang  <canqun@nudt.edu.cn>
3665
3666         PR fortran/17077
3667         * trans-array.c (gfc_conv_array_parameter): Pass correct pointer
3668         for automatic arrays.
3669         * trans-types.c (gfc_get_nodesc_array_type): Add comment.
3670
3671 2004-08-19  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3672         (Port from g95)
3673
3674         PR fortran/17074
3675         * match.c (match_simple_forall, match_simple_where): Forward-declare.
3676         (gfc_match_if): Order statement list alphabetically, add WHERE and
3677         FORALL, remove double PAUSE.
3678         (gfc_match_simple_where, match_forall_header,
3679         gfc_match_simple_forall): New functions.
3680         (gfc_match_forall): Use match_forall_header.
3681
3682 2004-08-19  Paul Brook  <paul@codesourcery.com>
3683
3684         PR fortran/17091
3685         * gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0.
3686         * symbol.c (gfc_clear_attr): Use memset.
3687
3688 2004-08-19  Paul Brook  <paul@codesourcery.com>
3689
3690         PR fortran/14976
3691         PR fortran/16228
3692         * data.c (assign_substring_data_value): Remove.
3693         (create_character_intializer): New function.
3694         (gfc_assign_data_value): Track the typespec for the current
3695         subobject.  Use create_character_intializer.
3696
3697 2004-08-19  Erik Schnetter  <schnetter@aei.mpg.de>
3698
3699         PR fortran/16946
3700         * check.c (gfc_check_reduction): New function.
3701         (gfc_check_minval_maxval): Removed.
3702         (gfc_check_product): Removed.
3703         (gfc_check_sum): Removed.
3704         * intrinsic.h: Add/remove declarations for these.
3705         * gfortran.h: Add field f3red to union gfc_check_f.
3706         * intrinsic.c (add_sym_3red): New function.
3707         (add_functions): Register maxval, minval, product, and sum intrinsics
3708         through add_sym_3red.
3709         (check_specific): Handle f3red union field.
3710         * iresolve.c: Whitespace change.
3711
3712 2004-08-18  Paul Brook  <paul@codesourcery.com>
3713
3714         * trans-types.c (gfc_sym_type): Use pointer types for optional args.
3715
3716 2004-08-18  Victor Leikehman  <lei@il.ibm.com>
3717
3718         PR fortran/13278
3719         * trans-io.c (transfer_namelist_element): New. Recursively handle
3720         derived-type variables.  Pass string lengths.
3721         (build_dt): Code moved to build_namelist, with some
3722         changes and additions.
3723         (gfc_build_io_library_fndecls): Declare the fifth
3724         argument in st_set_nml_var_char -- string_length.
3725
3726 2004-08-17  Paul Brook  <paul@codesourcery.com>
3727         Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3728
3729         PR fortran/13082
3730         * decl.c (get_proc_name): Update mystery comment.
3731         (gfc_match_entry): Check for errors earlier.  Add entry point to list.
3732         * dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes.
3733         * gfortran.h (symbol_attribute): Add entry_master.  Document entry.
3734         (struct gfc_entry_list): Define.
3735         (gfc_get_entry_list): Define.
3736         (struct gfc_namespace): Add refs and entries.
3737         (enum gfc_exec_op): Add EXEC_ENTRY.
3738         (struct gfc_code): Add ext.entry.
3739         * module.c (ab_attribute, attr_bits): Remove AB_ENTRY.
3740         (mio_symbol_attribute): Don't save/reture addr->entry.
3741         (mio_namespace_ref): Refcount namespaces.
3742         * parse.c (accept_statement): Handle ST_ENTRY.
3743         (gfc_fixup_sibling_symbols): Mark symbol as referenced.
3744         (parse_contained): Fixup sibling references to entry points
3745         after parsing the procedure body.
3746         * resolve.c (resolve_contained_fntype): New function.
3747         (merge_argument_lists, resolve_entries): New functions.
3748         (resolve_contained_functions): Use them.
3749         (resolve_code): Handle EXEC_ENTRY.
3750         (gfc_resolve): Call resolve_entries.
3751         * st.c (gfc_free_statement): Handle EXEC_ENTRY.
3752         * symbol.c (gfc_get_namespace): Refcount namespaces.
3753         (gfc_free_namespace): Ditto.
3754         * trans-array.c (gfc_trans_dummy_array_bias): Treat all args as
3755         optional when multiple entry points are present.
3756         * trans-decl.c (gfc_get_symbol_decl): Remove incorrect check.
3757         (gfc_get_extern_function_decl): Add assertion.  Fix coment.
3758         (create_function_arglist, trans_function_start, build_entry_thunks):
3759         New functions.
3760         (gfc_build_function_decl): Rename ...
3761         (build_function_decl): ... to this.
3762         (gfc_create_function_decl): New function.
3763         (gfc_generate_contained_functions): Use it.
3764         (gfc_trans_entry_master_switch): New function.
3765         (gfc_generate_function_code): Use new functions.
3766         * trans-stmt.c (gfc_trans_entry): New function.
3767         * trans-stmt.h (gfc_trans_entry): Add prototype.
3768         * trans-types.c (gfc_get_function_type): Add entry point argument.
3769         * trans.c (gfc_trans_code): Handle EXEC_ENTRY.
3770         (gfc_generate_module_code): Call gfc_create_function_decl.
3771         * trans.h (gfc_build_function_decl): Remove.
3772         (gfc_create_function_decl): Add prototype.
3773
3774 2004-08-15  Andrew Pinski  <apinski@apple.com>
3775
3776         PR fortran/17030
3777         * f95-lang.c (gfc_init_builtin_functions): Initialize the builtins
3778         for cabs{,f} and copysign{,f}.
3779         * trans-decl.c (gfor_fndecl_math_cabsf): Delete.
3780         (gfor_fndecl_math_cabs): Delete.
3781         (gfor_fndecl_math_sign4): Delete.
3782         (gfor_fndecl_math_sign8): Delete.
3783         (gfc_build_intrinsic_function_decls): Remove the
3784         initializing of cabs{,f} and copysign{,f} functions.
3785         * trans-intrinsic.c (gfc_conv_intrinsic_abs): Use the builtins
3786         instead of the functions definitions.
3787         (gfc_conv_intrinsic_sign): Likewise.
3788         * trans.h (gfor_fndecl_math_cabsf): Delete.
3789         (gfor_fndecl_math_cabs): Delete.
3790         (gfor_fndecl_math_sign4): Delete.
3791         (gfor_fndecl_math_sign8): Delete.
3792
3793 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
3794
3795         * trans-array.c (gfc_trans_array_constructor_value): Use
3796         build_int_cst.
3797         * trans-const.c (gfc_build_string_const,
3798         gfc_init_constants, gfc_conv_mpz_to_tree,
3799         gfc_conv_constant_to_tree): Likewise.
3800         * trans-decl.c (gfc_get_symbol_decl): Likewise.
3801         * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
3802         gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
3803         * trans-io.c (add_case, set_error_locus, build_dt,
3804         transfer_expr): Likewise.
3805         * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
3806         gfc_trans_stop, gfc_trans_character_select): Likewise.
3807         * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
3808         * trans.c (gfc_trans_runtime_check): Likewise.
3809
3810 2004-08-14  Paul Brook  <paul@codesourcery.com>
3811
3812         * trans-decl.c (gfc_build_function_decl): Remove dead code.
3813
3814 2004-08-14  Paul Brook  <paul@codesourcery.com>
3815
3816         * trans-arry.c (gfc_trans_auto_array_allocation): Remove unused var.
3817
3818 2004-08-13  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3819
3820         * gfortran.h: Add comments.
3821         * parse.c (parse_contained): Fix comment typo.
3822         * resolve.c (was_declared): Ditto.
3823         * symbol.c: Ditto.
3824
3825 2004-08-11  Paul Brook  <paul@codeourcery.com>
3826
3827         PR fortran/16917
3828         * intrinsic.c (add_functions): Add dfloat as an alias for dble.
3829
3830 2004-08-10  Richard Henderson  <rth@redhat.com>
3831
3832         * f95-lang.c (gfc_init_builtin_functions): Remove
3833          __builtin_stack_alloc, add __builtin_alloca.
3834         * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR.
3835         * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
3836
3837 2004-08-10  Paul Brook  <paul@codesourcery.com>
3838
3839         * trans-io.c (transfer_expr): Handle pointters.
3840
3841 2004-08-10  Paul Brook  <paul@codesourcery.com>
3842
3843         PR fortran/16919
3844         * trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT.
3845         (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta.
3846         (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary):
3847         Handle GFC_SS_COMPONENT.
3848         (gfc_conv_ss_startstride): Ditto.  Set ss->shape.
3849         (gfc_conv_loop_setup): Tweak commends. Remove dead code.
3850         Use ss->shape.
3851         (gfc_conv_array_initializer): Call specific initializer routines.
3852         * trans-expr.c (gfc_trans_structure_assign): New function.
3853         (gfc_trans_subarray_assign): New function.
3854         (gfc_trans_subcomponent_assign): New fucntion
3855         (gfc_conv_structure): Use them.
3856         * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT.
3857         (gfc_ss): Add shape.
3858
3859 2004-08-08  Victor Leikehman  <lei@il.ibm.com>
3860
3861         * simplify.c (gfc_simplify_shape): Bugfix.
3862         * expr.c (gfc_copy_shape_excluding): New function.
3863         * gfortran.h (gfc_get_shape): Bugfix.
3864         (gfc_copy_shape_excluding): Added declaration.
3865         * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
3866         gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound,
3867         gfc_resolve_ubound, gfc_resolve_transpose): Added compile
3868         time resolution of shape.
3869
3870 2004-08-06  Janne Blomqvist  <jblomqvi@cc.hut.fi>
3871
3872         * intrinsic.c (add_subroutines): Add getenv and
3873         get_environment_variable. (add_sym_5s): New function.
3874         * intrinsic.h (gfc_resolve_get_environment_variable): Add
3875         prototype.
3876         * iresolve.c (gfc_resolve_get_environment_variable): New
3877         function.
3878
3879 2004-08-06  Feng Wang  <fengwang@nudt.edu.cn>
3880
3881         * f95-lang.c (gfc_init_builtin_functions): Fix the number of
3882         __builtin_pow[f] arguments.
3883
3884 2004-08-06  Steven G. Kargl  <kargls@comcast.net>
3885
3886         * arith.c: Add #define for model numbers.  Remove global GMP variables.
3887         (natural_logarithm,common_logarithm,exponential,sine,
3888         cosine,arctangent,hypercos,hypersine ): Remove.
3889         (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions.
3890         (arctangent2,gfc_arith_init_1,gfc_arith_done_1
3891         gfc_check_real_range, gfc_constant_result, gfc_range_check,
3892         gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times,
3893         gfc_arith_divide,complex_reciprocal,complex_pow_ui,
3894         gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real,
3895         gfc_convert_complex,gfc_int2real,gfc_int2complex,
3896         gfc_real2int,gfc_real2real,gfc_real2complex,
3897         gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP
3898         to MPFR, use new functions.
3899         * arith.h: Remove extern global variables.
3900         (natural_logarithm,common_logarithm,exponential, sine, cosine,
3901         arctangent,hypercos,hypersine): Remove prototypes.
3902         (arctangent2): Update prototype from GMP to MPFR.
3903         (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes.
3904         * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR.
3905         * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR.
3906         * gfortran.h (GFC_REAL_BITS): Remove.
3907         (arith): Add ARITH_NAN.
3908         Include mpfr.h.  Define GFC_RND_MODE.
3909         Rename GCC_GFORTRAN_H GFC_GFC_H.
3910         (gfc_expr): Convert GMP to MPFR.
3911         * module.c: Add arith.h, correct type in comment.
3912         (mio_gmp_real): Convert GMP to MPFR.
3913         (mio_expr):  Use gfc_set_model_kind().
3914         * primary.c:  Update copyright date with 2004.
3915         (match_real_constant,match_const_complex_part): Convert GMP to MPFR.
3916         * simplify.c: Remove global GMP variables
3917         (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag,
3918         gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint,
3919         gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan,
3920         gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx,
3921         gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh,
3922         gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon,
3923         gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor,
3924         gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int,
3925         gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log,
3926         gfc_simplify_log10,simplify_min_max,gfc_simplify_mod,
3927         gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint,
3928         gfc_simplify_rrspacing,gfc_simplify_scale,
3929         gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin,
3930         gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt,
3931         gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny,
3932         gfc_simplify_init_1,gfc_simplify_done_1):  Convert GMP to MPFR.
3933         Use new functions.
3934         * trans-const.c (gfc_conv_mpfr_to_tree): Rename from
3935         gfc_conv_mpf_to_tree.  Convert it to use MPFR
3936         (gfc_conv_constant_to_tree): Use it.
3937         * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree().
3938         * trans-intrinsic.c: Add arith.h, remove gmp.h
3939         (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR.
3940
3941 2004-08-06  Victor Leikehman  <lei@il.ibm.com>
3942         Paul Brook  <paul@codesourcery.com>
3943
3944         * trans-array.c (gfc_trans_allocate_array_storage,
3945         gfc_trans_allocate_temp_array, gfc_add_loop_ss_code,
3946         gfc_conv_loop_setup): For functions, if the shape of the result
3947         is not known in compile-time, generate an empty array descriptor for
3948         the result and let the callee to allocate the memory.
3949         (gfc_trans_dummy_array_bias): Do nothing for pointers.
3950         (gfc_conv_expr_descriptor): Use function return values directly.
3951         * trans-expr.c (gfc_conv_function_call): Always add byref call
3952         insn to pre chain.
3953         (gfc_trans_pointer_assignment): Add comments.
3954         (gfc_trans_arrayfunc_assign): Don't chain on expression.
3955
3956 2004-08-01  Roger Sayle  <roger@eyesopen.com>
3957
3958         * options.c (gfc_init_options): Don't warn about the use GNU
3959         extensions by default.
3960         (gfc_post_options): Warn about GNU extensions with -pedantic.
3961         (gfc_handle_option): Don't warn about GNU extensions with -std=gnu.
3962
3963 2004-07-30  Richard Henderson  <rth@redhat.com>
3964
3965         * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL
3966         for TREE_CONSTANTs.
3967
3968 2004-07-25  Richard Henderson  <rth@redhat.com>
3969
3970         * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL
3971         and DECL_IGNORED_P on RESULT_DECL.
3972         (gfc_generate_constructors): Likewise.
3973
3974 2004-07-18  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3975
3976         PR fortran/16465
3977         * lang.opt (ffixed-line-length-none, ffixed-line-length-): New
3978         options.
3979         (ffixed-line-length-80, ffixed-line-length-132): Remove.
3980         * options.c (gfc_handle_options): Deal with changed options.
3981         * scanner.c (load_line): Change second arg to 'char **',
3982         allocate if pointing to NULL. Keep track of buffer's length.
3983         Adapt buffer size to overlong lines. Pad lines to full length
3984         in fixed form.
3985         (load_file): Adapt to new interface of load_line.
3986
3987 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
3988
3989         * trans.h (builtin_function): Declare.
3990
3991 2004-07-16  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
3992
3993         PR fortran/16404
3994         (parts ported from g95)
3995         * parse.h (gfc_state_data): New field do_variable.
3996         (gfc_check_do_variable): Add prototype.
3997         * parse.c (push_state): Initialize field 'do_variable'.
3998         (gfc_check_do_variable): New function.
3999         (parse_do_block): Remember do iterator variable.
4000         (parse_file): Initialize field 'do_variable'.
4001         * match.c (gfc_match_assignment, gfc_match_do,
4002         gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate):
4003         Add previously missing checks.
4004         (gfc_match_return): Reformat error message.
4005         * io.c (match_out_tag): New function.
4006         (match_open_element, match_close_element,
4007         match_file_element, match_dt_element): Call match_out_tag
4008         instead of match_vtag where appropriate.
4009         (match_io_iterator, match_io_element): Add missing check.
4010         (match_io): Reformat error message.
4011         (match_inquire_element): Call match_out_tag where appropriate.
4012
4013         * parse.c (gfc_check_do_variable): Fix error locus.
4014
4015 2004-07-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4016
4017         PR fortran/15129
4018         * trans-decl.c (gfc_build_function_decl): Create a new chardecl
4019         for every assumed length character dummy argument.
4020
4021         PR fortran/15140
4022         * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion.
4023
4024         PR fortran/13792
4025         * simplify.c (gfc_simplify_bound): Copy the bound expression.
4026
4027 2004-07-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4028
4029         PR fortran/15324
4030         * trans-array.c gfc_trans_g77_array,
4031         gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init
4032         for assumed length characters.
4033         (gfc_conv_expr_descriptor): Set se->string_length if dealing
4034         with a character expression.
4035         (gfc_cvonv_array_parameter): Pass string length when passing
4036         character array according to g77 conventions.
4037
4038 2004-07-12  Paul Brook  <paul@codesourcery.com>
4039
4040         * expr.c (gfc_check_assign_symbol): Handle pointer assignments.
4041         * trans-array.c (gfc_trans_auto_array_allocation): Remove
4042         initialization code.
4043         * trans-common.c (create_common): Use gfc_conv_initializer.
4044         * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer.
4045         * trans-expr.c (gfc_conv_initializer): New function.
4046         (gfc_conv_structure): Use it.
4047         * trans.h (gfc_conv_initializer): Add prototype.
4048
4049 2004-07-11  Paul Brook  <paul@codesourcery.com>
4050
4051         PR fortran/15986
4052         * parse.c (gfc_fixup_sibling_symbols): Also look for untyped
4053         variables.
4054         (parse_contained): Mark contained symbols as referenced.
4055
4056 2004-07-11  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4057
4058         PR fortran/16455
4059         * module.c (gfc_dump_module, gfc_use_module): Print locus
4060         when opening of module file fails.
4061
4062         PR fortran/16404
4063         * io.c (match_io): Flag 'WRITE(...), ...' as extension.
4064
4065         PR fortran/16404
4066         * match.c (gfc_match_program): A program name is obligatory.
4067         (gfc_match_return): RETURN in main program is an extension.
4068         (gfc_match_block_data): A space is required before a block data
4069         name.
4070
4071         PR fortran/16433
4072         * primary.c (match_boz_constant): Call gfc_notify_std only if
4073         we actually have a non-standard boz-literal-constant.
4074
4075         PR fortran/15754
4076         * expr.c (gfc_check_assign): Print ranks if incompatible. Issue
4077         warning if assigning NULL().
4078
4079 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
4080
4081         * f95-lang.c (set_block): Remove.
4082         (gfc_clear_binding_stack): New.
4083         (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
4084         (struct binding_level): Remove block_created_by_back_end.
4085         (clear_binding_level): Likewise.
4086         (poplevel): Don't handle block_created_by_back_end.
4087
4088 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4089
4090         * trans-decl.c (gfc_create_module_variable): Nothing to do if
4091         symbol is in common, because we ...
4092         (gfc_generate_module_vars): Call gfc_trans_common.
4093
4094 2004-07-10  Paul Brook  <paul@codesourcery.com>
4095
4096         * trans-array.c (gfc_build_null_descriptor): New function.
4097         (gfc_trans_static_array_pointer): Use it.
4098         * trans-array.h (gfc_build_null_descriptor): Add prototype.
4099         * trans-expr.c (gfc_conv_structure): Handle array pointers.
4100
4101 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4102
4103         PR fortran/16336
4104         * decl.c (gfc_match_save): Use-associated common block
4105         doesn't collide.
4106         * gfortran.h (gfc_common_head): Add new field 'name'.
4107         Fix typo in comment after #endif.
4108         * match.c (gfc_get_common): Add new argument from_common,
4109         mangle name if flag is set, fill in new field in structure
4110         gfc_common_head.
4111         (match_common): Set new arg in call to gfc_get_common,
4112         use-associated common block doesn't collide.
4113         * match.h (gfc_get_common): Adapt prototype.
4114         * module.c (load_commons): Set new arg in call to
4115         gfc_get_common.
4116         * symbol.c (free_common_tree): New function.
4117         (gfc_free_namespace): Call new function.
4118         * trans-common.c (several functions): Remove argument
4119         'name', use name from gfc_common_head instead.
4120
4121 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4122
4123         * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
4124         and RHS match. Return early if the RHS is NULL().
4125
4126         PR fortran/16336
4127         * match.c (match_common): Fix error reporting for used common.
4128
4129         PR fortran/15969
4130         * trans-expr.c (gfc_conv_structure): Handle initialization
4131         of scalar pointer components.
4132
4133         * parse.c (decode_statement): Fix matching of BLOCK DATA.
4134
4135         * trans-decl.c (generate_local_decl): Remove workaround obsoleted
4136         by fix for PR 15481.
4137
4138 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4139
4140         * trans-common.c: Fix whitespace issues, make variable names
4141         more readable.
4142         (create_common): Additionally, make loop logic more obvious.
4143
4144 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4145         Paul Brook  <paul@codesourcery.com>
4146
4147         PR fortran/13415
4148         * trans-common.c (calculate_length): Remove ...
4149         (get_segment_info): Merge into here.  Save field type.
4150         (build_field): Use saved type.
4151         (create_common, new_condition, new_segment, finish_equivalences):
4152         Use new get_segment_info.
4153         * trans-types.c: Update comment.
4154
4155 2004-07-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4156
4157         PR fortran/14077
4158         * moduele.c (mio_symbol): Don't I/O initial values unless
4159         symbol is a parameter.
4160
4161 2004-07-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4162
4163         PR fortran/13201
4164         * resolve.c (resolve_symbol): Verify that the shape of a
4165         parameter array is not only explicit, but also constant.
4166         * array.c (gfc_is_compile_time_shape): New function.
4167         * gfortran.h (gfc_is_compile_time_shape): Add prototype.
4168
4169 2004-07-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4170
4171         PR fortran/15481
4172         PR fortran/13372
4173         PR fortran/13575
4174         PR fortran/15978
4175         * module.c (write_symbol, write_symtree): Remove workaround.
4176         * primary.c (match_actual_arglist): Enhance comment.
4177         (gfc_match_rvalue): Handle function call with first argument
4178         a keyword argument correctly.
4179         * resolve.c (resolve_symbol): Change call to
4180         gfc_set_default_type to issue error if no implicit type
4181         can be found.
4182         * trans-decl.c (gfc_create_module_variable): Remove workaround.
4183
4184 2004-07-08  Paul Brook  <paul@codesourcery.com>
4185
4186         * intrinsic.c (add_sym_4s): New function.
4187         (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
4188
4189 2004-07-04  Janne Blomqvist  <jblomqvi@cc.hut.fi>
4190         Paul Brook  <paul@codesourcery.com>
4191
4192         PR fortran/15280
4193         PR fortran/15665
4194         * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
4195         GFC_ISYM_COMMAND_ARGUMENT_COUNT.
4196         * intrinsic.c (add_functions):  Identify iargc.  Add
4197         command_argument_count.
4198         (add_subroutines): Resolve getarg.  Add get_command and
4199         get_command_argument.
4200         * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
4201         gfc_resolve_get_command_argument): Add prototypes.
4202         * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
4203         gfc_resolve_get_command_argument): New functions.
4204         * trans-decl.c (gfor_fndecl_iargc): New variable.
4205         (gfc_build_intrinsic_function_decls): Set it.
4206         * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
4207         (gfc_conv_intrinsic_function): Use it.
4208         * trans.h (gfor_fndecl_iargc): Declare.
4209
4210 2004-07-04  Matthias Klose  <doko@debian.org>
4211
4212         * Make-lang.in: Generate and install gfortran man page.
4213         * invoke.texi: Remove extra '@c man end'.
4214
4215 2004-07-04  Richard Henderson  <rth@redhat.com>
4216
4217         * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
4218
4219 2004-07-04  Paul Brook  <paul@codesourcery.com>
4220
4221         * decl.c (gfc_match_implicit_range): Don't use typespec.
4222         (gfc_match_implicit): Handle character selectors.
4223         * gfortran.h (gfc_set_implicit): Remove prototype.
4224         (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
4225         * parse.c (accept_statement): Don't call gfc_set_implicit.
4226         * symbol.c (new_ts): Remove.
4227         (gfc_set_implicit_none): Use same loop bounds as other functions.
4228         (gfc_set_implicit): Remove.
4229         (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
4230         (gfc_merge_new_implicit): Combine with gfc_set_implicit.
4231
4232 2004-06-30  Richard Henderson  <rth@redhat.com>
4233
4234         * match.c (var_element): Remove unused variable.
4235
4236         * trans-decl.c (gfc_generate_function_code): Don't set
4237         x_whole_function_mode_p.
4238         (gfc_generate_constructors): Likewise.
4239
4240 2004-06-30  Richard Henderson  <rth@redhat.com>
4241
4242         * trans-decl.c (gfc_generate_function_code): Don't set
4243         immediate_size_expand.
4244         (gfc_generate_constructors): Likewise.
4245
4246 2004-06-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4247
4248         PR fortran/16161
4249         * decl.c (gfc_match_type_spec): Rename second argument to
4250         'implicit_flag', reverse meaning. Don't match_char_spec if
4251         'implicit_flag' is set. Rename to ...
4252         (match_type_spec): ... this.
4253         (gfc_match_implicit_none, match_implicit_range): Move here
4254         from match.c.
4255         (gfc_match_implicit): Move here from match.c, try to
4256         match_char_len if match_implicit_range doesn't succeed for
4257         CHARACTER implicits. Call renamed fucntion match_type_spec.
4258         (gfc_match_data_decl, match_prefix): Call renamed function
4259         match_type_spec.
4260         * match.c (gfc_match_implicit_none, match_implicit_range,
4261         gfc_match_implicit): Move to decl.c.
4262         * match.h (gfc_match_implicit_none, gfc_match_implicit):
4263         Move protoypes to section 'decl.c'.
4264         (gfc_match_type_spec): Remove prototype.
4265
4266 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4267
4268         * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
4269         copyright years.
4270
4271 2004-06-29  Steven Bosscher  <stevenb@suse.de>
4272
4273         Make sure types in assignments are compatible.  Mostly mechanical.
4274         * trans-const.h (gfc_index_one_node): New define.
4275         * trans-array.c (gfc_trans_allocate_array_storage,
4276         gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
4277         gfc_trans_array_constructor_value, gfc_trans_array_constructor,
4278         gfc_conv_array_ubound, gfc_conv_array_ref,
4279         gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
4280         gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
4281         gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
4282         gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
4283         types in assignments, conversions and conditionals for expressions.
4284         * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
4285         gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
4286         gfc_conv_function_call, gfc_trans_pointer_assignment,
4287         gfc_trans_scalar_assign): Likewise.
4288         * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
4289         gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
4290         gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
4291         gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
4292         gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
4293         gfc_conv_allocated, gfc_conv_associated,
4294         gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
4295         * trans-io.c (set_string): Likewise.
4296         * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
4297         gfc_do_allocate, generate_loop_for_temp_to_lhs,
4298         generate_loop_for_rhs_to_temp, compute_inner_temp_size,
4299         compute_overall_iter_number, gfc_trans_assign_need_temp,
4300         gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
4301         gfc_evaluate_where_mask, gfc_trans_where_assign,
4302         gfc_trans_where_2): Likewise.
4303         * trans-types.c (gfc_get_character_type, gfc_build_array_type,
4304         gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
4305
4306         * trans.c (gfc_add_modify_expr): Add sanity check that types
4307         for the lhs and rhs are the same for scalar assignments.
4308
4309 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4310
4311         * dump-parse-tree.c (show_common): New function.
4312         (gfc_show_namespace): Show commons.
4313
4314 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4315         Andrew Vaught  <andyv@firstinter.net>
4316
4317         PR fortran/13249
4318         PR fortran/15481
4319         * decl.c (gfc_match_save): Adapt to new common structures,
4320         don't allow saving USE-associated common.
4321         * dump-parse-tree (gfc_show_attr): (saved_)common are not
4322         symbol attributes any longer.
4323         (gfc_show_symbol): Don't show old-style commons any longer.
4324         (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
4325         interface.
4326         * gfortran.h (symbol_attribute): Remove common and saved_common
4327         attributes.
4328         (gfc_symbol): Remove common_head element.
4329         (gfc_common_head): New struct.
4330         (gfc_get_common_head): New macro.
4331         (gfc_symtree): Add field 'common' to union.
4332         (gfc_namespace): Add field 'common_root'; change type of field
4333         'blank_common' to blank_common.
4334         (gfc_add_data): New prototype.
4335         (gfc_traverse_symtree): Expect a symtree as first argument
4336         instead of namespace.
4337         * match.c (gfc_get_common): New function.
4338         (match_common_name): Change to take char * as argument, adapt,
4339         fix bug with empty name.
4340         (gfc_match_common): Adapt to new data structures. Disallow
4341         redeclaration of USE-associated COMMON-block. Fix bug with
4342         empty common.
4343         (var_element): Adapt to new common structures.
4344         * match.h (gfc_get_common): Declare.
4345         * module.c: Add 2004 to copyright years, add commons to module
4346         file layout description.
4347         (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
4348         for removed attributes.
4349         (mio_symbol): Adapt to new way of storing common relations.
4350         (load_commons): New function.
4351         (read_module): Skip common list on first pass, load_commons at
4352         second.
4353         (write_commons): New function.
4354         (write_module): Call write_commons().
4355         * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
4356         functions related to removed attributes.
4357         (gfc_add_data): New function.
4358         (gfc_clear_attr): Don't set removed attributes.
4359         (gfc_copy_attr): Don't copy removed attributes.
4360         (traverse_symtree): Remove.
4361         (gfc_traverse_symtree): Don't traverse symbol
4362         tree of the passed namespace, but require a symtree to be passed
4363         instead. Unify with traverse_symtree.
4364         (gfc_traverse_ns): Call gfc_traverse_symtree according to new
4365         interface.
4366         (save_symbol): Remove setting of removed attribute.
4367         * trans-common.c (gfc_sym_mangled_common_id): Change to
4368         take 'char *' argument instead of 'gfc_symbol'.
4369         (build_common_decl, new_segment, translate_common): Adapt to new
4370         data structures, add new
4371         argument name.
4372         (create_common): Adapt to new data structures, add new
4373         argument name. Fix typo in intialization of derived types.
4374         (finish_equivalences): Add second argument in call to
4375         create_common.
4376         (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
4377         (gfc_trans_common): Adapt to new data structures.
4378         * trans-decl.c (gfc_create_module_variables): Remove test for
4379         removed attribute.
4380
4381 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4382
4383         * io.c: Add 2004 to copyright years.
4384
4385 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4386         Andrew Vaught  <andyv@firstinter.net>
4387
4388         * gfortran.h (gfc_gsymbol): New typedef.
4389         (gfc_gsym_root): New variable.
4390         (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
4391         * parse.c (global_used): New function.
4392         (parse_block_data): Check for double empty BLOCK DATA,
4393         use global symbol table.
4394         (parse_module): Use global symbol table.
4395         (add_global_procedure, add_global_program): New functions.
4396         (gfc_parse_file): Use global symbol table.
4397         * symbol.c (gfc_gsym_root): New variable.
4398         (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
4399         functions.
4400
4401 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4402
4403         * module.c (mio_gmp_real): Correct writing of negative numbers.
4404
4405 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4406
4407         PR fortran/15963
4408         * expr.c (check_intrinsic_op): Allow comparison of characters.
4409         Make logic easier.
4410
4411 2004-06-26  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4412         Andrew Vaught  <andyv@firstinter.net>
4413
4414         * decl.c (contained_procedure): New function.
4415         (match_end): Verify correctness of END STATEMENT in
4416         all cases.
4417
4418 2004-06-26  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4419         Andrew Vaught  <andyv@firstinter.net>
4420
4421         PR fortran/15190
4422         * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
4423         (decode_statement): Enforce required space in free-form.
4424
4425 2004-06-22  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4426
4427         * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
4428         * trans-array.c (gfc_conv_descriptor_data): Add operand
4429         for COMPONENT_REF.
4430         (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
4431         (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
4432         (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
4433         * trans-common.c (create_common): Likewise.
4434         * trans-expr.c (gfc_conv_component_ref): Likewise.
4435         * trans-io.c (set_parameter_value): Likewise.
4436         (set_parameter_ref, set_string, set_flag, io_result): Likewise.
4437         (transfer_expr): Likewise.
4438         * trans-decl.c (gfc_trans_auto_character_variable):
4439         Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
4440         (gfc_gimplify_function): New function.
4441         (gfc_generate_function-code): Properly handle nested functions.
4442         * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
4443
4444 2004-06-22  Janne Blomqvist  <jblomqvi@cc.hut.fi>
4445
4446         PR fortran/15750
4447         * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
4448         (gfc_resolve_inquire): Resolve the iolength tag.  Return
4449         SUCCESS at end of function if no failure has occured.
4450         * resolve.c (resolve_code): Resolve if iolength is encountered.
4451         * trans-io.c: (ioparm_iolength, iocall_iolength,
4452         iocall_iolength_done): New variables.
4453         (last_dt): Add IOLENGTH.
4454         (gfc_build_io_library_fndecls ): Set iolength related variables.
4455         (gfc_trans_iolength): Implement.
4456         (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
4457
4458 2004-06-21  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de
4459
4460         PR fortran/15511
4461         * scanner.c (load_line): Don't truncate preprocessor lines.
4462         Reformat error message.
4463         (preprocessor_line): Issue warning in case of malformed
4464         preprocessor line.
4465
4466 2004-06-21  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4467
4468         * resolve.c (resolve_symbol): Add comment in function body.
4469         (check_data_variable): Change type of mark to ar_type, adapt code
4470         accordingly.
4471
4472 2004-06-21  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4473
4474         * array.c (gfc_insert_constructor): Avoid redundant call to
4475         mpz_comp. Add 2004 to copyright years.
4476
4477 2004-06-21  Joseph S. Myers  <jsm@polyomino.org.uk>
4478
4479         * trans.h (stmtblock_t): Change has_scope to unsigned int.
4480
4481 2004-06-20  Steven G. Kargl  <kargls@comcast.net>
4482
4483         * arith.c (gfc_range_check): correct complex underflow.
4484
4485 2004-06-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4486
4487         PR fortran/15962
4488         * match.c (match_case_selector): Call gfc_match_init_expr
4489         instead of gfc_match_expr.
4490         * resolve.c (validate_case_label_expr): No need to check for
4491         constant, since it wouldn't have been matched with the fix to
4492         match.c.
4493
4494 2004-06-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4495
4496         PR fortran/15211
4497         * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
4498         of strings.
4499
4500 2004-06-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4501
4502         PR fortran/15510
4503         * trans-deecl.c (generate_local_decl): Do not issue warning for
4504         unused variables if they're use associated.
4505
4506 2004-06-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4507         Andrew Vaught  <andyv@firstinter.net>
4508
4509         PR fortran/14928
4510         * gfortran.h (gfc_check_f): Add new field f3ml.
4511         * check.c (gfc_check_minloc_maxloc): Take argument list instead
4512         of individual arguments, reorder if necessary.
4513         * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
4514         * intrinsic.c (add_sym_3ml): New function.
4515         (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
4516         (check_specific): Catch special case MINLOC, MAXLOC.
4517
4518 2004-06-14  Paul Brook  <paul@codesourcery.com>
4519
4520         * intrinsic.c (add_sym_2s): Use correct function types.
4521
4522 2004-06-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4523
4524         * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize.  Move data.c
4525         * data.c (gfc_get_section_index):  Remove dependency on trans.h.
4526
4527 2004-06-12  Steven G. Kargl  <kargls@comcast.net>
4528
4529         * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
4530         gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
4531         * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
4532         GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
4533         * trans-intrinsic.c:  Use symbols.
4534         * intrinsic.c (add_sym_2s): New function.
4535         * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
4536         * intrinsic.h: Function prototypes.
4537         * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
4538         gfc_resolve_srand):  New functions.
4539
4540 2004-06-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4541
4542         PR fortran/14957
4543         * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
4544         contained procedure.
4545
4546 2004-06-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4547
4548         PR fortran/12841
4549         * interface.c (compare_parameter, compare_actual_formal): Don't
4550         check types and array shapes for NULL()
4551         * trans-expr.c (conv_function_call): No double indirection for
4552         NULL()
4553
4554 2004-06-09  Toon Moene  <toon@moene.indiv.nluug.nl>
4555
4556         * trans-expr.c (gfc_conv_cst_int_power): Compute
4557         x**(-n) by converting it to (1/x)**n instead of
4558         1/x**n.
4559
4560 2004-06-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4561
4562         PR fortran/13372
4563         * module.c (write_symbol, write_symtree): Don't write symbols
4564         wrongly added to namespace.
4565         * trans-decl.c (gfc_create_module_variable): Don't create a
4566         backend decl for a symbol incorrectly added to namespace.
4567
4568 2004-06-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4569
4570         PR fortran/13201
4571         * resolve.c (resolve_symbol): Verify that parameter array has an
4572         explicit shape. Fix typos and coding style issues in surrounding
4573         lines.
4574
4575 2004-06-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4576
4577         PR fortran/15478
4578         * gfortran.texi: The documentation doesn't contain infomration on
4579         how to report bugs, and shouldn't, so remove the line which
4580         says it does.
4581
4582 2004-06-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4583
4584         * intrinsic.c (sort_actual): Keep track of type of missing
4585         arguments. (Missing from previous commit.)
4586
4587 2004-06-03  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4588
4589         * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
4590         * interface.c (compare_actual_formal): Keep type of omitted
4591         optional arguments.
4592         * trans-expr.c (gfc_conv_function_call): Add string length
4593         argument for omitted string argument.
4594
4595 2004-06-03  Paul Brook  <paul@codesourcery.com>
4596
4597         * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
4598         lists instead of compound expr chains.
4599         (gfc_trans_code): Annotate statement lists.
4600
4601 2004-06-03  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4602
4603         * trans-array.c: Fix spelling in comments.
4604
4605 2004-06-02  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4606
4607         PR fortran/15557
4608         * data.c (assign_substring_data_value): New function.
4609         (gfc_assign_data_value): Call the new function if we're dealing
4610         with a substring LHS.
4611
4612 2004-06-01  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4613
4614         PR fortran/15477
4615         * gfortran.h (GFC_VERSION): Remove.
4616         * gfortran.texi (version-gfortran): Remove, replace by version-GCC
4617         where used.
4618
4619 2004-05-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4620
4621         * trans-types.c: Fix spelling & layout in comments.
4622
4623 2004-05-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4624
4625         PR fortran/14067
4626         * trans-const.c (gfc_conv_string_init): Allow variable string
4627         length lower than initialization string length.
4628
4629 2004-05-30  Paul Brook  <paul@codesourcery.com>
4630
4631         PR fortran/15620
4632         * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
4633         * trans-expr.c (gfc_trans_string_copy): New function.
4634         (gfc_conv_statement_function): Use them.  Create temp vars.  Enforce
4635         character lengths.
4636         (gfc_conv_string_parameter): Use gfc_trans_string_copy.
4637         * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
4638         * trans.h (struct gfc_saved_var): Define.
4639         (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
4640
4641 2004-05-30  Steven G. Kargl  <kargls@comcast.net>
4642
4643         * iresolve.c (gfc_resolve_random_number): Clean up conditional.
4644
4645 2004-05-29  Steven G. Kargl  <kargls@comcast.net>
4646
4647         * simplify.c (gfc_simplify_log): Remove useless line of code.
4648
4649 2004-05-29  Paul Brook  <paul@codesourcery.com>
4650
4651         * trans-common.c (find_equivalence): Find multiple rules.
4652
4653 2004-05-27  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4654
4655         * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
4656         (gfc_current_locus): Declare new global variable.
4657         * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
4658         (gfc_current_locus1): Rename ...
4659         (gfc_current_locus): ... to this.
4660         (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
4661         skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
4662         gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
4663         gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
4664         and gfc_current_locus(), respectively.
4665         * array.c (match_subscript, gfc_match_array_ref, match_array_list,
4666         match_array_cons_element, gfc_match_array_constructor):
4667         Read/modify gfc_current_locus instead of calling gfc_set_locus()
4668         and gfc_current_locus().
4669         * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
4670         match_attr_spec, gfc_match_function_decl, gfc_match_end,
4671         attr_decl1, gfc_match_save): Likewise.
4672         * error.c (error_print, gfc_internal_error): Likewise.
4673         * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
4674         * interface.c (gfc_add_interface): Likewise.
4675         * io.c (gfc_match_format, match_dt_format, match_dt_element,
4676         match_io_iterator, match_io): Likewise.
4677         * match.c (gfc_match_space, gfc_match_eos,
4678         gfc_match_small_literal_int, gfc_match_st_label,
4679         gfc_match_strings, gfc_match_name, gfc_match_iterator,
4680         gfc_match_char, gfc_match, gfc_match_assignment,
4681         gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
4682         gfc_match_nullify, gfc_match_call, match_implicit_range,
4683         gfc_match_implicit, gfc_match_data, match_case_selector,
4684         gfc_match_case, match_forall_iterator): Likewise.
4685         * matchexp.c (gfc_match_defined_op_name, next_operator,
4686         match_level_1, match_mult_operand, match_ext_mult_operand,
4687         match_add_operand, match_ext_add_operand, match_level_2,
4688         match_level_3, match_level_4, match_and_operand, match_or_operand,
4689         match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
4690         * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
4691         * parse.c (match_word, decode_statement, next_free, next_fixed,
4692         add_statement, verify_st_order, parse_if_block, gfc_parse_file):
4693         Likewise.
4694         * primary.c (match_digits, match_integer_constant,
4695         match_boz_constant, match_real_constant, match_substring,
4696         next_string_char, match_charkind_name, match_string_constant,
4697         match_logical_constant, match_const_complex_part,
4698         match_complex_constant, match_actual_arg, match_keyword_arg,
4699         gfc_match_actual_arglist, gfc_match_structure_constructor,
4700         gfc_match_rvalue, gfc_match_variable): Likewise.
4701         * st.c (gfc_get_code): Likewise.
4702         * symbol.c (check_conflict, check_used, check_done,
4703         duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
4704         gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
4705         gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
4706
4707 2004-05-26  Roger Sayle  <roger@eyesopen.com>
4708
4709         * io.c (format_asterisk): Silence compiler warnings by correcting
4710         the number of elements of a "locus" initializer.
4711
4712 2004-05-25  Roger Sayle  <roger@eyesopen.com>
4713
4714         PR fortran/13912
4715         * matchexp.c: Allow unary operators after arithmetic operators
4716         as a GNU extension.
4717         (match_ext_mult_operand, match_ext_add_operand): New functions.
4718         (match_mult_operand): Tweak to call match_ext_mult_operand.
4719         (match_add_operand): Tweak to call match_ext_mult_operand.
4720         (match_level_2): Rearrange to call match_ext_add_operand.
4721
4722 2004-05-25  Paul Brook  <paul@codesourcery.com>
4723
4724         * expr.c (check_inquiry): Remove bogus tests.
4725
4726 2004-05-23  Paul Brook  <paul@codesourcery.com>
4727
4728         PR fortran/13773
4729         * expr.c (restricted_args): Remove redundant checks/argument.
4730         (external_spec_function): Update to match.
4731         (restricted_intrinsic): Rewrite.
4732
4733 2004-05-23  Paul Brook  <paul@codesourcery.com>
4734         Victor Leikehman  <lei@haifasphere.co.il>
4735
4736         * gfortran.h (struct gfc_symbol): Add equiv_built.
4737         * trans-common.c: Change int to HOST_WIDE_INT.  Capitalize error
4738         messages.
4739         (current_length): Remove.
4740         (add_segments): New function.
4741         (build_equiv_decl): Create initialized common blocks.
4742         (build_common_decl): Always add decl to bindings.
4743         (create_common): Create initializers.
4744         (find_segment_info): Reformat to match coding conventions.
4745         (new_condition): Use add_segments.
4746         (add_condition, find_equivalence, add_equivalences): Move iteration
4747         inside functions.  Only process each segment once.
4748         (new_segment, finish_equivalences, translate_common): Simplify.
4749
4750 2004-05-23  Steven G. Kargl  <kargls@comcast.net>
4751
4752         * check.c (gfc_check_random_seed): Issue for too many arguments.
4753
4754 2004-05-22  Steven G. Kargl  <kargls@comcast.net>
4755
4756         * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
4757
4758 2004-05-22  Paul Brook  <paul@codesourcery.com>
4759
4760         * dump-parse-tree.c (gfc_show_equiv): New function.
4761         (gfc_show_namespace): Use it.
4762
4763 2004-05-22  Victor Leikehman  <lei@haifasphere.co.il>
4764
4765         PR fortran/13249
4766         * symbol.c (gfc_add_common): Disable checks to work around other more
4767         fundamental inadequacies.
4768
4769 2004-05-22  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
4770
4771         * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
4772         only for functions.
4773         (gfc_build_function_decl): Likewise.
4774
4775 2004-05-22  Steven G. Kargl  <kargls@comcast.net>
4776
4777         * check.c (gfc_check_system_clock): New function.
4778         * intrinsic.c (add_sym_3s): New function.
4779         (add_subroutines): Use it.
4780         * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
4781         Add prototypes.
4782         * iresolve.c (gfc_resolve_system_clock): New function.
4783
4784 2004-05-22  Steven G. Kargl  <kargls@comcast.net>
4785
4786         * invoke.texi: Document -Wunderflow and spell check.
4787         * lang.opt: Add Wunderflow.
4788         * gfortran.h (gfc_option_t): Add warn_underflow option.
4789         * options.c (gfc_init_options, set_Wall): Use it.
4790         * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
4791         * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
4792         gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
4793         gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
4794         * arith.c (common_logarithm): Fix typo in comment.
4795
4796 2004-05-21  Roger Sayle  <roger@eyesopen.com>
4797
4798         * io.c (check_format): As a GNU extension, allow the comma after a
4799         string literal to be optional in a format.  Use gfc_notify_std to
4800         issue an error/warning as appropriate.
4801
4802 2004-05-21  Roger Sayle  <roger@eyesopen.com>
4803
4804         * io.c (check_format): Use gfc_notify_std to determine whether to
4805         issue an error/warning for omitting the digits from the X format.
4806
4807 2004-05-20  Roger Sayle  <roger@eyesopen.com>
4808
4809         * io.c (check_format): Allow the number before the X format to
4810         be optional when not -pedantic.
4811
4812 2004-05-18  Feng Wang  <fengwang@nudt.edu.cn>
4813         Paul Brook  <paul@codesourcery.com>
4814
4815         * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
4816         Create decls for __builtin_pow{,f}.
4817         * gfortran.h (PREFIX_LEN): Define.
4818         * trans-decl.c (gfor_fndecl_math_powi): Add.
4819         (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
4820         (gfc_build_intrinsic_function_decls): Create decls for powi.
4821         * trans-expr.c (powi_table): Add.
4822         (gfc_conv_integer_power): Remove.
4823         (gfc_conv_powi): New function.
4824         (gfc_conv_cst_int_power): New function.
4825         (gfc_conv_power_op): Use new powi routines.
4826         * trans.h (struct gfc_powdecl_list): Add.
4827         (gfor_fndecl_math_powi): Add.
4828         (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
4829
4830 2004-05-18  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4831
4832         * trans.c, trans-decl.c: Fix comment typos.
4833
4834 2004-05-18  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4835
4836         * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
4837
4838 2004-05-18  Steve Kargl  <kargls@comcast.net>
4839
4840         * arith.c (gfc_int2complex): Fix incorrect range checking.
4841
4842 2004-05-18  Paul Brook  <paul@codesourcery.com>
4843
4844         PR fortran/13930
4845         * decl.c (add_init_expr_to_sym): Remove incorrect check.
4846         (default_initializer): Move to expr.c.
4847         (variable_decl): Don't assign default initializer to variables.
4848         * expr.c (gfc_default_initializer): Move to here.
4849         * gfortran.h (gfc_default_initializer): Add prototype.
4850         * resolve.c (resolve_symbol): Check for illegal initializers.
4851         Assign default initializer.
4852
4853 2004-05-17  Steve Kargl  <kargls@comcast.net>
4854
4855         * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
4856
4857 2004-05-17  Steve Kargl  <kargls@comcast.net>
4858
4859         * arith.c (gfc_real2complex): Range checking wrong part of complex
4860         number.
4861
4862 2004-05-16  Paul Brook  <paul@codesourcery.com>
4863
4864         * options.c (gfc_handle_module_path_options): Fix buffer overrun.
4865
4866 2004-05-16  Paul Brook  <paul@codesourcery.com>
4867
4868         * arith.c (gfc_range_check): Fix logic error.
4869
4870 2004-05-16  Steve Kargl  <sgk@troutmask.apl.washington.edu>
4871
4872         * arith.c: Fix comment typos.
4873
4874 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4875
4876         PR fortran/13742
4877         * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
4878         not initialized in a disallowed fashion.
4879         * match.c (gfc_match_common): Likewise.
4880         (var_element): Verify that variable is not in the blank COMMON,
4881         if it is in a common.
4882
4883 2004-05-15  Joseph S. Myers  <jsm@polyomino.org.uk>
4884
4885         * Make-lang.in (f95.generated-manpages): Remove.
4886         (f95.srcextra): New.
4887         (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
4888         f95.maintainer-clean): Generate info and dvi files in objdir/doc.
4889         (f95.dvi): Remove.
4890         (dvi): New.
4891         (f95.install-info): Remove.
4892         (install-info): New.
4893
4894 2004-05-15  Victor Leikehman  <lei@haifasphere.co.il>
4895
4896         * decl.c (add_init_expr_to_sym): Check for variable size arrays.
4897
4898 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4899
4900         * primary.c (match_boz_constant): Use gfc_notify_std() for
4901         issuing a warning or an error.
4902
4903 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4904
4905         PR fortran/13826
4906         * primary.c (match_structure_constructor): Rename ...
4907         (gfc_match_structure_constructor): ... to this. Make non-static.
4908         (gfc_match_rvalue): Call renamed function.
4909         * match.h (gfc_match_structure_constructor): Declare.
4910         * match.c (gfc_match_data_constant): Handle structure
4911         constructor.
4912
4913 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4914
4915         PR fortran/13702
4916         (Port from g95)
4917         * gfortran.h (gfc_linebuf): New typedef.
4918         (linebuf): Remove.
4919         (gfc_file): Revamped, use new gfc_linebuf.
4920         (locus): Revamped, use new types.
4921         (gfc_current_file): Remove.
4922         (gfc_current_form, gfc_source_file): New global variables.
4923         * match.c (gfc_match_space, gfc_match_strings): Use
4924         gfc_current_form to find source form.
4925         * module.c (gfc_dump_module): Use gfc_source_file when printing
4926         module header.
4927         * error.c (show_locus, show_loci) Use new data structures to print
4928         locus.
4929         * scanner.c (first_file, first_duplicated_file, gfc_current_file):
4930         Remove.
4931         (file_head, current_file, gfc_current_form, line_head, line_tail,
4932         gfc_current_locus1, gfc_source_file): New global variables.
4933         (gfc_scanner_init1): Set new global variables.
4934         (gfc_scanner_done1): Free new data structures.
4935         (gfc_current_locus): Return pointer to gfc_current_locus1.
4936         (gfc_set_locus): Set gfc_current_locus1.
4937         (gfc_at_eof): Set new variables.
4938         (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
4939         to new locus structure.
4940         (gfc_check_include): Remove.
4941         (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
4942         (gfc_skip_comments): Use gfc_current_form, find locus with
4943         gfc_current_locus1.
4944         (gfc_next_char): Use gfc_current_form.
4945         (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
4946         (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
4947         comment formatting.
4948         (get_file): New function.
4949         (preprocessor_line, include_line): New functions.
4950         (load_file): Move down, rewrite to match new data structures.
4951         (gfc_new_file): Rewrite to match new data structures.
4952         * parse.c (next_statement): Remove code which is now useless. Use
4953         gfc_source_form and gfc_source_file where appropriate.
4954         * trans-decl.c (gfc_get_label_decl): adapt to new data structures
4955         when determining locus of frontend code.
4956         * trans-io.c (set_error_locus): Same.
4957         * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
4958         * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
4959         preprocessor flags.
4960         (all): Add missing initializers.
4961
4962 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4963
4964         * Make-lang.in (trans-common.o): Remove redundant dependency.
4965         (data.c): Replace object file name ...
4966         (data.o): ... by the correct one.
4967
4968 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4969
4970         * dump-parse-tree.c (gfc_show_array_ref): Print colon only
4971         for ranges when dumping array references.
4972
4973 2004-05-14  Victor Leikehman  <lei@haifasphere.co.il>
4974
4975         * decl.c (variable_decl): Always apply default initializer.
4976
4977 2004-05-08  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
4978
4979         PR fortran/15206
4980         * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
4981         handle zero correctly.
4982
4983 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4984
4985         * match.c (gfc_match): Eliminate dead code.
4986
4987 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4988
4989         * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
4990         Detect bad continuation line in fixed form sources.
4991
4992 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
4993
4994         PR fortran/15205
4995         * iresolve.c (gfc_resolve_nearest): Add new function.
4996         * intrinsic.h: ... declare it here.
4997         * intrinsic.c (add_functions): ... add it as resolving function
4998         for NEAREST.
4999
5000 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
5001
5002         PR fortran/14066
5003         * match.c (gfc_match_do): Allow infinite loops with
5004         label-do-stmt. Do not enforce space after comma.
5005
5006 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
5007
5008         PR fortran/15051
5009         * parse.c (parse_interface): Allow empty INTERFACE, remove
5010         seen_body.
5011
5012 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
5013
5014         * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
5015         decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
5016         expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
5017         intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
5018         matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
5019         primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
5020         trans-array.c, trans-array.h, trans-common.c, trans-const.c,
5021         trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
5022         trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
5023         trans-types.h, trans.c, trans.h: Update copyright years and
5024         boilerplate.
5025         * data.c: Likewise, also removed two whitespace-only lines.
5026         * gfortranspec.c, lang.opt: Update copyright years.
5027
5028 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
5029
5030         PR fortran/14568
5031         * trans-decl.c (generate_local_decl): Don't warn for unused
5032         variables which are in common blocks.
5033
5034 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
5035
5036         * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
5037         trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
5038         trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
5039
5040 2004-05-13  Victor Leikehman  <lei@haifasphere.co.il>
5041
5042         PR fortran/15314
5043         * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
5044
5045 2004-05-13  Joseph S. Myers  <jsm@polyomino.org.uk>
5046
5047         * gfortran.texi: Use @table @emph instead of @itemize @emph.
5048         Remove "set DEVELOPMENT".
5049         (Compiling GFORTRAN): Remove.
5050
5051 2004-05-09  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
5052
5053         * array.c (match_subscript, match_array_ref): Add comments
5054         explaining argument 'init'.
5055         * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
5056         trans-expr.c, trans.c: Fix some typos in comments.
5057         * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
5058         * primary.c (match_digits, match_integer_constant): Add comment
5059         explaining signflag.
5060
5061 2004-05-01  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
5062
5063         PR fortran/13940
5064         * primary.c: Include system.h and flags.h, needed for pedantic.
5065         (match_boz_constant): Allow "x" for hexadecimal constants, warn if
5066         pedantic is set.
5067
5068 2004-05-01  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
5069
5070         PR fortran/13940
5071         * match.c (match_data_constant): Handle case where
5072         gfc_find_symbol sets sym to NULL
5073
5074 2004-04-28  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
5075
5076         * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
5077         dependency on mathbuiltins.def
5078
5079 2004-04-24  Victor Leikehman  <lei@il.ibm.com>
5080
5081         * trans-io.c (transfer_expr): Implemented recursive printing
5082         of derived types.
5083
5084 2004-04-24  Andrew Pinski  <pinskia@physics.uc.edu>
5085
5086         * gfortranspec.c: Do not include multilib.h.
5087
5088 2004-04-24  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
5089
5090         * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
5091         2004 to copyright years.
5092         * trans-expr.c, trans-decl.c: Comment update, we now generate
5093         GENERIC, not SIMPLE. Add 2004 to copyright years.
5094
5095 2004-04-24  Paul Brook  <paul@codesourcery.com>
5096
5097         * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
5098
5099 2004-04-24  Feng Wang  <fengwang@nudt.edu.cn>
5100
5101         PR 14817
5102         * arith.c (gfc_arith_divide): Fix complex divide.
5103
5104 2004-04-23  Andrew Pinski  <pinskia@physics.uc.edu>
5105
5106         * gfortranspec.c: Include the target headers.
5107
5108 2004-04-18  Feng Wang  <fengwang@nudt.edu.cn>
5109
5110         PR fortran/14921
5111         PR fortran/14540
5112         * arith.c (arctangent2): New function.
5113         * arith.h (arctangent2): Add function prototype.
5114         * simplify.c (gfc_simplify_atan2): Use it.
5115         (gfc_simplify_log): Use it.
5116
5117 2004-04-12  Diego Novillo  <dnovillo@redhat.com>
5118
5119         * fortran/f95-lang.c (gfc_expand_stmt): Remove.
5120         (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
5121
5122 2004-04-11  Bud Davis  <bdavis9659@comcast.net>
5123
5124         PR fortran/14872
5125         * trans-io.c (build_dt): Change REC to value.
5126
5127 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
5128
5129         PR 14394
5130         * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
5131         the real value when converting mpf to string.
5132
5133 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
5134
5135         PR 14395
5136         * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
5137         the result.
5138
5139 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
5140
5141         PR fortran/14377
5142         * simplify.c (simplify_min_max): Convert the type of the result.
5143
5144 2004-04-11  Paul Brook  <paul@codesourcery.com>
5145
5146         * gfortran.texi: Use full target triplet.
5147
5148 2004-04-11  Paul Brook  <paul@codesourcery.com>
5149
5150         * Make-lang.in (GFORTRAN_TEXI): Set it.
5151         (fortran/dfortran.dvi): Use it.  Add fortran to include paths.
5152         (fortran/gfortran.info): Ditto.
5153         * gfortran.texi: Major update.
5154         * invoke.texi: New file.
5155
5156 2004-04-10  Paul Brook  <paul@codesourcery.com>
5157
5158         * trans-array.c (gfc_trans_allocate_temp_array,
5159         gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
5160         * trans-decl.c (gfc_build_dummy_array_decl,
5161         gfc_get_symbol_decl, gfc_build_function_decl,
5162         gfc_create_module_variable): Ditto.
5163         * trans-expr.c (gfc_conv_variable): Ditto.
5164         * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
5165         * trans.h (GFC_DECL_STRING): Remove.
5166         (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
5167         GFC_DECL_ASSIGN): Renumber flags.
5168
5169 2004-04-05  Paul Brook  <paul@codesourcery.com>
5170
5171         PR 13252
5172         PR 14081
5173         * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
5174         and stack_restore.
5175         * gfortran.h (struct gfc_charlen): Add backend_decl.
5176         * trans-array.c (gfc_trans_allocate_temp_array,
5177         gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
5178         (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
5179         Remove old, broken string handling.
5180         (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
5181         gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
5182         gfc_trans_deferred_array): Handle character arrays.
5183         * trans-const.c (gfc_conv_const_charlen): New function.
5184         * trans-const.h (gfc_conv_const_charlen): Add prototype.
5185         * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
5186         as static.
5187         (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
5188         (gfc_create_string_length): New function.
5189         (gfc_get_symbol_decl): Create lengths for character variables.
5190         (gfc_get_fake_result_decl): Ditto.
5191         (gfc_build_function_decl): Only set length for assumed length
5192         character arguments.
5193         (gfc_trans_dummy_character): New function.
5194         (gfc_trans_auto_character_variable): Rewrite.
5195         (gfc_trans_deferred_vars): Handle more types of character variable.
5196         (gfc_create_module_variable): String lengths have moved.
5197         (gfc_generate_function_code): Initialize deferred var chain earlier.
5198         * trans-expr.c (gfc_conv_init_string_length): Rename ...
5199         (gfc_trans_init_string_length):  ... to this.
5200         (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
5201         gfc_conv_function_call): Update to new format for character variables.
5202         (gfc_conv_string_length): Remove.
5203         (gfc_conv_string_parameter): Update assertion.
5204         * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
5205         * trans-io.c (set_string): Use new macro names.
5206         * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
5207         * trans-types.c (gfc_get_character_type): Use existing length expr.
5208         (gfc_is_nodesc_array): Make public.
5209         (gfc_get_dtype_cst): Rename ...
5210         (gfc_get_dtype): ... to this.  Handle unknown size arrays.
5211         (gfc_get_nodesc_array_type): Use new name.
5212         (gfc_sym_type): New character variable code.
5213         (gfc_get_derived_type): Ditto.
5214         (gfc_get_function_type): Evaluate character variable lengths.
5215         * trans-types.h (gfc_strlen_kind): Define.
5216         (gfc_is_nodesc_array): Add prototype.
5217         * trans.h: Update prototypes.
5218         (struct lang_type): Update comments.
5219         (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
5220         (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
5221
5222 2004-04-04  Paul Brook  <paul@codesourcery.com>
5223
5224         * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
5225         * options.c (gfc_init.options, gfc_handle_option): Ditto.
5226         * trans-expr.c (gfc_conv_function_call): Ditto.
5227         * trans-types.c (gfc_is_nodesc_array): Ditto
5228         * lang.opt (fg77-calls): Remove.
5229
5230 2004-04-04  Paul Brook  <paul@codesourcery.com>
5231
5232         * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
5233         (gfc_conv_descriptor_base): Rename ...
5234         (gfc_conv_descriptor_offset): ... to this.
5235         (gfc_trans_allocate_array_storage): Set offset to zero.
5236         (gfc_conv_array_base): Rename ...
5237         (gfc_conv_array_offset): ... to this.
5238         (gfc_conv_array_index_ref): Add offset parameter.
5239         (gfc_conv_array_ref): Include offset.
5240         (gfc_trans_preloop_setup): Use existing offset.
5241         (gfc_trans_allocate_temp_array,  gfc_array_allocate,
5242         gfc_trans_auto_array_allocation, gfc_trans_g77_array,
5243         gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
5244         gfc_conf_ss_descriptor): Set offset.
5245         * trans-array.h: Rename prototypes.
5246         * trans-const.h (gfc_index_zero_node): Define.
5247         * trans-decl.c (gfc_build_qualified_array): Change base to offset.
5248         * trans-types.c (gfc_get_array_type_bounds): Ditto.
5249         (gfc_get_nodesc_array_type): Calculate offset before upper bound.
5250
5251 2004-03-25  Diego Novillo  <dnovillo@redhat.com>
5252
5253         * convert.c (convert): Don't handle WITH_RECORD_EXPR.
5254
5255 2004-03-24  Bud Davis  <bdavis9659@comcast.net>
5256
5257         PR 14055
5258         * arith.c (gfc_convert_integer,gfc_convert_real):  Removed leading '+'
5259         before conversion by gmp library call.
5260
5261 2004-03-24  Bud Davis  <bdavis9659@comcast.net>
5262
5263         PR 12921
5264         * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
5265
5266 2004-02-24  Richard Henderson  <rth@redhat.com>
5267
5268         * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
5269
5270 2004-02-19  Loren J. Rittle  <ljrittle@acm.org>
5271
5272         * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
5273         (fortran/gfortran.info): ... to here.
5274         (f95.srcinfo): New.
5275
5276 2004-02-16  Richard Henderson  <rth@redhat.com>
5277
5278         * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
5279         * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
5280         (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
5281         (gfc_expand_function): Rename from expand_function_body, make static,
5282         don't do anything except invoke tree_rest_of_compilation.
5283         (gfc_be_parse_file): Invoke cgraph.
5284         (gfc_expand_decl): Remove.
5285         (gfc_init_builtin_functions): Add __builtin_init_trampoline and
5286         __builtin_adjust_trampoline.
5287         * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
5288         (gfc_finalize): New.
5289         (gfc_generate_function_code): Use it.  Lower nested functions.
5290         * trans-expr.c (gfc_conv_function_call): Add static chain operand
5291         to call_expr.
5292         * trans.c (gfc_build_function_call): Likewise.
5293         * trans.h (expand_function_body): Remove.
5294
5295 2004-02-15  Victor Leikehman  <lei@il.ibm.com>
5296
5297         PR gfortran/13433
5298         * trans-decl.c (gfc_build_function_decl) For functions
5299         returning CHARACTER pass an extra length argument,
5300         following g77 calling conventions.
5301         * trans-types.c (gfc_get_function_type) Ditto.
5302         * trans-expr.c (gfc_conv_function_call) Ditto.
5303
5304 2004-02-14  Paul Brook  <paul@codesourcery.com>
5305
5306         * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
5307
5308 2004-02-12  Paul Brook  <paul@nowt.org>
5309
5310         * BUGS: Remove.
5311
5312 2004-02-08  Steve Kargl  <sgk@troutmask.apl.washington.edu>
5313
5314         * gfortran.texi: Fix typos.
5315
5316 2004-02-07  Bud Davis  <bdavis9659@comcast.net>
5317
5318         PR gfortran/13909
5319         * intrinsic.c (add_conversions) Use logical conversion instead
5320         of real.
5321         * trans-types.c (gfc_get_logical_type) implemented logical*1
5322         and logical*2.
5323
5324 2004-01-17  Paul Brook  <paul@codesourcery.com>
5325
5326         * lang-specs.h: Remove %<fixed-form.
5327
5328 2004-01-15  Toon Moene  <toon@moene.indiv.nluug.nl>
5329
5330         * lang-specs.h: Enable preprocessing of source files
5331         ending in .F, .fpp, .FPP, .F90 and .F95.
5332
5333 2004-01-13  Toon Moene  <toon@moene.indiv.nluug.nl>
5334
5335         PR fortran/12912
5336         * lang-specs.h: Enable compilation of files ending
5337         in .f, .for and .FOR.
5338
5339 2004-01-11  Paul Brook  <paul@codesourcery.com>
5340
5341         * trans-stmt.c (gfc_trans_if_1): New function.
5342         (gfc_trans_if): Use it.
5343
5344 2004-01-11  Erik Schnetter  <schnetter@uni-tuebingen.de>
5345
5346         * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
5347         (gfc_option_t): Add max_identifier_length.
5348         * lang.opt: Add fmax-identifier-length.
5349         * match.c (parse_name): Use limit.
5350         * options.c (gfc_init_options): Set max_identifier_length.
5351         (gfc_handle_option): Ditto.
5352
5353 2004-01-11  Feng Wang  <fengwang@nudt.edu.cn>
5354
5355         * intrinsic.c (add_functions): Add resolve function to dcmplx.
5356         * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
5357         * iresolve.c (gfc_resolve_dcmplx): New function.
5358
5359 2004-01-10  Paul Brook  <paul@codesourcery.com>
5360
5361         * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
5362         * trans-types.c (gfc_sym_type): Handle external dummy procedures.
5363         (gfc_return_by_reference): Correct condition.
5364         (gfc_get_function_type): Ditto.
5365
5366 2004-01-10  Paul Brook  <paul@codesourcery.com>
5367
5368         * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
5369         types.
5370
5371 2004-01-10  Huang Chun  <chunhuang73@hotmail.com>
5372
5373         * iresolve.c: Use correct kind.
5374
5375 2004-01-10  Huang Chun  <chunhuang73@hotmail.com>
5376
5377         PR fortran/13467
5378         * trans-decl.c (gfc_create_module_variable):  Output array valued
5379         parameters.
5380
5381 2004-01-10  Paul Brook  <paul@codesourcery.com>
5382
5383         * resolve.c (resolve_branch): Get error message right way round.
5384
5385 2004-01-10  Canqun Yang  <canqun@nudt.edu.cn>
5386
5387         * trans-array (gfc_conv_loop_setup): Adjust comment to track
5388         reality.
5389         (gfc_array_allocate): Don't count size of element twice.
5390
5391 2004-01-04  Paul Brook  <paul@codesourcery.com>
5392
5393         * lang.opt (i8, r8, std=*): Remove RejectNegative.
5394
5395 2004-01-04  Paul Brook  <paul@codesourcery.com>
5396
5397         * error.c (gfc_notify_std): New function.
5398         * gfortran.h (gfc_notify_std): Declare.
5399         (GFC_STD_*): Define.
5400         (gfc_option_t): Add warn_std and allow_std.
5401         * intrinsic.c (gfc_init_expr_extensions): Fix logic.
5402         (gfc_intrinsic_func_interface): Use gfc_notify_std.
5403         * check.c (check_rest): Use gfc_notify_std.
5404         * match.c (gfc_match_pause): Ditto.
5405         (gfc_match_assign): Ditto.
5406         (gfc_match_goto): Ditto.
5407         * resolve.c (resolve_branch): Ditto.
5408         * lang.opt: Add std=<foo> and w.
5409         * options.c (gfc_init_options): Set allow_std and warn_std.
5410         (gfc_handle_option): Handle OPT_std_* and OPT_w.
5411
5412 2004-01-01  Paul Brook  <paul@codesourcery.com>
5413
5414         * array.c (gfc_append_constructor): Take constructor, not expression.
5415         * data.c (struct gfc_expr_stack): Remove.
5416         (expr_stack): Remove.
5417         (find_con_by_offset): Rename from find_expr_in_con.
5418         (find_con_by_component): Rename from find_component_in_con.
5419         (gfc_get_expr_stack): Remove.
5420         (gfc_assign_data_value): Rewrite.
5421         (gfc_expr_push): Remove.
5422         (gfc_expr_pop): Remove.
5423         (gfc_advance_section): Rename from
5424         gfc_modify_index_and_calculate_offset.  Handle unbounded sections.
5425         (gfc_get_section_index): Handle unbounded sections.
5426         * gfortran.h: Update prototypes.
5427         * resolve.c (check_data_variable): Array section maight not be the
5428         last ref.
5429
5430 2004-01-01  Paul Brook  <paul@codesourcery.com>
5431
5432         PR fortran/13432
5433         * resolve.c (resolve_symbol): Allow assumed length function results.
5434
5435 2004-01-01  Steve Kargl  <sgk@troutmask.apl.washington.edu>
5436
5437         * match.c (gfc_match_pause): Fix spelling.
5438
5439 2004-01-01  Steven Bosscher  <stevenb@suse.de>
5440
5441         PR fortran/13251
5442         * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
5443         reference from the expression.
5444
5445 2003-12-26  Feng Wang  <fengwang@nudt.edu.cn>
5446
5447         * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
5448         dumping.
5449         * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
5450         (gfc_exec_op): New EXEC_LABEL_ASSIGN.
5451         (symbol_attribute):New variable attribute: assign.
5452         * io.c (resolve_tag):Integer variable is allowed.
5453         (match_dt_format): Add ASSIGN statement. Set assign flag.
5454         * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
5455         (gfc_match_assign): Add ASSIGN statement. Set assign flag.
5456         (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
5457         * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
5458         (next_statement): Add ST_LABEL_ASSIGNMENT.
5459         (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
5460         * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
5461         (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
5462         * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
5463         * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
5464         assign.  Put them into the stuct lang_decl.
5465         * trans-io.c (set_string): Add the assign statement.
5466         * trans-stmt.c (gfc_trans_label_assign): New function.
5467         (gfc_trans_goto): Translate ASSIGNED GOTO statement.
5468         * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
5469         * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
5470         * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
5471         (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
5472         (GFC_DECL_ASSIGN(node)): New macro to access flag.
5473
5474 2003-12-31  Huang Chun  <chunhuang73@hotmail.com>
5475
5476         PR fortran/13434
5477         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
5478         minval/maxval.
5479
5480 2003-12-22  Toon Moene  <toon@moene.indiv.nluug.nl>
5481
5482         * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
5483         that arguments to subroutines/functions can't alias themselves, nor global
5484         memory.
5485
5486 2003-12-20  Steven Bosscher  <stevenb@suse.de>
5487
5488         * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
5489         * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
5490
5491 2003-12-12  Huang Chun  <chunhuang73@hotmail.com>
5492
5493         * primary.c (match_substring): Fix substring bug for start point
5494         or end point is NULL.
5495         * trans-expr.c (gfc_conv_substring): Ditto
5496         * trans-types.c (gfc_sym_type): Get correct type of scalar
5497         character variables.
5498         * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
5499         derived type.
5500
5501 2003-12-10  Richard Henderson  <rth@redhat.com>
5502
5503         * options.c (gfc_post_options): Don't ever use rtl inlining.
5504
5505 2003-12-05  Canqun Yang  <canqun@nudt.edu.cn>
5506
5507         * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
5508         * trans-equivalence.c: Remove.
5509         * trans-decl.c (gfc_get_symbol_decl): Update to match.
5510         (gfc_generate_function_code): Ditto.
5511         * trans-array.c (gfc_conv_array_parameter): Ditto.
5512         * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
5513         (F95_ADDITIONAL_OBJS): Add stor-layout.o
5514         * trans.h (gfc_trans_equivalence): Remove.
5515         * gfortran.h (struct gfc_equiv): Add used field.
5516         (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
5517         equiv_offset fields.
5518
5519 2003-12-05  Richard Henderson  <rth@redhat.com>
5520
5521         * trans.c (gfc_build_addr_expr): New.
5522         (gfc_build_indirect_ref, gfc_build_array_ref): New.
5523         * trans.h: Declare them.
5524         * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
5525         trans-stmt.c, trans.c (*): Use them.
5526
5527         * f95-lang.c (gfc_post_options): Remove dead prototype.
5528         * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
5529         * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
5530         allocation size.
5531
5532 2003-12-01  Feng Wang  <fengwang@nudt.edu.cn>
5533
5534         * io.c (gfc_match_format): Check for missing format label.
5535
5536 2003-11-30 Huang Chun  <chunhuang73@hotmail.com>
5537
5538         PR fortran/13155
5539         * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
5540         from interfaces in modules.
5541
5542 2003-11-30  Paul Brook  <paul@nowt.org>
5543
5544         * trans-array.c (gfc_trans_g77_array): Make non-static.
5545         (gfc_trans_assumed_size): Remove.
5546         (gfc_trans_dummy_array_bias): Explicitly free temporary.
5547         * trans-array.h (gfc_trans_g77_array): Add prototype.
5548         (gfc_trans_assumed_size): Remove.
5549         * trans-decls.c (gfor_fndecl_push_context): Remove.
5550         (gfor_fndecl_pop_context): Remove.
5551         (gfc_build_function)decls): Don't create them.
5552         (gfc_trans_deferred_vars): Update to match. Remove dead code.
5553         * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
5554
5555 2003-11-30  Kejia Zhao  <kejia_zh@nudt.edu.cn>
5556
5557         * trans-array.c (gfc_conv_array_parameter): Simplify
5558         array argument passing for array name actual argument.
5559         * trans-expr.c (gfc_conv_function_call): Ditto
5560         * trans-types.c (gfc_is_nodesc_array):Ditto.
5561
5562 2003-11-30  Paul Brook  <paul@nowt.org>
5563
5564         * f95-lang.c (gfc_post_options): Move ...
5565         * options.c (gfc_post_options): .. to here.  Handle inlining options.
5566         * gfortran.h (gfc_post_options): Add prototype.
5567
5568 2003-11-28  Richard Henderson  <rth@redhat.com>
5569
5570         * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
5571
5572 2003-11-28 Huang Chun  <chunhuang73@hotmail.com>
5573
5574         * trans.h (has_alternate_specifier): New global variable.
5575         * match.c (gfc_match_call): Handle actual arguments associated with
5576         alternate return indicators.
5577         * trans-expr.c (gfc_conv_function_call): Ditto
5578         * trans-stmt.c (gfc_trans_call): Ditto
5579         (gfc_trans_return): Handle return statement with value.
5580         * trans-decl.c (gfc_generate_function_code): Handle functions with
5581         asterisk dummy.
5582         (gfc_get_fake_result_decl): Ditto
5583         * trans-types.c (gfc_get_function_type): Ditto
5584         * resolve.c (resolve_actual_arglist): Check alternate return indicators.
5585         (resolve_formal_arglist): Check asterisk dummy.
5586
5587 2003-11-27  Paul Brook  <paul@nowt.org>
5588
5589         * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
5590         allocation interface.
5591         (gfc_conv_ array_parameter): Ditto.
5592         (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
5593         * trans-array.c: Update prototype.
5594         * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
5595         (gfc_trans_auto_character_variable): Use new memory alloc interface.
5596         * trans-expr.c (gfc_conv_string_tmp): Ditto.
5597         (gfc_conv_function_call): Use gfc_conv_string_tmp.
5598         * trans-stmt.c (gfc_do_allocate):  Use new memory alloc interface.
5599         * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
5600         * trans.h (gfc_ss_info): Remove unused pdata field.
5601         * trans.c (gfc_create_var_np): Change T to V.
5602
5603 2003-11-26  Richard Henderson  <rth@redhat.com>
5604
5605         * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
5606         * trans-intrinsic.c (gfc_intrinsic_map): ... here.  Add SCALE,
5607         FRACTION, NEAREST, SET_EXPONENT.
5608         (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
5609         Fix GTY marking.  Remove unnecessary const's.
5610         (LIBM_FUNCTION): Rename from I_LIB.
5611         (LIBF_FUNCTION): New.
5612         (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
5613         conventions.  Assume the expr signature is correct.  Mark const.
5614         (gfc_conv_intrinsic_exponent): Use library functions.
5615         (gfc_conv_intrinsic_set_exponent): Remove.
5616         (gfc_conv_intrinsic_scale): Remove.
5617         (gfc_conv_intrinsic_nearest): Remove.
5618         (gfc_conv_intrinsic_fraction): Remove.
5619         (gfc_conv_intrinsic_function): Update.
5620         * trans-decl.c (gfor_fndecl_math_exponent4): New.
5621         (gfor_fndecl_math_exponent8): New.
5622         (gfc_build_intrinsic_function_decls): Set them.
5623         * trans.h: Declare them.
5624
5625 2003-11-25  Canqun Yang  <canqun@nudt.edu.cn>
5626
5627         * trans-common.c (gfc_layout_global_equiv): Locate the error for
5628         underflow COMMON block.
5629         (gfc_trans_one_common): Fix bug for size of COMMON block containing
5630         EQUIVALENCE object. Also fix typo in an error message.
5631
5632 2003-11-25  Diego Novillo  <dnovillo@redhat.com>
5633
5634         * Make-lang.in: Add check-gfortran to lang_checks.
5635         (check-f95): Alias for check-gfortran.
5636
5637 2003-11-25  Jason Merrill  <jason@redhat.com>
5638
5639         * Make-lang.in (f95.tags): Create TAGS.sub files in each
5640         directory and TAGS files that include them for each front end.
5641
5642 2003-11-24  Paul Brook  <paul@nowt.org>
5643
5644         PR fortran/13154
5645         * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
5646
5647 2003-11-24  Paul Brook  <paul@nowt.org>
5648
5649         * expr.c (simplify_const_ref): Return SUCCESS for things we don't
5650         handle.
5651         * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
5652
5653 2003-11-24  Paul Brook  <paul@nowt.org>
5654
5655         PR fortran/13105
5656         * array.c (gfc_array_ref_shape): Handle elemental dimensions.
5657         * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
5658
5659 2003-11-20  Richard Henderson  <rth@redhat.com>
5660
5661         * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
5662         (gfc_conv_array_base): Likewise.
5663         * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
5664         * trans-expr.c (gfc_conv_string_tmp): Likewise.
5665         * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
5666         * trans-stmt.c (gfc_trans_character_select): Likewise.
5667
5668 2003-11-13  Paul Brook  <paul@nowt.org>
5669
5670         * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
5671
5672 2003-11-13  Canqun Yang  <canqun@nudt.edu.cn>
5673
5674         * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
5675         (resolve_equivalence): New function.
5676         (resolve_equivalence_derived): New function.
5677
5678 2003-11-12  Richard Henderson  <rth@redhat.com>
5679
5680         * trans.c (gfc_trans_code): Use annotate_with_locus instead of
5681         annotate_all_with_locus.
5682
5683 2003-11-11  Canqun Yang  <canqun@nudt.edu.cn>
5684
5685         * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
5686         * trans-decl.c (gfc_finish_var_decl): Modified.
5687
5688 2003-11-08  Paul Brook  <paul@nowt.org>
5689
5690         PR fortran/12704
5691         * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
5692         arrays.
5693
5694 2003-11-06  Paul Brook  <paul@nowt.org>
5695
5696         * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
5697
5698 2003-11-02  Canqun Yang  <canqun@nudt.edu.cn>
5699
5700         * match.c (gfc_match_stopcode): Assign '0' to stop_code.
5701
5702 2003-10-27  Anthony Green  <green@redhat.com>
5703
5704         * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
5705         (f95.stagefeedback): Ditto.
5706
5707 2003-10-27  Andrew Pinski  <pinskia@physics.uc.edu>
5708
5709         PR fortran/12682
5710         * Make-lang.in (f95.stageprofile): Add.
5711         (f95.stagefeedback): Add.
5712
5713 2003-10-23  Richard Henderson  <rth@redhat.com>
5714
5715         * f96-lang.c (gfc_gimplify_expr): Remove.
5716         (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
5717         (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
5718
5719 2003-10-23  Richard Henderson  <rth@redhat.com>
5720
5721         * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
5722
5723 2003-10-20  Paul Brook  <paul@nowt.org>
5724
5725         * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
5726         * trans-stmt.c (gfc_trans_do_while): Ditto.
5727
5728 2003-10-17  Paul Brook  <paul@nowt.org>
5729
5730         * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
5731
5732 2003-10-17  Paul Brook  <paul@nowt.org>
5733
5734         * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
5735
5736 2003-10-17  Feng Wang  <wf_cs@yahoo.com>
5737
5738         * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
5739         (gfc_resolve_minloc): Ditto.
5740         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
5741         Return the value after subtracting the lower bound.
5742
5743 2003-10-16  Richard Henderson  <rth@redhat.com>
5744
5745         * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
5746
5747 2003-10-16  Steven Bosscher  <steven@gcc.gnu.org>
5748
5749         * lang.c: Remove -M option for now, it's in the way for C.
5750
5751 2003-10-14  Jason Merrill  <jason@redhat.com>
5752
5753         * Make-lang.in (f95.tags): New rule.
5754
5755 2003-10-13  Richard Henderson  <rth@redhat.com>
5756
5757         * trans.c (gfc_trans_code): Use annotate_all_with_locus.
5758
5759 2003-10-13  Paul Brook  <paul@nowt.org>
5760
5761         * trans-decl.c (generate_local_decl): Don't create junk variables.
5762
5763 2003-10-13  Paul Brook  <paul@nowt.org>
5764
5765         * resolve.c (resolve_formal_arglist): Use function result decl in
5766         preference to function decl.
5767
5768 2003-10-12  Richard Henderson  <rth@redhat.com>
5769
5770         * f95-lang.c (gfc_define_builtin): New const_p argument.  Set
5771         TREE_READONLY.  Update all callers.
5772
5773 2003-10-12  Feng Wang  <wf_cs@yahoo.com>
5774
5775         * iresolve.c (gfc_resolve_cshift): Change to match implementation.
5776         * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
5777         (gfc_is_intrinsic_libcall): Add CSHIFT.
5778
5779 2003-10-12  Richard Henderson  <rth@redhat.com>
5780
5781         * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
5782         (gfc_trans_array_constructor_value): Likewise.
5783         (gfc_conv_array_initializer): Likewise.
5784         * trans-stmt.c (gfc_trans_character_select): Likewise.
5785
5786 2003-11-12  Kejia Zhao  <kejia_zh@yahoo.com.cn>
5787
5788         * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
5789
5790 2003-10-11  Huang Chun  <jiwang@mail.edu.cn>
5791
5792         * check.c (gfc_check_repeat): Check arguments are scalar.
5793         (gfc_check_trim): New function.
5794         * intrinsic.h (gfc_check_trim): Add prototype.
5795         * intrinsic.c (add_functions): Use it.
5796         * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
5797         Decalare.
5798         * trans-decl.c: Ditto.
5799         (gfc_build_intrinsic_fucntion_decls): Set them.
5800         * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
5801         (gfc_conv_intrinsic_trim): New function.
5802         (gfc_conv_intrinsic_repeat): New function.
5803         (gfc_conv_intrinsic_function): Use them.
5804
5805 2003-10-11  Huang Chun  <jiwang@mail.edu.cn>
5806
5807         * trans-types.c (gfc_sym_type): Handle result variables.
5808
5809 2003-10-11  Huang Chun  <jiwang@mail.edu.cn>
5810
5811         * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
5812         gfc_get_character_type.
5813
5814 2003-10-11  Feng Wang  <wf_cs@yahoo.com>
5815
5816         * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
5817
5818 2003-10-11  Paul Brook  <paul@nowt.org>
5819
5820         * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
5821         (gfc_resolve_dprod): New function.
5822         (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
5823         * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
5824         (gfc_resolve_dprod): Declare.
5825         * intrinsic.c (add_functions): Use them.
5826         * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
5827
5828 2003-10-06  Richard Henderson  <rth@redhat.com>
5829
5830         * f95-lang.c (gfc_init_builtin_functions): Add clzll.
5831         * trans-intrinsic.c (call_builtin_clz): Use it.
5832
5833 2003-10-05  Paul Brook  <paul@nowt.org>
5834
5835         * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
5836         * trans-decl.c (gfc_generate_function_code): Set
5837         cfun->function_end_locus.
5838
5839 2003-09-24  Jason Merrill  <jason@redhat.com>
5840
5841         * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
5842         TREE_LOCUS.
5843
5844 2003-09-21  Lifang Zeng  <zlf605@hotmail.com>
5845         Paul Brook  <paul@nowt.org>
5846
5847         * Make-lang.in (F95_OBJS): Add fortran/data.o.
5848         * array.c (gfc_inser_constructor): New function.
5849         (gfc_get_constructor): New function.
5850         (gfc_free_constructor): Initialize offset and repeat.
5851         (iterator_stack): Remove.
5852         (expand_info): Add offset, component and repeat fields.
5853         (expand_constructor): Set them.
5854         (expand): Set new fields.
5855         (gfc_copy_constructor): Ditto. Avoid recursion.
5856         * gfortran.h: Add prototypes for new functions.
5857         (gfc_constructor): Add offset, component and repeat.
5858         (iteratio_stack): Move to here.
5859         * resolve.c (check_data_variable): Convert data values into variable
5860         initializers.
5861         (traverse_data_list): Build implicit loop chain.
5862         (gfc_resolve): Ditto.
5863         * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
5864         * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
5865         * trans-expr.c (gfc_conv_structure): Handle array initializers.
5866         (gfc_conv_expr): Update to match.
5867         * trans.h (gfc_conv_structure): Declare.
5868         * data.c: New file.
5869
5870 2003-09-20  Kejia Zhao  <kejia_zh@yahoo.com.cn>
5871
5872         * trans.h: Add declarations for gfor_fndecl_si_kind and
5873         gfor_fndecl_sr_kind.
5874         * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
5875         * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
5876         (g95_conv_intrinsic_sr_kind): New function.
5877         (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
5878         SELECTED_REAL_KIND.
5879
5880 2003-09-17  Lars Segerlund  <Lars.Segerlund@comsys.se>
5881
5882         * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
5883         instead of _4 and _8 as postfix for libgfortran calls.
5884
5885 2003-09-16  Paul Brook  <paul@nowt.org>
5886
5887         * array.c (compare_bounds): New function.
5888         (gfc_compare_array_spec): Use it.
5889
5890 2003-09-14  Paul Brook  <paul@nowt.org>
5891
5892         * primary.c (gfc_match_rvalue): Make sure sym->result is set.
5893         * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
5894
5895 2003-09-14  Paul Brook  <paul@nowt.org>
5896
5897         * check.c (dim_rank_check): Allow assumed bounds if requested.
5898         (gfc_check_lbound): Call it.
5899         (gfc_check_ubound): Ditto.
5900         (gfc_check_size): Change to match.
5901         * simplify.c (gfc_simplify_bound): New function.
5902         (gfc_simplify_lbound): New function.
5903         (gfc_simplify_ubound): New function.
5904         * intrinsic.h: Declare them.
5905         * intrinsic.c (add_functions): Use them.
5906
5907 2003-09-14  Paul Brook  <paul@nowt.org>
5908
5909         * io.c (format_lex): Initialize negative_flag.
5910         (check_format): Intialize repeat.
5911         * trans-io.c (gfc_new_nml_name_expr): Declare static.
5912         (gfc_new_var_expr): Ditto.
5913
5914 2003-09-14  Paul Brook  <paul@nowt.org>
5915
5916         * trans-array.c (gfc_conv_array_initializer): Handle derived types.
5917         * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
5918
5919 2003-09-12  Paul Brook  <paul@nowt.org>
5920
5921         * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
5922
5923 2003-09-12  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
5924
5925         * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
5926         for a correct expression.
5927
5928 2003-09-10  Kejia Zhao  <kejia_zh@yahoo.com.cn>
5929
5930         * trans-intrinsic.c (real_compnt_info): New struct.
5931         (prepare_arg_info): New function.
5932         (gfc_conv_intrinsic_set_exponent): New function.
5933         (gfc_conv_intrinsic_scale): New function.
5934         (gfc_conv_intrinsic_nearest): New function.
5935         (gfc_conv_intrinsic_fraction): New function.
5936         (gfc_conv_intrinsic_exponent): New function.
5937         (gfc_conv_intrinsic_spacing): New function.
5938         (gfc_conv_intrinsic_rrspacing): New function.
5939         (gfc_conv_intrinsic_function): Use them.
5940
5941 2003-08-24 XiaoQiang Zhang  (zhangapache@yahoo.com>
5942
5943         * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
5944         build_int_2 changed from (high, low) to (low, high).
5945         * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
5946         ioparm_namelist_read_mode, iocall_set_nml_val_int,
5947         iocall_set_nml_val_float, iocall_set_nml_val_char,
5948         iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
5949         (gfc_build_io_library_fndecls): Add variable initialization.
5950         (gfc_new_nml_name_expr, get_new_var_expr): New function.
5951         (build_dt): Add namelist support.
5952         * io.c (value): New variable.
5953         (check_format): Support FMT_H now.
5954
5955 2003-09-07  Paul Brook  <paul@nowt.org>
5956
5957         * io.c (gfc_resolve_dt): Error if format label is not defined.
5958
5959 2003-09-07  Kejia Zhao  <kejia_zh@yahoo.com.cn>
5960
5961         * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
5962         about case_switch's break. The other is about building the condition
5963         statement tree, which judges the argument in the range of the
5964         corresponding integer type.
5965         * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
5966         for the large values.
5967
5968 2003-09-05  Paul Brook  <paul@nowt.org>
5969
5970         * f95-lang.c (expand_function_body): Gimplify the function.
5971
5972 2003-09-04  Jeff Law  <law@redhat.com>
5973
5974         * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
5975         index zero!
5976
5977 2003-09-04  Paul Brook  <paul@nowt.org>
5978
5979         * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
5980         (gfc_expand_stmt): New function.
5981         (LANG_HOOKS_RTL_EXPAND_STMT): Define.
5982         (expand_function_body): Use tree_rest_of_compilation.
5983         * trans-decl.c (gfc_generate_function_code): Don't free cfun.
5984
5985 2003-09-03  Jeff Law  <law@redhat.com>
5986
5987         * f95-lang.c (gfc_init_builtin_functions): C arrays start at
5988         index zero!
5989
5990 2003-08-30  Paul Brook  <paul@nowt.org>
5991
5992         * f95-lang.c (builtin_function): Remove #if 0 code.
5993         (gfc_define_builtin): New function.
5994         (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
5995         * mathbuiltins.def: New file.
5996         * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
5997         (gfc_intrinsic_map): Use mathbuiltins.def.
5998         (gfc_intrinsic_builtin_t): Remove.
5999         (gfc_build_intrinsic_lib_fndecls): Update.
6000         * trans-types.c (gfc_init_types): Remove redundant initilaization of
6001         signed_size_type_node.
6002
6003 2003-08-29  Paul Brook  <paul@nowt.org>
6004
6005         * arith.c (gfc_real_kinds): Use correct minimum exponents.
6006
6007 2003-08-22  Kejia Zhao  <kejia_zh@yahoo.com.cn>
6008
6009         * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
6010         (gfc_conv_intrinsic_function): Add MODULO.
6011
6012 2003-08-22  Jason Merrill  <jason@redhat.com>
6013
6014         * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
6015
6016 2003-08-22  Andreas Jaeger  <aj@suse.de>
6017
6018         * Make-lang.in (f95.install-common): Add DESTDIR support.
6019         * (f95.install-info): Likewise.
6020         (f95.uninstall): Likewise.
6021
6022 2003-08-19  Diego Novillo  <dnovillo@redhat.com>
6023
6024         * trans-types.c (gfc_init_types): Initialize
6025         signed_size_type_node with size_type_node.
6026
6027 2003-08-18  Paul Brook  <paul@nowt.org>
6028
6029         * dependency.c (gfc_dependency): New enum.
6030         (check_another_array_ref): Remove.
6031         (gfc_get_array_from_component): Remove.
6032         (get_x): Remove.
6033         (get_range): Remove.
6034         (get_no_of_elements): Use mpz_t, not mpf_t.
6035         (transform_sections): New function.
6036         (gfc_check_range_range): Rename ...
6037         (gfc_check_section_vs_section): ... to this.  Use new function.
6038         (gfc_is_inside_range): Rewrite to match.
6039         (gfc_check_element_vs_section): Ditto.
6040         (gfc_check_element_vs_element): Ditto.
6041         (get_deps): Ditto.
6042         (gfc_dep_resolver): Ditto.  Remove unused parameter.
6043         * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
6044         gfc_check_element_vs_element, gfc_is_inside_range,
6045         gfc_get_array_from_component): Remove prototypes for static functions.
6046         (gfc_dep_resolver): Update prototype.
6047         * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
6048
6049 2003-08-15  Paul Brook  <paul@nowt.org>
6050
6051         * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
6052         return values to parent scope.
6053         (gfc_build_dummy_array_decl): Ditto.
6054
6055 2003-08-14  Paul Brook  <paul@nowt.org>
6056
6057         * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
6058         size of the type, not the pointer.
6059         * resolve.c (resolve_symbol): Give more accurate error message.
6060
6061 2003-08-10  Paul Brook  <paul@nowt.org>
6062
6063         * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
6064
6065 2003-08-10  Paul Brook  <paul@nowt.org>
6066
6067         * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
6068         type components.
6069
6070 2003-08-10  Chun Huang  <compiler@sohu.com>
6071
6072         * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
6073         (resolve_symbol): Ditto.
6074         * trans-expr.c (gfc_conv_statement_function): New function.
6075         (gfc_conv_function_expr): Use it.
6076
6077 2003-08-10  Paul Brook  <paul@nowt.org>
6078
6079         * trans-array.c (gfc_conv_ss_startstride): Handle functions.
6080         (walk_function_expr): Set section rank.
6081         * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
6082
6083 2003-08-10  Paul Brook  <paul@nowt.org>
6084
6085         * intrinsic.c (add_sym): Prefix names with correct string.
6086         (add_sym_0s): New function.
6087         (add_subroutines): Register abort.
6088
6089 2003-08-10  Erik Schnetter  <schnetter@uni-tuebingen.de>
6090
6091         * gfortran.h: Introduce options to control the mangling.
6092         * lang.opt: Likewise.
6093         * options.c (gfc_init_options): Handle the options.
6094         * trans-common.c (gfc_sym_mangled_common_id): New function.
6095         (gfc_build_common_decl): Call it.
6096         * trans-decl.c (gfc_sym_mangled_function_id): New function.
6097         (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
6098
6099 2003-08-09  Paul Brook  <paul@nowt.org>
6100
6101         * module.c (mio_symbol): Always ouput a namespace for formal args.
6102         (load_needed): Namespace now belong to their proper symbol.
6103         (gfc_dump_module): Change G95=>GFORTRAN.
6104
6105 2003-08-05  Paul Brook  <paul@nowt.org>
6106
6107         * options.c: Force -fg77-calls.
6108
6109 2003-08-02  Paul Brook  <paul@nowt.org>
6110
6111         * Makelang.in: Rename G95_* to GFORTRAN_*.
6112         * All sources: Rename G95_* to GFC_*.
6113
6114 2003-08-01  Paul Brook  <paul@nowt.org>
6115
6116         * fortran/Make-lang.in: Use GMPLIBS.
6117         * fortran/config-lang.in: Set need_gmp.
6118         * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
6119
6120 2003-07-27  Andreas Jaeger  <aj@suse.de>
6121
6122         * trans-decl.c (gfc_generate_constructors): Convert prototype to
6123         ISO C90.
6124         * trans-const.c (gfc_init_constants): Likewise.
6125         * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
6126
6127         * gfortranspec.c: Convert to ISO C90.
6128         (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
6129
6130 2003-07-26  Paul Brook  <paul@nowt.org>
6131
6132         * lang.opt: Add -fdump-parse-tree.
6133         * options.c (gfc_handle_option): Ditto.
6134         * resolve.c (resolve_forall_iterators): Convert to proper type.
6135         * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
6136
6137 2003-07-26  Paul Brook  <paul@nowt.org>
6138
6139         * Makefile.in: Add build dependencies on files common with rest of gcc.
6140
6141 2003-07-26  Lifang Zeng  <zlf605@hotmail.com>
6142
6143         * trans.h: Declare g95_trans_pointer_assignment.
6144         * trans-expr.c (g95_trans_pointer_assignment): New function.
6145         (g95_trans_pointer_assign): Use it.
6146         * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
6147         (g95_trans_pointer_assign_need_temp): New function.
6148
6149 2003-07-26  Paul Brook  <paul@nowt.org>
6150
6151         * gfortran.texi: Replace references to g95.
6152
6153 2003-07-26  Paul Brook  <paul@nowt.org>
6154
6155         Rename g95_* to gfc_*.
6156
6157 2003-07-25  Paul Brook  <paul@nowt.org>
6158
6159         * gfortran.h: Rename from g95.h.
6160         * trans-types.c (boolean_type_node, booelan_true_node,
6161         boolean_false_node): Remove.
6162         * trans-types.h: Ditto.
6163
6164 2003-07-25  Chun Huang  <compiler@sohu.com>
6165
6166         * parse.c (accept_statement): Implement BLOCK DATA statement.
6167         * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
6168         variables.
6169
6170 2003-07-24  Lifang Zeng  <zlf605@hotmail.com>
6171
6172         * trans-stmt.c (temporary_list): Define.
6173         (g95_trans_assign_need_temp): New function.
6174         (g95_trans_forall_1): Modified for WHERE.
6175         (g95_trans_where_assign): Modified.
6176         (g95_trans_where_2): Modified.
6177         (g95_evaluate_where_mask): Modified.
6178         (g95_trans_where): Modified.
6179         (g95_get_temp_expr): Removed.
6180         (g95_add_to_where_stmt_list): Removed.
6181         (compute_overall_iter_number): Modified for WHERE.
6182         * trans.h: Remove where_stmt_list.
6183
6184 2003-07-24  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
6185
6186         * lang.opt: Correct description of options -J and -M.
6187
6188 2003-07-23  Steven Bosscher   <steven@gcc.gnu.org>
6189
6190         * lang.opt: Move help text to here.
6191         * lang-options.h: Remove.
6192
6193 2003-07-23  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
6194         * iresolve.c (g95_resolve_transpose): Proper variable in switch.
6195         * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
6196         on kind.
6197
6198 2003-07-22  Steven Bosscher  <steven@gcc.gnu.org>
6199         Paul Brook  <paul@nowt.org>
6200
6201         * check.c (check_rest): Use global pedantic flag.
6202         * io.c (data_desc): Ditto.
6203         * error.c (g95_warning, g95_warning_now): Use global flag.
6204         * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
6205         (expand_function_body): Update to new prototypes.
6206         (g95_init): Use new option names.
6207         * g95.h (g95_option_t): Standardize names.
6208         (g95_init_options, g95_handle_option): Update prototypes.
6209         * interface.c: Use new option names.
6210         * match.c: Ditto.
6211         * module.c: Ditto.
6212         * parse.c: Ditto.
6213         * primary.c: Ditto.
6214         * resolve.c: Ditto.
6215         * scanner.c: Ditto.
6216         * simplify.c: Ditto.
6217         * symbol.c: Ditto.
6218         * trans-array.c: Ditto.
6219         * trans-expr.c: Ditto.
6220         * trans-types.c: Ditto.
6221         * trans-decl.c: Ditto.
6222         (g95_build_library_function_decl): Remove obsolete VPARAMS.
6223         * trans.h: Ditto.
6224         * options.c (g95_display_help): Remove.
6225         (g95_init_options): Convert to new scheme.
6226         (set_Wall): Ditto
6227         (g95module_option): Ditto, rename from g95_parse_arg.
6228         (g95_handle_module_path_options): New function.
6229         * trans-equivalence.c: Fix error message.
6230         * lang.opt: Corrections.
6231
6232 2003-07-21  Steven Bosscher  <steven@gcc.gnu.org>
6233
6234         * lang.opt: New file.
6235
6236 2003-07-21  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
6237
6238         * decl.c (match_attr_spec): Set colon_seen.
6239
6240 2003-07-14  Paul Brook  <paul@nowt.org>
6241
6242         * trans-array.c: Update comment.
6243         (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
6244         * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
6245         minmaxloc,minmaxval): Ditto.
6246         * trans-io.c (g95_trans_transfer): Ditto.
6247         * trans-stmt.c: Remove unneeded prototypes.
6248         (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
6249         (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
6250         (compute_inner_temp_size): Remove bits of dead code. Add comments.
6251         Don't share loopinfo.
6252         (compute_overall_iter_number): Declare as static.
6253         (allocate_temp_for_forall_nest): Ditto.
6254         (g95_trans_forall_1): Don't pass shared loopinfo.
6255         * trans.c (g95_start_block): Expand comment.
6256
6257 2003-07-12  Paul Brook  <paul@nowt.org>
6258
6259         * arith.c (g95_index_integer_kind): Remove unused initializer.
6260         * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
6261         index by size of element.
6262         (generate_loop_for_rhs_to_temp): Ditto.
6263         (allocate_temp_for_forall_nest): Use element size, not index size.
6264
6265 2003-07-11  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
6266
6267         * arith.c (g95_index_integer_kind): Add a TODO.
6268         * simplify.c (g95_simplify_nearest): Add a TODO.
6269
6270 2003-07-09  Chun Huang  <compiler@sohu.com>
6271
6272         * trans.h: Add declarations for gfor_fndecl_string_scan and
6273         gfor_fndecl_string_verify.
6274         * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
6275         * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
6276         (g95_conv_intrinsic_verify): New function.
6277         (g95_conv_intrinsic_function): Add SCAN and VERIFY.
6278         * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
6279         of parameter 'BACK=.TRUE.'
6280
6281 2003-07-05  Lifang Zeng  <zlf605@hotmail.com>
6282
6283         * trans-stmt.c (iter_info, forall_info): Define.
6284         (g95_trans_forall_block): Remove.
6285         (g95_trans_forall_loop): Use forall info blocks.
6286         (g95_trans_nested_forall_loop): New function.
6287         (g95_do_allocate): Handle things other than logical masks.
6288         (generate_loop_for_temp_to_lhs): New function.
6289         (generate_loop_for_rsh_to_temp): New function.
6290         (compute_inner_temp_size): New function.
6291         (compute_overall_iter_number): New function.
6292         (allocate_temp_for_forall_nest): New function.
6293         (g95_trans_forall): Move body ...
6294         (g95_trans_forall_1): ... to here.  Handle loops with temporaries.
6295
6296 2003-07-02  Paul Brook  <paul@nowt.org>
6297
6298         * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
6299         in correct scope.  Change callers to match.
6300         * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
6301         * iresolve.c (g95_resolve_reshape): Only use constant shapes.
6302
6303 2003-07-02  Paul Brook  <paul@nowt.org>
6304
6305         * trans-array.c (g95_conv_loop_setup): Remove dead var.  Use
6306         expression shape for all expressions.
6307         * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
6308
6309 2003-07-03  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
6310
6311         * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
6312         g95_parse_arg), intrinsic.c (g95_convert_type): support of
6313         -Wconversion.
6314         * intrinsic.c, g95.h: Add g95_convert_type_warn,
6315         * resolve.c (g95_resolve_index): Call it.
6316
6317 2003-07-02  Paul Brook  <paul@nowt.org>
6318
6319         * iresolve.c (g95_resolve_reshape): Set expression shape.
6320         (g95_resolve_shape): Ditto.
6321         * simplify.c (g95_simplify_shape): Move common code outside condition.
6322         * trans-array.c (g95_conv_array_initializer): Teach it how to count.
6323
6324 2003-07-01  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
6325
6326         * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
6327         conformance checks.
6328
6329 2003-06-29  Paul Brook  <paul@nowt.org>
6330
6331         * array.c (g95_simplify_iterator_var): Don't bother with return value.
6332         * expr.c (find_array_element, find_component_ref): New functions.
6333         (remove_subobject_ref): New function.
6334         (simplify_const_ref): Use them.  Rename from simplify_component_ref.
6335         (simplify_ref_chain): New function.
6336         (g95_simplify_expr): Use it.  Simplify parameter variable subobjects.
6337         (g95_specification_expr): Simplify the expression.
6338         * resolve.c (resolve_operator): Check simplifications return code.
6339         (g95_resolve_expr): Ditto.
6340
6341 2003-06-26  Paul Brook  <paul@nowt.org>
6342
6343         * expr.c (simplify_component_ref): New function.
6344         (g95_simplify_expr): Use it.
6345         * resolve.c (resolve_structure_cons): Handle references.
6346
6347 2003-06-25  Paul Brook  <paul@nowt.org>
6348
6349         * trans-io.c (build_dt): Handle internal units.
6350
6351 2003-06-25  Canqun Yang  <canqun@yahoo.com.cn>
6352
6353         * trans-common.c (g95_build_common_decl): Array index range starts at 0.
6354         (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
6355         Use g95_array_index_type instead of integer_type_node.
6356         (g95_build_common_decl, g95_set_common_master_type): Use
6357         g95_character1_type_node instead of char_type_node.
6358         * trans-equivalence.c (g95_layout_local_equiv): As above.
6359
6360 2003-06-24  Steven G. Kargl  <kargls@attbi.com>
6361
6362         * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
6363         remove last remains of -fquiet.
6364
6365 2003-06-22  Paul Brook  <paul@nowt.org>
6366
6367         * resolve.c (resolve_operator): Don't fail if we can't simplify.
6368         (g95_resolve_expr): Ditto.
6369         (resolce_code): Mark as static.
6370         * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
6371         gimplifer doesn't (yet).
6372
6373 2003-06-20  Paul Brook  <paul@nowt.org>
6374
6375         * g95.h: Add ST_PAUSE and EXEC_PAUSE.
6376         * match.c (g95_match_if): Add ST_PAUSE.
6377         (g95_match_stopcode): New function.
6378         (g95_match_pause, g95_match_stop): Use it.
6379         * parse.c (g95_ascii_statement): Handle ST_PAUSE.
6380         (decode_stmt, next_statement, parse_executable): Ditto.
6381         * resolve.c (resolve_code): Ditto.
6382         * st.c (g95_free_statement): Ditto.
6383         * trans-stmt.c (g95_trans_pause): New function.
6384         * trans-stmt.h: Declare it.
6385         * trans.c (g95_trans_code): Use it.
6386         * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
6387         Declare.
6388         (g95_build_builtin_function_decls): Initialize them.
6389         * trans.h: Ditto.
6390         * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
6391
6392 2003-06-18  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
6393
6394         * io.c (g95_match_open , g95_match_close, g95_match_inquire,
6395         match_filepos): Fix error handling.
6396
6397 2003-06-18  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
6398
6399         * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
6400         Add assertions on arguments.
6401         * resolve.c (expression_shape): Remove useless &.
6402         * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
6403         g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
6404         g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
6405         g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
6406         g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
6407         g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
6408         (g95_simplify_not, g95_simplify_scale): Add assertions.
6409
6410 2003-06-15  Paul Brook  <paul@nowt.org>
6411
6412         Clean up stuff to work with the ssa optimizers.
6413         * convert.c (convert): Handle BOOLEAN_TYPEs.
6414         * f95-lang.c (g95_truthvalue_conversion): Implement.
6415         * trans-array.c (g95_trans_array_constructor_value): Group multiple
6416         scalar values.
6417         * trans.h (g95_truthvalue_conversion): Declare.
6418         * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
6419         * trans-stmt.c (g95_trans_character_select): Don't create array
6420         assignments.  Mark labels as indirect jump targets.
6421         * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
6422         (g95_get_dtype_cst): Handle LOGICAL types.
6423
6424 2003-06-14  Paul Brook  <paul@nowt.org>
6425
6426         * f95-lang.c (g95_gimplify_expr): New function.
6427         * trans-array.c (g95_trans_array_constructor_value): Don't create
6428         array assignments.
6429         (g95_conv_expr_descriptor): Rename simple->gimple.
6430         * trans-expr.c (conv_expr_op): Use proper logical operators.
6431         * trans-intrinsic.c (build_fixbound_expr): New function.
6432         (build_fix_expr): Ditto.
6433         (g95_conv_intinsic_aint): Use them. Use builtin functions.
6434         (g95_conv_intrinsic_function): Add FLOOR and CEILING.
6435
6436 2003-06-10  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
6437
6438         * array.c (g95_compare_array_spec): Remove unreachable code.
6439         * expr.c (g95_copy_expr): Likewise.
6440         * intrinsic.c (g95_convert_type): Likewise.
6441         * misc.c (g95_code2string): Likewise.
6442         * simplify.c (g95_simplify_ishft, g95_simplify_real,
6443         g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
6444         * trans-stmt.c (g95_trans_select): Likewise.
6445         * primary.c (extend_ref): Add an assertion.
6446         * simplify.c (g95_convert_constant): Add const.
6447         * intrinsic.h: Remove g95_check_x_ni.
6448         * f95-lang.c (g95_finish): Call g95_release_include_path.
6449
6450 2003-06-10  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
6451
6452         * resolve.c (resolve_contained_functions): Fix typo introduced on
6453         2003-01-13.
6454
6455 2003-06-09  Paul Brook  <paul@nowt.org>
6456
6457         * g95.h: Include system.h not hwint.h.
6458         * many: use safe-ctype.h not ctype.h.  Change isalpha -> ISALPHA, etc.
6459         * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
6460
6461 2003-06-09  Paul Brook  <paul@nowt.org>
6462
6463         * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
6464         * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
6465         * trans-decl.c (g95_add_decl_to_functions): Make non-static.
6466         (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
6467         (g95_generate_function_code): Translate COMMON and EQUIVALENCE
6468         objects.
6469         * trans.h (g95_trans_equivalence, g95_trans_common,
6470         g95_add_decl_to_function): Declare.
6471         * trans-common.c, trans-equivalence.c: New files.
6472
6473 2003-06-08  Steven Bosscher  <steven@gcc.gnu.org>
6474
6475         * intrinsic.c (g95_intrinsic_extension): Remove.
6476         (add_functions): Substitute g95_check_x for g95_check_x_ni
6477         everywhere.
6478         (g95_init_expr_extensions): New function.
6479         (g95_intrinsic_func_interface): Use it.
6480         * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
6481         * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
6482         g95_check_precision, g95_check_present, g95_check_radix,
6483         g95_check_range, g95_check_selected_real_kind): Do not set
6484         g95_intrinsic_extension.
6485         (g95_check_x_ni): Remove now duplicate of g95_check_x.
6486
6487         * expr.c (check_inquiry): Add FIXME, fixup some code style.
6488
6489 2003-06-06  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
6490
6491         * g95.h (ref_type): Name this type explicitly.
6492         * module.c (MIO_NAME): Add specialisations of mio_name.
6493         (mio_symbol_attribute, mio_typespec, mio_array_ref,
6494         mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
6495         (ab_attribute): Name this type explicitly.
6496         (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
6497
6498 2003-06-05  Kejia Zhao  <kejia_zh@yahoo.com.cn>
6499
6500         * trans-intrinsic.c (g95_conv_allocated): New function.
6501         (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
6502
6503 2003-06-05  Steven Bosscher  <steven@gcc.gnu.org>
6504
6505         * f95-lang.c: Don't include g95-support.h
6506         (g95_mark_addressable): Add prototype.
6507         (g95_init_decl_processing): Remove C front end hack.
6508         * f95-tree.c: Remove file.
6509         * support.c: Remove file.
6510         * g95-support.h: Remove file.
6511         * trans-types.c (g95_init_types): Set up boolean
6512         type related tree nodes.
6513         * Make-lang.in: Remove rules for dead files and
6514         dependencies on them.
6515
6516 2003-06-05  Steven Bosscher  <steven@gcc.gnu.org>
6517
6518         * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
6519         C front end dependency.  Also, convert.c does not depend on
6520         g95-support.h anymore.
6521         * convert.c: Don't include c-common.h and g95-support.h
6522         * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
6523         (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
6524         stmts_are_full_exprs_p, current_stmt_tree,
6525         current_scope_stmt_stack): Remove.
6526         * g95-support.h (unsigned_conversion_warning): Kill proto.
6527         (boolean_type_node, boolean_true_node, boolean_false_node):
6528         Don't define here.  Instead, make then true tree nodes in
6529         trans-types.
6530         * support.c (c_global_trees): Die, C front end, die!!!
6531         (g95_init_c_decl_hacks): Don't touch intmax_type_node,
6532         uintmax_type_node, string_type_node and const_string_type_node.
6533         (decl_constant_value, overflow_warning): Make static functions.
6534         They are in death row too, though.
6535         (default_conversion, c_expand_asm_operands): Remove.
6536         * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
6537         trans.c: Don't include c-common.h.
6538         * trans-types.c (boolean_type_node, boolean_true_node,
6539         boolean_false_node): Make them real tree nodes.
6540         * trans-types.h (intmax_type_node, string_type_node,
6541         const_string_type_node): Hack to work around C dependencies
6542         in builtin-types.def.
6543
6544 2003-06-04  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
6545
6546         * decl.c (decl_types): Add some iterators-like sentinels.
6547         * decl.c (match_attr_spec): Use them.
6548         Use "decl_types" instead of "int".
6549         Add cast in call to g95_match_strings.
6550         * dump-parse-tree.c (g95_show_namespace):  Use "g95_intrinsic_op"
6551         instead of "int".
6552         * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
6553         (g95_interface_info): Use "g95_intrinsic_op".
6554         * dump-parse-tree.c (g95_show_namespace): Use them.
6555         * interface.c (g95_check_interfaces): Use them.
6556         * module.c (read_module, write_module): Use them.
6557         * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
6558         Use "g95_intrinsic_op".
6559         * interface.c (check_operator_interface): Use "g95_intrinsic_op".
6560         Add a default case in switch statement.
6561         * intrinsic.h (g95_generic_isym_id): Moved to...
6562         * g95.h (g95_generic_isym_id): here.
6563         (g95_intrinsic_sym): Use "g95_generic_isym_id".
6564         * intrinsic.c (make_generic): Use "g95_generice_isym_id".
6565         * trans-intrinsic.c (g95_intrinsic_map_t,
6566          g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
6567         * match.c (g95_match_intrinsic_op): Add cast in call to
6568         g95_match_strings.
6569
6570 2003-06-03  Steven Bosscher  <steven@gcc.gnu.org>
6571
6572         * support.c (skip_evaluation, warn_conversion, lvalue_p,
6573         lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
6574         constant_fits_type_p, convert_and_check,
6575         unsigned_conversion_warning): Remove these ugly remnants
6576         we inherited from the C front end.
6577         (function_types_compatible): Remove '#if 0'-edcode.
6578         (build_modify_expr): Likewise.
6579         (convert_for_assignment): Don't use the deceased functions.
6580         The parameter fundecl is now unused.
6581         (decl_constant_value): Always just return decl.  In fact
6582         this function is not used at present, but it might be in
6583         the future, when we start using the tree inliner.
6584         (overflow_warning, default_conversion, c_expand_asm_operands):
6585         Abort when these are called, they are part of the C type
6586         checking implementation and therefore poison to Fortran.
6587
6588 2003-06-04  Steven Bosscher  <steven@gcc.gnu.org>
6589
6590         * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
6591         c-pretty-print.o and c-dump.o.  Add a comment on why we
6592         depend on c-semantics.c.
6593         * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
6594         Don't use the C front end tree dumper hook to dump the
6595         language specific tree representation -- we don't have
6596         one.  So instead, inherit the default langhook.
6597
6598 2003-06-02  Paul Brook  <paul@nowt.org>
6599
6600         * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
6601
6602 2003-06-02  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
6603
6604         * check.c (g95_check_associated): Use proper types.  Remove
6605         extraneous argument in call to g95_error().
6606
6607 2003-06-02  Kejia Zhao  <kejia_zh@yahoo.com.cn>
6608
6609         * resolve.c (resolve_operator): Make logical operands convert to the
6610         type with higher kind.
6611
6612 2003-06-02  Kejia Zhao  <kejia_zh@yahoo.com.cn>
6613
6614         * check.c (g95_check_associated): Make sure both pointer and target has
6615         the same type and rank. Null pointer or array section with vector
6616         subscript as target are not allowed.
6617         * trans.h: Declare gfor_fndecl_associated.
6618         * trans-decl.c: (g95_build_builtin_function_decls): Initialize
6619         gfor_fndecl_associated.
6620         * trans-intrinsic.c (g95_conv_associated): New function.
6621         (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
6622
6623 2003-06-02  Kejia Zhao  <kejia_zh@yahoo.com.cn>
6624
6625         * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
6626         according to POINTER itself rather than TARGET.
6627         (g95_conv_expr_descriptor): Make lbound start at 1.
6628         * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
6629
6630 2003-06-01  Paul Brook  <paul@nowt.org>
6631
6632         * expr.c (g95_type_convert_binary): Make it match the standard.
6633         * g95.texi: Remove dead link.
6634
6635 2003-06-01  Steven Bosscher  <steven@gcc.gnu.org>
6636
6637         * g95.texi: Cleanup somewhat in preparation for inclusion
6638         in GCC CVS.
6639
6640 2003-05-23  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
6641             Canqun Yang  <canqun@yahoo.com.cn>
6642
6643         * resolve.c (compare_bound_int, resolve_where_shape): Proper return
6644         type.
6645         (g95_find_forall_index): Return proper value.
6646         (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
6647         compare the return value from g95_find_forall_index.
6648
6649 2003-05-23  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
6650         * g95.h, io.c (g95_st_label): Remove "length".
6651         (g95_symtree): Remove "link".
6652         (g95_case): Remove "code".
6653         * arith.c, arith.h (g95_compare_string, g95_convert_integer,
6654         g95_convert_real): Make an argument pointer to const.
6655         * decl.c (colon_seen): Add a TODO.
6656         * interface.c (g95_compare_types): Fix typo.
6657         * interface.c (compare_interfaces): Preserve value of "p".
6658         * intrinsic.c (sort_actual): Remove "i".
6659         * match.c (g95_match_assign): Proper type in call to g95_match().
6660         * parse.c (next_free): Avoid duplicate call due to macro.
6661         * parse.c (check_statement_label): wrong type in call to g95_error.
6662         * primary.c (match_real_constant): Add a TODO.
6663         * resolve.c (resolve_select):  Remove useless conditional.
6664         * simplify.c (g95_simplify_repeat): Proper assignment to
6665         "value.character.string".
6666         * simplify.c (g95_simplify_reshape): Wrong variable in call to
6667         g95_error.
6668
6669 2003-05-20  Canqun Yang  <canqun@yahoo.com.cn>
6670
6671         * trans-stmt.c: Remove unnecessary include file defaults.h.
6672
6673 2003-05-19  Lifang Zeng  <zlf605@hotmail.com>
6674
6675         * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
6676         stride.
6677         (g95_trans_forall): Allow arbitrary number of FORALL indexes and
6678         actual variables used as FORALL indexes.
6679
6680 2003-05-15  Paul Brook  <paul@nowt.org>
6681
6682         * trans-array.c (g95_trans_static_array_pointer): Use
6683         null_pointer_node.
6684         (g95_trans_deferred_array): Initialize static array pointers.
6685         * trans-expr.c (g95_conv_function_call): Use formal arglist to
6686         correctly pass POINTER and absent CHARACTER arguments.
6687
6688 2003-05-14  Lifang Zeng  <zlf605@hotmail.com>
6689
6690         * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
6691         (g95_resolve_forall_body): Resolve FORALL body.
6692         (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
6693         (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
6694         (g95_find_forall_index): Check whether the FORALL index appears in
6695         the expression or not.
6696         (resolve_code): Modified.
6697
6698 2003-05-14  Paul Brook  <paul@nowt.org>
6699
6700         * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
6701
6702 2003-05-13  Paul Brook  <paul@nowt.org>
6703
6704         * trans-types.c (g95_max_array_element_size): Now a tree node.
6705         (g95_init_types): Work out max size properly.
6706         (g95_get_dtype_cst): Modify to match.
6707
6708 2003-05-11  Paul Brook  <paul@nowt.org>
6709
6710         * trans-io.c (add_case): Create a label decl for case labels.
6711
6712 2003-05-11  Paul Brook  <paul@nowt.org>
6713
6714         * arith.c (g95_integer_index_kind): New variable.
6715         * f95-lang.c (g95_init): Move frontend initialization here ...
6716         (g95_post_options): ... from here.
6717         * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
6718         * intrinsic.c (add_functions): Use index kinds.
6719         * iresolve.c: Convert to index_kind where needed.
6720         * resolve.c (g95_resolve_index): Make public, use index_kind.
6721         (resolve_array_ref): Adjust to match.
6722         * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
6723         * trans-stmt.c: Ditto.
6724         * trans-types.c: Ditto.
6725         * trans-types.h (g95_array_index_kind): Remove declaration.
6726         * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
6727
6728 2003-05-07  Paul Brook  <paul@nowt.org>
6729
6730         * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
6731         * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
6732         of bound indices.
6733
6734 2003-05-07  Paul Brook  <paul@nowt.org>
6735
6736         * trans-array.c (trans_static_array_pointer,
6737         g95_trans_array_constructor_value, g95_conv_array_initializer,
6738         g95_conv_structure): CONSTRUCTOR nodes only have one operand.
6739         (g95_add_loop_ss_code): Convert subscripts to the correct type.
6740         * trans-stmt.c (g95_trans_character_select): Ditto.
6741         * trans-types.c (g95_init_types): Ditto.
6742
6743 2003-05-07  Steven Bosscher  <steven@gcc.gnu.org>
6744
6745         * f95-lang.c (expand_function_body): Use input_line, not lineno.
6746         * trans-decl.c (g95_generate_function_code,
6747         g95_generate_constructors): Likewise.
6748         * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
6749         g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
6750         Likewise.
6751
6752 2003-05-07  Kejia Zhao  <kejia_zh@yahoo.com.cn>
6753         * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
6754         with components point to the DERIVED type itself, and two DERIVED
6755         type with components point to each other.
6756         * trans-expr.c (g95_conv_componet_ref): Modified
6757
6758 2003-05-07  Kejia Zhao  <kejia_zh@yahoo.com.cn>
6759         * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
6760         null_pointer_node.
6761         (g95_trans_pointer_assign): Implement Nullify.
6762
6763 2003-05-01  Paul Brook  <paul@nowt.org>
6764
6765         * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
6766         * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
6767
6768 2003-05-01  Paul Brook  <paul@nowr.org>
6769
6770         * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
6771         trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
6772         IS_EMPTY_STMT.
6773
6774 2003-05-01  Canqun Yang  <canqun@yahoo.com.cn>
6775
6776         * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
6777         CASE_LABEL_EXPR.
6778
6779 2003-04-28  Paul Brook  <paul@nowt.org>
6780
6781         * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
6782         as their kind suggests.
6783         (g95_resolve_reshape): Ditto.
6784
6785 2003-04-28  Chun Huang  <compiler@sohu.com>
6786
6787         * trans-expr.c (g95_conv_substring_expr): New function.
6788         (g95_conv_expr): Use it.
6789
6790 2003-04-28  Paul Brook  <paul@nowt.org>
6791
6792         * iresolve.c (g95_resolve_transpose): Make it match the
6793         implementation.
6794         * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
6795
6796 2003-04-18  Steven Bosscher  <steven@gcc.gnu.org>
6797
6798         * trans-types.c (g95_add_field_to_struct): New function to
6799         add a field to a UNION_TYPE or RECORD_TYPE.
6800         * trans-types.h (g95_add_field_to_struct): Prototype.
6801         (g95_get_derived_type): Use g95_add_field_to_struct to add
6802         components.
6803         * trans-io.c (g95_add_field): Remove.
6804         (ADD_FIELD): Use new g95_add_field_to_struct function.
6805         (ADD_STRING): Likewise.
6806         * trans-stmt.c (g95_trans_select): Likewise.
6807         (g95_add_field): Remove duplicated function.
6808
6809 2003-04-18  Canqun Yang  <canqun@yahoo.com.cn>
6810
6811         Port implementation for CHARACTER SELECT from Andy's tree.
6812         * trans-stmt.c (g95_trans_character_select): Implement character
6813         select. (g95_add_field): New function.
6814         * trans-decl.c: Declare 'gfor_gndecl_select_string'.
6815         (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
6816         * g95.h (struct g95_case): Add field 'int n'.
6817         * trans.h: Declare 'gfor_fndecl_select_string'.
6818
6819 2003-04-18  Steven Bosscher  <steven@gcc.gnu.org>
6820
6821         * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
6822         (g95_insert_bbd): Die on duplicates.
6823         * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
6824
6825 2003-04-14  Steven Bosscher  <steven@gcc.gnu.org>
6826
6827         * g95.texi: Require GMP 4.0 -- like we actually
6828         do.  Explain the testsuite and what-goes-where.
6829         Don't use undefined texinfo symbol.  Break very
6830         long line.  Remove finished item from the list
6831         of open projects.
6832
6833 2003-04-11  Canqun Yang  <canqun@yahoo.com.cn>
6834
6835         * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
6836         LOGICAL type.
6837
6838 2003-04-10  Canqun Yang  <canqun@yahoo.com.cn>
6839
6840         * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
6841         (g95_trans_forall_body): New function.
6842
6843 2003-04-10  Canqun Yang  <canqun@yahoo.com.cn>
6844
6845         * resolve.c (resove_where): New function.
6846         (resolve_where_shape): New function.
6847         (resolve_code): Add call to 'resolve_where'
6848         * trans-stmt.c (g95_trans_where): Modified.
6849         (g95_trans_where_2): New function.
6850         (g95_trans_where_assign): New function.
6851         (g95_evaluate_where_mask): New function.
6852         (g95_add_to_stmt_list): New function.
6853         (g95_get_temp_expr): New function.
6854         * trans.h (where_stmt_list): New structure.
6855
6856 2003-04-10  Paul Brook  <paul@nowt.org>
6857
6858         * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
6859         (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
6860
6861 2003-04-10  Steven Bosscher  <steven@gcc.gnu.org>
6862
6863         Update after mainline -> tree-ssa-branch merge.
6864         * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
6865         call.
6866         (g95_init): Update for new lang_hooks definition.
6867         (g95_post_options): New langhook.
6868         (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
6869         * scanner.c (g95_new_file): Comment update.
6870
6871 2003-04-09  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
6872
6873         * g95.h, lang-options.h: Add -Wimplicit-interface.
6874         * options.c (g95_init_options, g95_parse_arg): Set it.
6875         * interface.c (check_intents): Warn about call with implicit
6876         interface.
6877         * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
6878         g95_procedure_use.
6879
6880 2003-04-05  Paul Brook  <paul@nowt.org>
6881
6882         * iresolve.c (g95_resolve_spread): Don't resole based on type.
6883         * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
6884
6885 2003-03-29  Paul Brook  <paul@nowt.org>
6886
6887         * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
6888         (g95_resolve_unpack): Ditto.
6889         * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
6890         (g95_conv_intrinsic_function): Use it.  Remove PACK and UNPACK.
6891         (g95_is_intrinsic_libcall): Add PACK and UNPACK.
6892
6893 2003-03-25  Paul Brook  <paul@nowt.org>
6894
6895         * arith.c (g95_unary_user, g95_user): Remove dead functions.
6896         * arith.h: Ditto.
6897         * array.c (g95_free_array_ref): Ditto.
6898         * g95.h: Ditto.
6899         * symbol.c (g95_use_derived_tree): Ditto.
6900         * intrinsic.c (add_functions): Use simplification for SCALE.
6901         * primary.c (g95_match_rvalue): Test sym, not symtree.
6902
6903 2003-03-25  Paul Brook  <paul@nowt.org>
6904
6905         * trans-decl.c (build_function_decl): Add parameter before it gets
6906         turned into a constant.
6907         * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
6908         * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
6909         * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
6910
6911 2003-03-22  Paul Brook  <paul@nowt.org>
6912
6913         * trans-array.c (g95_conv_array_initializer): Allow scalar
6914         expressions.
6915         * trans-decl.c (g95_finish_var_decl): Result variables are not
6916         module variables.
6917         * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
6918         (g95_conv_intrinsic_function): Use it.
6919         * trans-types.h (g95_type_spec): Remove dead declaration.
6920
6921 2003-03-21  Paul Brook  <paul@nowt.org>
6922
6923         * trans-decl.c (g95_build_function_decl): Mark string parameters.
6924
6925 2003-03-20  Paul Brook  <paul@nowt.org>
6926
6927         * trans-decl.c (g95_build_function_decl): Put character length
6928         parameters at the end of the function declaration.
6929         * trans-expr.c (g95_conv_function_call): Ditto.
6930         * trans-types.c (g95_get_function_type): Ditto.
6931
6932 2003-03-20  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
6933
6934         * resolve.c (resolve_formal_arglist): Don't impose intent for
6935         procedure arguments of pure functions.
6936         (resolve_select): Remove redundant assignment.
6937
6938 2003-03-19  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
6939
6940         * arith.c (validate_logical), g95.h, options.c (g95_init_options):
6941         Remove option l1.
6942         * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
6943         * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
6944         const.
6945         * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
6946         Order list.
6947         * symbol.c (g95_add_type): Fix typo in comment.
6948
6949
6950 2003-03-16  Paul Brook  <paul@nowt.org>
6951
6952         * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
6953         * expr.c (g95_build_call): Remove.
6954         * f95-lang.c (puchdecl_top_level): New function.
6955         * g95.h (g95_code): Store resolved symbol, not just the name.
6956         * intrinsic.c (g95_intrinsic_namespace): New global namespace.
6957         (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
6958         (g95_get_intrinsic_sub_symbol): New function.
6959         * iresolve.c (g95_resolve_cpu_time): Use it.
6960         (g95_resolve_random_number): Ditto.
6961         * resolve.c: Set code->resolved_sym instead of code->sub_name.
6962         * trans-decl.c (g95_get_extern_function_decl): Give external decls
6963         the correct DECL_CONTEXT.  Add global symbold to the global scope.
6964         * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
6965         fixed.
6966
6967 2003-03-16  Paul Brook  <paul@nowt.org>
6968
6969         * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
6970         * options.c (g95_parse_arg): Ditto.
6971         * module.c (mio_symbol_attribute): Handle the always_explicit bit.
6972         * resolve.c (resolve_formal_arglist): The always_explicit sould be set
6973         for the procedure, not the parameter.
6974         * trans-array.c (g95_trans_g77_array): New function.
6975         (g95_trans_assumed_size): Use it.
6976         (g95_trans_dummy_array_bias): Ditto.
6977         (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
6978         (g95_conv_expr_descriptor): ... to here.  Update callers.
6979         * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
6980         (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
6981         * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
6982         * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
6983         * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
6984         (g95_sym_type): Ditto.
6985
6986 2003-03-15  Paul Brook  <paul@nowt.org>
6987
6988         * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
6989         first chain.
6990         * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
6991
6992 2003-03-14  Paul Brook  <paul@nowt.org>
6993
6994         * trans-array.c (g95_array_is_packed): Remove.
6995         (g95_conv_array_base): Correctly handle all descriptorless cases.
6996         (g95_conv_array_stride): Use descriptorless strides.
6997         (g95_trans_dummy_array_bias): Don't always repack the array.
6998         (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
6999         packed.
7000         * trans-types.c (g95_get_nodesc_array_type): Differentiate between
7001         dummy and non-dummy arrays...
7002         (g95_sym_type, g95_get_derived_type): ... like these.
7003         (g95_get_array_type_bounds): Allow discontiguous arrays.
7004
7005 2003-03-12  Paul Brook  <paul@nowt.org>
7006
7007         * array.c (g95_resolve_array_spec): Fix comment.
7008         * g95.h (symbol_attributes): New flag always_explicit.
7009         * resolve.c (resolve_formal_arglist): Set it always_explicit.
7010         * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
7011         * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
7012         (g95_trans_array_bounds): Allow assumed shape arrays.
7013         (g95_trans_repack_array): Remove.
7014         (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
7015         * trans-decl.c (g95_build_qualified_array): Only ignore absent
7016         bounds for assumed size arrays.
7017         (g95_build_dummy_array_decl): Use descriptorless arrays.
7018         * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
7019         (g95_trans_pointer_assign): Fix typo.
7020         * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
7021         code.
7022         (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
7023         * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
7024         Also modify callers.
7025         * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
7026
7027 2003-03-08  Paul Brook  <paul@nowt.org>
7028
7029         * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
7030         (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
7031         * resolve.c (compare_spec_to_ref): Allow full array sections.
7032
7033 2003-03-08  Paul Brook  <paul@nowt.org>
7034
7035         * expr.c (g95_simplify_expr): Also simplify array index and
7036         substring expressions.
7037         * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
7038         * trans-array.c (g95_trans_array_bounds): New function.
7039         (g95_trans_auto_array_allocation): Use it.
7040         (g95_trans_assumed_size): Rewrite.
7041         * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
7042         (gfor_fndecl_repack): Remove.
7043         (g95_build_qualified_array): Handle absent upper bounds.
7044         (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
7045         (g95_get_symbol_decl): Update.
7046         (g95_build_intrinsic_function_decls): Initialize new decls.
7047         * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
7048         (gfor_fndecl_repack): Remove.
7049         * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
7050         * trans-types.c: (g95_build_array_type): Merge duplicated code..
7051         (g95_get_nodesc_array_type): Handle absent bounds.
7052         * trans-types.h (g95_get_nodesc_array_type): Declare.
7053
7054 2003-03-04  Paul Brook  <paul@nowt.org>
7055
7056         * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
7057         builtin-types.def.
7058
7059 2003-03-02  Paul Brook  <paul@nowt.org>
7060
7061         * options.c (g95_init_options): Drfault to 1.
7062         (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
7063         * trans-array.c (g95_conv_array_data, g95_conv_array_base,
7064         g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
7065         Handle non-constant size automatic arrays.
7066         (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
7067         generic bound functions.
7068         (g95_trans_auto_array_allocation): Don't create a descriptor.
7069         (g95_trans_assumed_size): New function (broken).
7070         (g95_trans_dummy_array_bias): Remove unused var.
7071         * trans-array.h (g95_trans_assumed_size): Declare.
7072         * trans-decl.c (create_index_var): New fuction.
7073         (g95_build_qualified_array): New function.
7074         (g95_get_symbol_decl): Use it.
7075         (g95_trans_deferred_vars): Handle assumed shape seperately.
7076         * trans-types.c (get_element_type): Handle heap allocated arrays.
7077         (g95_is_nodesc_array): Include non-const size arrays.
7078         (g95_get_nodesc_array_type): Ditto.
7079
7080 2003-02-23  Paul Brook  <paul@nowt.org>
7081
7082         * trans-array.c (g95_array_init_size): Should use stride, not size of
7083         last dimension.
7084
7085 2003-02-18  Paul Brook  <paul@nowt.org>
7086
7087         * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
7088         after intrinsic function check.
7089
7090 2003-02-18  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
7091
7092         * io.c (match_io): Fix missing return value and remove useless
7093         assignment.
7094         * match.c (g95_match): Remove useless assignment.
7095         * module.c (parse_string):  Remove useless post increment.
7096         * simplify.c (g95_simplify_verify): Remove useless assignment.
7097
7098 2003-02-15  Paul Brook  <paul@nowt.org>
7099
7100         * expr.c (restricted_intrinsic): Handle bad values gracefully.
7101         * g95.h (symbol_attribute): Add referenced member.
7102         (g95_symbol): Add dummy_order member.
7103         (g95_set_sym_referenced): Declare.
7104         * match.c (g95_match_assignment, g95_match_call): Use it
7105         * primary.c (match_actual_arg, g95_match_rvalue,
7106         g95_match_variable): Ditto.
7107         * symbol.c (next_dummy_order): New variable.
7108         (g95_set_sym_referenced): New function.
7109         (check_done): New function.
7110         (g95_add_*): Use it.
7111         * trans-decl.c: Make formatting conform to GCC standards.
7112         (g95_defer_symbol_init): Add dummy variables in the right order.
7113         (g95_get_symbol_decl): Only accept referenced variables.
7114         (g95_create_module_variable): Module variables are always required.
7115         (generatr_local_decls): New function.
7116         (generate_local_vars): New function.
7117         (g95_generate_function_code): Use it.
7118
7119 2003-02-13  Paul Brook  <paul@nowt.org>
7120
7121         * trans-decl.c (g95_conv_struct_cons): Remove.
7122         (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
7123         * trans-expr.c (g95_conv_structure): New function.
7124         (g95_conv_expr): Use it.
7125
7126 2003-02-09  Paul Brook  <paul@nowt.org>
7127
7128         * trans-array.c (g95_array_init_size): Don't evaluate the linit
7129         expressions multiple times.
7130         (g95_trans_auto_arry_allocation): Use pointer not tmp.
7131
7132 2003-02-08  Paul Brook  <paul@nowt.org>
7133
7134         * module.c (mio_symtree_ref): Declare as static.
7135         (mio_expr): Remove dead code.
7136         (read_module): Set the symtree link for fixups.
7137         * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
7138         (build_round_expr): ... to this.
7139         (g95_conv_intrinsic_aint): New function.
7140         (g95_conv_intrinsic_function): Use it.
7141
7142 2003-02-08  Paul Brook  <paul@nowt.org>
7143
7144         * trans-array.c (g95_trans_array_constructor_value): Use the acutal
7145         offset after modificaton, not the increment expression.
7146         * dependency.c: Kill excess whitespace.
7147
7148 2003-02-07  Sanjiv Gupta  <sanjivg@noida.hcltech.com>
7149
7150         * dependency.h: Remove some function declarations.
7151         * dependency.c (get_no_of_elements): Change this function not to
7152         return int.
7153         * other: Add comments for all modified functions.
7154
7155 2003-02-06  Paul Brook  <paul@nowt.org>
7156
7157         * g95spec.c (lang_specific_functions): Fix initializer warning.
7158         * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
7159         for structure type names.
7160         * trans-decl.c (g95_cons_structure_cons): New function.
7161         (g95_get_symbol_decl): Use it.
7162         * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
7163         referencing code.
7164
7165 2003-02-06  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
7166
7167         * resolve.c (compare_cases): Add const to casts.
7168
7169 2003-01-30  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
7170
7171         * g95.h (g95_check_f): Change a1 to f1m.
7172         * intrinsic.c (add_sym_1m, check_specific,
7173         g95_intrinsic_func_interface): Use it.
7174
7175         * module.c (init_pi_tree): Remove useless cast.
7176         (fp2): Fix argument type.
7177
7178         * parse.c (parse_select_block): Add comment.
7179
7180 2003-02-05  Toon Moene  <toon@moene.indiv.nluug.nl>
7181
7182         * lang-options.h: Fix warning involving C90 concatenated
7183         strings.
7184
7185 2003-02-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7186             Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
7187
7188         * io.c (format_asterisk): Complete initializer to kill warning.
7189         * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
7190         DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
7191         (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
7192         new defines to complete initializers.  Kills all warnings.
7193
7194         * Make-lang.in: Comment cleanup.
7195
7196 2003-02-05  Paul Brook  <paul@nowt.org>
7197
7198         * array.c (g95_free_constructor): Handle NULL expressions.
7199         * resolve.c (resolve_structure_cons): Ditto.
7200         * decl.c (g95_match_null): New Function.
7201         (variable_decl): Use it.
7202         * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
7203         * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
7204         * trans-types.c (g95_set_decl_attributes): Remove empty function.
7205
7206 2003-02-05  Paul Brook  <paul@nowt.org>
7207
7208         * trans.h (build1_v): New macro.
7209         (build_v): Remove pointless and incorrect prototype.
7210         * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
7211         * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
7212
7213 2003-02-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7214
7215         * Make-lang.in (F95_OBJS): Remove one more dead file.
7216
7217 2003-02-01  Paul Brook  <paul@nowt.org>
7218
7219         * lang-specs.h: Don't pass -ffixed-form to the linker.
7220         * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
7221
7222 2003-02-01  Paul Brook  <paul@nowt.org>
7223
7224         * Make-lang.in (F95_OBJS): Remove dead files.
7225         * trans-array.c (g95_array_init_size): Do the right thing when
7226         ubound=NULL.
7227         * trans-decl.c (g95_generate_function_code): Initialize deffered
7228         symbol list before translating contained subroutines.
7229         * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
7230         scalar invariant values here...
7231         (g95_conv_variable, g95_conv_function_call): ... instead of here ...
7232         * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
7233
7234 2003-01-29  Paul Brook  <paul@nowt.org>
7235
7236         * trans-array.c (g95_add_loop_code): Put pre code in the right block.
7237         (g95_walk_elemental_function_args): Reverse chains before adding.
7238         (g95_reverse_ss): Move about a bit.
7239         * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
7240         function arguments.
7241
7242 2003-01-28  Paul Brook  <paul@nowt.org>
7243
7244         * intrinsic.c (resolve_intrinsic): Use correct union member.
7245         * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
7246         parameters.
7247         * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
7248         use associated variables.
7249         * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
7250         * trans-expr.c (g95_conv_expr_present): ... to here.
7251         * trans.h: Declare it.
7252         * trans-types.c (g95_sym_type): Assume subroutine if not specified.
7253
7254 2003-01-28  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
7255
7256         * array.c (expand_iterator): Suppress useless assignment.
7257         * decl.c (match_char_spec): Ditto.
7258         * io.c (match_io_iterator): Ditto.
7259         * primary.c (match_real_constant): Ditto.
7260         * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
7261         Ditto.  Also, use g95_intrinsic_op not int for intrinsic operators.
7262         * matchexp.c (match_add_operand, match_level_5): Likewise.
7263         * module.c (parse_atom, find_enum): Likewise.
7264         * resolve.c: move #include <string.h>
7265         (resolve_select): Fix serious typo.
7266
7267 2003-01-28  Steven Bosscher  <s.bosscher@student.tudelft.n>
7268
7269         * Make-lang.in: Don't build with broken tree-ssa-pre.
7270
7271 2003-01-28  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7272
7273         * resolve.c (resolve_index): Add a TODO.
7274         * symbol.c: Remove useless "#include <ctype.h>".
7275
7276 2003-01-27  Paul Brook  <paul@nowt.org>
7277
7278         * check.c (check_rest): Allow different type kinds as an extension.
7279         * g95.h (g95_resolve_f): Add f1m.
7280         * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
7281         * intrinsic.h: Chenge prototypes for MIN and MAX.
7282         * iresolve.c (g95_resolve_minmax): New function.
7283         (g95_resolve_min, g95_resolve_max): Use it.
7284         * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
7285         arguments once.
7286         (g95_conv_intrinsic_present): Fix logic.
7287
7288 2003-01-27  Steven Bossche  <s.bosscher@student.tudelft.nl>
7289
7290         * g95.h (g95_case): Don't be a tree, be a double linked list.
7291         * match.c (match_case_selector): Remove redundant semantics check.
7292         Clean up a few goto's to make it a tiny little bit faster.
7293         * resolve.c (case_tree): Die.
7294         (compare_cases): Accept and compare unbounded cases too.
7295         (check_case_overlap): Don't build a tree.  Instead, merge-sort the
7296         whole list of g95_cases passed from resolve_select.
7297         (sane_logical_select): Die.
7298         (check_case_expr): Return FAILURE if a CASE label is of the wrong
7299         type kind.
7300         (resolve_select): Fixup case expression for computed GOTOs, put it
7301         in expr, not expr2, for easier handing in the parse tree dumper and
7302         the code generator.  Rewrite the rest of the function: Kill
7303         unreachable case labels and unreachable case blocks.
7304         * dump-parse-tree.c (g95_show_code_node): Always dump expr for
7305         an EXEC_SELECT, not case2 anymore.
7306         * trans-const.c (g95_conv_constant_to_tree): New function.
7307         (g95_conv_constant): Use it.
7308         * trans-const.h: Declare prototype for the new function.
7309         * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
7310         g95_trans_character_select): New static functions.
7311         (g95_trans_select): Rewrite.
7312
7313 2003-01-26  Paul Brook  <paul@nowt.org>
7314
7315         * intrinsic.c (add_fnctions): Properly add dreal.
7316         * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
7317         (g95_conv_intrinsic_function): Use it.
7318         * trans-io.c (build_dt): Abort on internal files (unimplemented).
7319
7320 2003-01-26  Paul Brook  <paul@nowt.org>
7321
7322         Widespread changes to the handling of symbols in expressions.  These
7323         are now linked via g95_symtree nodes.
7324         * parse.c (g95_fixup_sibling symbols): New function.
7325         (parse_contained): Use it.
7326         * g95.h (symbol_attribute): Add contained.  Indicates a symbol is a
7327         contained procedure that has bee correctly fixed up.
7328         (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
7329
7330 2003-01-24  Paul Brook  <paul@nowt.org>
7331
7332         * trans-array.c (g95_walk_expr): Function result attributes are in
7333         sym->result.
7334         * trans-expr.c (g95_conv_function_call,
7335         g95_trans_arrayfunc_assign): Ditto.
7336         * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
7337
7338 2003-01-23  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7339
7340         * expr.c (check_restricted): Fix error message.
7341         * symbol.c (free_st_labels): Plug memleak.
7342
7343 2003-01-22  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7344
7345         * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
7346         reduce_binary_aa, reduce_binary, eval_intrinsic,
7347         eval_intrinsic_f2): Use typesafe prototypes for eval functions.
7348         * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
7349         for typesafe intrinsics helper functions.
7350         (g95_intrinsic_sym): Use them.
7351         * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
7352         add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
7353         add_sym_5, add_conv, resolve_intrinsic, do_simplify,
7354         check_specific, g95_intrinsic_func_interface,
7355         g95_intrinsic_sub_interface): Adjust all calls to intrinsics
7356         helper functions.
7357         * trans-decl.c (g95_get_extern_function_decl): Likewise.
7358         * Make-lang.in: Don't disable warnings for strict prototypes
7359         any longer, everything is typesafe now.
7360
7361 2003-01-22  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7362
7363         * bbt.c (duplicate_node): Make static.
7364         * module.c (module_name): Make static.
7365         * scanner.c (include_dirs): Make static.
7366
7367 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7368
7369         Hard coded _gfor_'s should not show up anymore.
7370         * g95.h (PREFIX): New macro.
7371         * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
7372         hard-coded "_gfor".
7373         (g95_resolve_random_number): Likewise.
7374         * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
7375         * trans-io.c: Remove 'prefix' macro.  Replace all uses with
7376         the new PREFIX macro from g95.h.
7377
7378 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7379
7380         The troubles of forking... Andy implemented this just now too.
7381         Let's stick to that and keep the trees close.
7382         * g95.h (g95_st_label): 'format' member is now a g95_expr.
7383         * io.c: Revert previous changes.
7384         (g95_match_format): Match the format string as a character
7385         literal expression.
7386         * match.h (g95_statement_label): Declare external.
7387         * parse.c: Revert previous changes.
7388         * symbol.c (g95_free_st_label): Free a g95_expr instead
7389         if a 'char *'.
7390         * trans-io.c: Revert previous changes.
7391         (build_dt): Use set_string to set the format string.
7392
7393 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7394
7395         * io.c (format_string): Make non-static.
7396         (g95_match_format): Remember the format string.
7397         (terminate_io): Add I/O termination for empty I/O lists.
7398         * match.h: Declare external format_string.
7399         * parse.c (check_statement_label): Attack the format string
7400         to a format label for FORMAT statements.
7401         * trans-io.c (g95_add_field): Define prefix macro.  Replace
7402         all uses of PREFIX define with a use of this macro.
7403         (build_dt): Implement formatted I/O for format labels.
7404
7405 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7406
7407         * lang-options.h: Kill "-std=F".
7408         * options.c: Remove unimplemented "-std=F".  Modify
7409         web address.
7410         * misc.c (g95_terminal_width): New function.
7411         * error.c (g95_error_init_1): Use g95_terminal_width.
7412         * g95.h: Add prototype for g95_terminal_width, remove
7413         fmode flag.
7414
7415 2003-01-19  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7416
7417         * Make-lang.in: Fix typo.
7418
7419 2003-01-18  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7420
7421         * g95.h (struct g95_case): Remove unused cruft, new member
7422         'where' to keep track of the locus of the default case.
7423         * match.c (g95_match_case): Add locus to the current case.
7424         (match_case_selector): Likewise.
7425         * parse.c (parse_select_block): Move semantics check for
7426         multiple DEFAULT cases out of here to...
7427         * resolve.c (check_case_overlap): ...here.  Return sooner
7428         when possible.
7429         (check_case_expr): Take two g95_cases now, use to sure the
7430         expression kinds are the same.
7431         (resolve_select): Cleanup.
7432
7433 2003-01-18  Paul Brook  <paul@nowt.org>
7434
7435         * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
7436         * trans-decl.c (g95_set_symbol_decl): Handle non-array result
7437         variables.
7438         (g95_get_extern_function_decl): Put decls in the correct context.
7439
7440 2003-01-18  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7441
7442         * trans-io.c: Port changes from Andy to set ERR flag.
7443
7444 2003-01-17  Paul Brook  <paul@nowt.org>
7445
7446         * trans-array.c: Add various comments.
7447         (g95_ss_terminator): Declare as const.
7448         (g95_walk_expr): Remove first parameter and update all callers.
7449         (g95_walk_op_expr): Initialize scalar SS properly.
7450         * trans-array.h (g95_walk_expr): Update prototype.
7451         * trans-expr.c: Update for new g95_walk_expr.
7452         * trans-intrinsic.c: Ditto.
7453         * trans-io.c: Ditto.
7454         * trans.h: Various comments for SS chains.
7455
7456 2003-01-17  Paul Brook  <paul@nowt.org>
7457
7458         * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
7459         and RRSPACING.
7460         * intrinsic.c (add_functions): Use them.
7461         * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
7462         * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
7463
7464 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7465
7466         Fallout of a small merge conflict:
7467         * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
7468
7469 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7470
7471         * initrinsic.c: New add_sym_* functions for strong typing.
7472         (add_conv): Make prototype strict.
7473         * dump-parse-tree.c, dependency.c: Include config.h
7474         * resolve.c, trans-io.c: Fix typos.
7475
7476 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7477
7478         * dump-parse-tree.c (g95_show_code_node): Show the
7479         condition for a computed GOTO that was transformed
7480         to a SELECT CASE construct.
7481         * resolve.c (check_case_overlap): Revert previous switch
7482         to treaps, it was too slow and didn't catch all trouble.
7483         (resolve_symbol): Be more flexible about module procedures.
7484         * symbol.c (check_conflict): Point to relevant section in
7485         the standard for dubious conflict.  Allow procedure
7486         dummy arguments to be optional again.
7487         * trans-io (add_field): Rename to g95_add_field.  Change
7488         all callers.
7489         * trans-stmt (trans_select): Handle unbounded cases for
7490         integer SELECT CASE constructs.  Fix/add more comment.
7491
7492 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7493
7494         * g95.h: Uses GCC's function attribute macros.
7495         * error.c, module.c, parse.c, g95.h: More function attributes.
7496
7497 2003-01-16  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7498         Forgot a file...
7499         * trans-decl.c (get_label_decl): Use TREE_LINENO instead
7500         of DECL_SOURCE_LINE, and TREE_FILENAME instead of
7501         DECL_SOURCE_FILE.
7502
7503 2003-01-16  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7504
7505         * f95-lang.c (pushdecl): Use TREE_LINENO instead of
7506         DECL_SOURCE_LINE.
7507         * trans.c (g95_trans_code): Use annotate_all_with_file_line
7508         instead of nowdead wrap_all_with_wfl.
7509
7510 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7511
7512         * parse.c (g95_parse_file): In verbose mode, dump the parse tree
7513         before generating code, so we can still see it even if the code
7514         generation phase dies.
7515
7516 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7517
7518         * decl.c (build_sym): Split out initialization expression parts...
7519         (add_init_expr_to_sym): ...to here.
7520         (variable_decl): Add the symbol following an attribute list to the
7521         symbol tree before parsing the optional initialization expression
7522         if the symbol is not of a derived type.
7523         * primary.c (g95_match_rvalue): Don't assume a symbol always has
7524         a value if it is a PARAMETER.
7525
7526 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7527
7528         * misc.c: Don't #include <mcheck.h>
7529         * module.c: Ditto.  Kill uses of mtrace, muntrace.  If there
7530         ever was a glibc bug, then either this was never reported to
7531         glibc people, or it has been fixed for so long that there's
7532         no information you can find about it, anywhere.
7533
7534 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7535
7536         Fix warnings:
7537         * module.c (attr_bits, bt_types, array_spec_types):
7538         Switch 'const' and 'static'.
7539         * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
7540
7541         GNU'ify source code:
7542         * trans-io.c: Numerous fixes, one fixed warning and a few
7543         TODO markers so that we don't forget about them.
7544
7545 2003-01-13  Paul Brook  <paul@nowt.org>
7546
7547         * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
7548         * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
7549         Add G95_ISYM_SCALE.
7550         * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
7551         * match.c (g95_match_stop): Fix dumb == -> != error.
7552
7553 2003-01-13  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7554
7555         * dump-parse-tree.c (show_indent): Add line breaks.  This
7556         whole dumping process needs cleanups.
7557         * f95-lang.c (g95_mark_addressable): Fix prototype to match
7558         the langhook.  Fix 'return's accordingly.
7559         * g95-support.h: Adjust prototype.
7560         * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
7561         * lang-options.h: Add '-fsyntax-only'.
7562         * options.c (g95_init_options): Init 'no_backend'.
7563         (g95_parse_arg): Deal with '-fsyntax-only'.
7564         * parse.c (g95_parse_file): Do not generate code if 'no_backend'
7565         is set.
7566
7567 2003-01-13  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7568         Patch from Arnaud
7569         * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
7570         arguments.  Also make sure that if a symbol is marked INTRINSIC,
7571         an intrinsic with the symbol's name actually exists.
7572         (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
7573         Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
7574         ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
7575
7576 2003-01-13  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7577
7578         * resolve.c (resolve_contained_functions): Fix condition, don't
7579         throw internal_error if a child namespace has no name.  Apparently
7580         this can be the case?
7581
7582 2003-01-11  Paul Brook  <paul@nowt.org>
7583
7584         Port changes from Andy's tree:
7585         * g95.h (g95_code): Add stop_code.
7586         * match.c (g95_match_stop): Detter syntax checking.
7587         * resolve.c (resolve_generic_f0): Return match type.
7588         (resolve_generic_f): Remove dead/duplicated code.
7589         (resolve_specific_f): Ditto.
7590         * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
7591         * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
7592         * trans-stmt.c (g95_trans_stop): Handle new STOP format.
7593
7594 2003-01-11  Paul Brook  <paul@nowt.org>
7595
7596         * trans-array.c: Various documentation/comment changes.
7597         * trans-stmt.c: Ditto.
7598
7599
7600 2003-01-10  Paul Brook  <paul@nowt.org>
7601
7602         * options.c/h: Add -fdump-parse-tree as alias of -v.
7603
7604 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7605
7606         * dump-parse-tree.c (g95_show_namespace): Fixed another
7607         typo.  Sorry, it's Friday...
7608
7609 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7610
7611         Spotted by Tobi:
7612         * trans-array.c, trans-array.h, trans.c, trans-const.c,
7613         trans-const.h, trans-decl.c, trans-expr.c, trans.h
7614         trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
7615         trans-types.c: Fix bogus copyright years, add 2003.
7616         * trans-types.h: Give copyright header.
7617
7618 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7619
7620         * dump-parse-tree.c (g95_show_namespace): Fixed typo.
7621         * expr.c, options.c, scanner.c: Add some more 'const' markers.
7622         * intrinsic.c: Some constant strings moved to read-only memory.
7623         * io.c (format_asterisk): Move to...
7624         * g95.h: ...here.
7625
7626 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7627
7628         * dump-parse-tree.c (g95_show_namespace): Dump implicit
7629         types for ranges instead of per-letter.  Indent the
7630         'CONTAINS' just like everything else.
7631         * resolve.c (resolve_contained_functions): Clarify comment.
7632         Explain non-obvious conditional expression.  Improve
7633         diagnostics if tyoe cannot be resolved.
7634         Port semi-fix from Andy's tree:
7635         (was_declared): Move up before first use.
7636         (generic_sym, specific_sym): New functions.  Code moved
7637         out if procedure_kind.
7638         (procedure_kind): Simplify using new functions.
7639         (resolve_generic_f): Make sure the functions we find in
7640         a parent namespace is generic.
7641         (resolve_specific_f): Ditto for specific functions.
7642
7643 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7644
7645         * trans-stmt.c, trans.c: Fix some code style issues. Add
7646         some more comment (but still not enough!).
7647
7648 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7649
7650         * symbol.c (flavors, procedures, intents, acces_types,
7651         access_types, ifsrc_types): Make const.
7652         * misc.c (g95_string2code): Make 'm' param 'const'.
7653         * module.c (find_enum, write_atom, mio_name): Make
7654         'm' param 'const'.
7655         (attr_bits, bt_types, array_spec_types, array_ref_types,
7656         ref_types, expr_types): Make const.
7657         * g95.h: Adjust external decls.
7658
7659 2003-01-09  Paul Brook  <paul@nowt.org>
7660
7661         * Testsuite: Add a load of new cases.
7662
7663 2003-01-08  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7664
7665         * Make-file.in: Add dependency on back end header files;
7666         a parallel build should work now.
7667         * f95-lang-c (lang_identifier): Remove bogus comment.
7668         (g95_be_parse_file): Fix prototype.
7669         (g95_init): Make static.
7670         (g95_finish): Make static.
7671         * error.c (g95_syntax_error): Kill. Make define in...
7672         * g95.h (g95_syntax_error): Define.
7673         (g95.options): Make 'source' member 'const'.
7674         * interface.c (g95_match_interface): Explain
7675         hard-to-read condition.
7676         (g95_match_end_interface): Ditto.
7677         * trans_const.c (g95_build_string_const): Make 's' parameter
7678         'const'.
7679         * trans_const.h: Adjust protoype accordingly.
7680         * trans-decl.c: Include tree-dump.h
7681         (g95_generate_function_code): Build fixes for recent changes
7682         in the tree-ssa branch.
7683
7684 2003-01-08  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7685
7686         * format.c: Kill, move code from here...
7687         * io.c: ...to here.
7688         * Make-lang.in: Adjust.
7689         * MANIFEST: Ditto.
7690         * match.h: Ditto.
7691         * BUGS: Mention where to submit bugs.  Move old content...
7692         * TODO: ...to here.  New file.
7693
7694 2003-01-08  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7695         Fix most warnings, and suppress the ones we can't fix for now.
7696         * Make-lang.in: Suppress warnings about bad proto's in g95.h,
7697         these warnings just clutter the screen and there's not much
7698         we can do about them for now anyway.
7699         * check.c, iresolve.c: Mark unused function parameters.
7700         * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
7701         they should be resolved before they get here.
7702         * error.c: Remove unused FILE *status_out.
7703         * f95-lang.c (g95_init): Remove bogus cast.
7704         * Many files: Make things 'const' where required.
7705         * g95.h: Fix prototypes for all modified functions above.
7706         (g95_options): Remove 'object' member.
7707
7708 2003-01-07  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7709
7710         * Make-file.in: Cleanup bogus targets.  Add more comment.
7711         * lang-options.h: New option '-w'.
7712         * g95.h: add no_options field to struct g95_options.
7713         * options.c (g95_init_options): Default no_warnings to off.
7714         (g95_parse_arg): Recognise the '-w' switch and its alias,
7715         '-fno-warnings'.
7716         * error.c (g95_warning, g95_warning_now): Don't emit warning if
7717         no_warning option is set.
7718         * iresolve.c (g95_resolve_shape): Fix warning.
7719
7720 2003-01-07  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7721
7722         * primary.c (g95_next_string_char): Rename next_string_char, and
7723         make static.  Adjust callers accordingly.
7724         * resolve.c (resolve_generic_f0): Return try, not match.  Adjust
7725         callers accordingly.
7726         * g95.h: Split out all g95_match* functions to...
7727         * match.h: ...here. New file.
7728         * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
7729         matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
7730
7731 2003-01-07  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7732
7733         * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
7734         g95_merge_new_implicit): New functions.
7735         (g95_match_implicit_none, g95_match_implicit): Move from here...
7736         * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
7737         Modify to use the new functions in symbol.c.
7738         * g95.h: Add and move prototypes.
7739
7740 2003-01-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7741
7742         * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
7743         node compare function.
7744         (g95_insert_bbt): Likewise.
7745         (g95_insert_bbt_with_overlap): Likewise.
7746         (g95_delete_bbt): Likewise.
7747         (delete_treap): Likewise. Also fix a potential bug when calling it.
7748         * module.c (compare_pointers): Change proto to compare_fn.
7749         (compare_integers): Likewise.
7750         (compare_true_names): Likewise.
7751         (find_true_name): Adjust call to compare_true_names to match proto.
7752         (require_atom, write_atom, mio_name): Fix 'const' warnings.
7753         (init_pi_tree): Make compare a compare_fn instead of (int *).
7754         * resolve.c (compare_cases): Change proto to compare_fn.
7755         * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
7756         it static, and rename to compare_symtree.
7757         (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
7758         function.
7759         * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
7760         of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
7761
7762 2003-01-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7763         * Make-lang.in: Fix spaces/tabs issues from previous patch.
7764         * patch.options: Blow away Paul's checkin mistake :-)
7765         * io.c (terminate_io): Fix memory leak (Arnaud).
7766
7767 2003-01-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7768
7769         * Make-lang.in: Teach about building DVI, info manual.
7770         * g95.texi: New file.
7771
7772 2003-01-02  Paul Brook  <paul@nowt.org>
7773
7774         * trans-array.c (g95_reverse_ss): Make static and don't use.
7775         (g95_conv_ss_descriptor): Don't use g95_loopinfo
7776         (g95_conv_array_parameters): Modify for pointer assignments.
7777         (g95_walk_subexpr): New function.
7778         (g95_walk_expr*): Use it.
7779         * trans-array.h (g95_reverse_ss): Remove prototype.
7780         * trans-expr.c (g95_trans_pointer_assign): Implement.
7781         (Many): Set se.want_pointer before calling g95_conv_array_parameter.
7782         * trans-intrinsic.c: Sync with scalarizer changes.
7783         * trans-io.c: Ditto.
7784
7785 2002-12-29  Paul Brook  <paul@nowt.org>
7786
7787         * trans-array.c: Document calling convention for arrays.
7788
7789 2002-12-19  Paul Brook  <paul@nowt.org>
7790
7791         * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
7792         assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
7793         optional parameters for some intrinsics.
7794         (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
7795         * trans-expr.c (g95_conv_function_call): Pass NULL for absent
7796         optional parameters.
7797         * trans.h (g95_se): Add ignore_optional flag.
7798
7799 2002-12-15  Paul Brook  <paul@nowt.org>
7800
7801         * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
7802         * trans-decl.c (g95_generate_function_code): Use TDI_original.
7803
7804 2002-12-14  Paul Brook  <paul@nowt.org>
7805
7806         * trans-stmt.c (g95_trans_call): Use resolved symbol name.
7807
7808 2002-12-12  Paul Brook  <paul@nowt.org>
7809
7810         * trans-array.c (g95_trans_array_constructor_subarray): Fully
7811         initialize the scalarizer.
7812         (various): Update to new format of g95_expr->value.constructor.
7813
7814 2002-12-08  Paul Brook  <paul@nowt.org>
7815
7816         * trans-array.c (g95_put_offset_into_var): New function.
7817         (g95_trans_array_constructor_subarray): New function.
7818         (g95_trans_array_constructor_value): Use it.
7819         (g95_array_cons_size): Don't abort() on array components.
7820
7821 2002-12-08  Paul Brook  <paul@nowt.org>
7822
7823         * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
7824         * support.c: Update #includes.
7825         (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
7826         * trans-array.c: Update #includes.
7827         * trans.c: Ditto.
7828         * trans-const.c: Ditto.
7829         * trans-io.c: Ditto.
7830         * trans-types.c: Ditto.
7831         (g95_init_types): Set size_type_node.
7832         * trans-decl.c: Update #includes.
7833         (gfor_fndecl_adjust{l,r}): Declare and initialize.
7834         * trans-stmt.c: Update #includes.
7835         (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
7836         (g95_trans_select): Fix check for unbounded ranges.
7837         * trans-expr.c: Update #includes.
7838         (g95_conv_string_tmp): New function.
7839         (g95_conv_concat_op): Use it.
7840         * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
7841         * Trans-intrisic.c: Update #includes.
7842         (g95_conv_intrinsic_strcmp): New function.
7843         (g95_conv_intrinsic_adjust): Ditto.
7844         (g95_conv_intrinsic_function: Use them.
7845
7846 2002-11-30  Paul Brook  <paul@nowt.org>
7847
7848         * trans-array.c (g95_walk_function_expr): Handle non-array return by
7849         reference.
7850         * trans-dec.c (g95_build_function_decl): Handle character return
7851         parammeters.
7852         (g95_get_fake_result_decl): Ditto.
7853         (g95_trans_deferred_vars): Ditto.
7854         * trans-expr.c (g95_conv_function_call): Ditto.
7855         (g95_trans_arrayfunc_assign) Limit to array valued functions.
7856         * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
7857         (g95_conv_intrinsic_function): Use it.
7858         * trans-types.c (g95_sym_type): Handle functions returning strings.
7859         (g95_return_by_reference): Ditto.
7860         (g95_get_function_type): Ditto.
7861
7862 2002-11-18  Paul Brook  <paul@nowt.org>
7863
7864         * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
7865         requires a temporary.
7866         (g95_trans_select): Handle computed gotos.
7867         * trans-types.c (g95_build_array_type): Warn about non-functional
7868         assumed shape arrays.
7869         * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
7870         blocks.
7871         * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
7872         (g95_conv_intrinsic_int): New function.
7873         (g95_conv_intrinsic_mod): New function.
7874         (g95_conv_intrinsic_ichar): New function.
7875         (g95_conv_intrinsic_function): Use them.
7876         (g95_conv_intrinsic_dim): Use g95_evaluate_now.
7877
7878 2002-11-17  Toon Moene  <toon@moene.indiv.nluug.nl>
7879
7880         * trans-types.c (g95_build_array_type): Assumed
7881         sized arrays can have rank > 1.
7882         * trans.c (g95_trans_code): Remove erroneous
7883         warning about CONTINUE.
7884         * trans-expr.c (g95_conv_variable): Remove
7885         erroneous assert.
7886
7887 2002-11-15  Paul Brook  <paul@nowt.org>
7888
7889         * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
7890
7891 2002-10-31  Paul Brook  <paul@nowt.org>
7892
7893         * f95-tree.c: Remove tree copying stuff that's now in gimple.c
7894         * trans-expr.c (g95_conv_component_ref): Handle character string
7895         components.
7896         (g95_conv_string_parameter): Ditto.
7897         * trans-types.c (g95_get_derived_type): Add length decl to caracter
7898         string components.
7899
7900 2002-10-10  Paul Brook  <paul@nowt.org>
7901
7902         * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
7903         * trans-expr.c (g95_conv_function_call): Remove unreliable return value
7904         check.
7905         * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
7906         (g95_conv_intrinsic_function): Handle size and shape intrinsics.
7907         (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
7908         * trans-types.c (pvoid_type_node): Declare and initialize.
7909         * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
7910         (g95_array_allocate): Fix when base==data.
7911         (g95_conv_array_parameter): Correctly handle reduced rank sections.
7912         * trans-io.c (g95_trans_write): Correctly handle string modifiers.
7913
7914 2002-10-09  Paul Brook  <paul@nowt.org>
7915
7916         * (g95_conv_expr_reference): Handle character strings correctly.
7917
7918 2002-10-07  Paul Brook  <paul@nowt.org>
7919
7920         (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
7921         langhook.
7922         * trans-array.c (g95_build_array_initializer): Remove.
7923         (g95_conv_array_initializer): New Function.
7924         (g95_trans_auto_arry_allocation): Cleanup.
7925         (g95_trans_init_character_array): Remove.
7926         * g95spec.c: Link in libgforbegin.
7927         * trans.c (g95_generate_code): Rename main function to MAIN__.
7928         (g95_create_var): New function.
7929         (g95_create_var_np): New function.
7930         (g95_evaluate_now): New function.
7931         (g95_start_block): New function.
7932         (g95_finish_block): New function.
7933         (g95_add_expr_to_block): New function.
7934         (g95_add_block_to_block): New function.
7935         * trans-expr.c (g95_conv_componen_ref): New function.
7936         * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
7937         (F95_OBJS): Add dependency.o.
7938         * f95-lang.c (g95_is_simple_stmt): Remove.
7939         * f95-tree.c (mark_not_simple): New function.
7940         (unshare_all_trees): New function.
7941         (create_tmp_var, create_tmp_alias_var): Remove.
7942         * support.c (declare_tmp_vars, tree_last_decl): Remove.
7943         * trans*: Convert to new IR using GENERIC trees.  Don't bother about
7944         SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
7945
7946 2002-10-01  Paul Brook  <paul@nowt.org>
7947
7948         * trans-array.c: Add support for descriptorless arrays.
7949         (g95_conv_array_data): New function.
7950         (g95_conv_array_base): New function.
7951         * trans-array.h: Declare these here.
7952         * trans-decl.c(g95_create_mopdule_variable): Perform variable
7953         initialization and creation here.
7954         (g95_create_module_vars): Instead of here.
7955         * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
7956         * trans-intrinsic.c: Ditto.
7957         * trans-types.c (g95_is_nodesc_array): New function.
7958         (g95_get_nodesc_array_type): New function.
7959         (g95_sym_type, g95_get_derived_type): Use them.
7960         * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
7961
7962 2002-09-28  Paul Brook  <paul@nowt.org>
7963
7964         * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
7965         * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
7966         parameters.
7967
7968 2002-09-24  Paul Brook  <paul@nowt.org>
7969
7970         * f95-lang.c (listify): Remove declaration.
7971         (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
7972         (listify)
7973         * f95-tree.c (get_name): New function.
7974         * trans.c (module_namespace): Remove.
7975         * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
7976         * trans-types.c: Ditto.
7977
7978 2002-09-19  Paul Brook  <paul@nowt.org>
7979
7980         * trans-array.c (g95_get_array_cons_size): New Function.
7981         (g95_con_ss_startstride): Handle Array constructors.
7982         (g95_conv_loop_setup): Ditto.
7983         (g95_conv_array_parameter): Ditto.
7984         * tras-decl.c (g95_finish_var_decl): Make initializes variables
7985         static.
7986
7987 2002-09-19  Paul Brook  <paul@nowt.org>
7988
7989         * trans.c (g95_simple_fold_tmp): Detect variables inside
7990         NON_LVALUE_EXPR.
7991         * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
7992
7993 2002-09-18  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7994
7995         * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
7996
7997 2002-09-14  Paul Brook  <paul@nowt.org>
7998
7999         * trans.c (g95_create_module_variable): Move to trans-decl.c.
8000         * trans-const.c (g95_conv_string_init): New Function.
8001         * trans-const.h: Declare it.
8002         * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
8003         variables. Don't bail on intrinsic symbols.
8004         (get_extern_function_decl): Handle specific intrinsic functions.
8005         * trans-types.c (g95_sym_type): Dummy functions don't return
8006         reference types.
8007         * trans-array.c (g95_build_array_initializer): New Function.
8008         (g95_trans_auto_array_allocation): Build initializer for static decls.
8009         Don't use mpz_addmul, it's GMP4 only.
8010
8011 2002-09-12  Paul Brook  <paul@nowt.org>
8012
8013         * trans-decl.c (g95_generate_code): Fix thinko with return variable.
8014         (g95_get_extern_function_decl, g95_build_function_decl): Mangle
8015         assembler names for module procedures.
8016
8017 2002-09-11  Tobias Schlueter  <Tobias.Schlueter@physik.uni-muenchen.de>
8018
8019         * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
8020         dependency/
8021
8022 2002-09-10  Paul Brook  <paul@nowt.org>
8023
8024         * trans-array.c: Change format of G95_SS_TEMP strictures.
8025         (g95_check_fncall_dependancy): New function.
8026         (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
8027         offsets.
8028         * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
8029         result variables.
8030         (g95_build_function_decl): Don't assume result arrays are packed.
8031         (g95_trans-deferred-vars): Handle array result variables.
8032         (g95_generate_fuction_code): Clear saved_function_decls.
8033         * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
8034         reference.
8035         (g95_trans_arrayfunc_assign): New function.
8036         (g95_trans_assignment): Use it.
8037         * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
8038         (g95_se): Add direct_byref.
8039         * trans-types.c: Use sym->result rather than sym where appropriate.
8040         * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
8041         Update other functions to use this.
8042         (g95_is_intrinsic_libcall): New function.
8043         (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
8044         (g95_walk_intrinsic_function): Ditto.
8045
8046 2002-09-08  Paul Brook  <paul@nowt.org>
8047
8048         * trans-types.c: Change rank field to dtype field in array descriptor.
8049         * trans-array.c: Implement filling of dtype array descriptor field.
8050         * trans-intrinsic.c: Fix broken LEN intrinsic.
8051
8052 2002-09-07  Paul Brook  <paul@nowt.org>
8053
8054         * trans-intrinsic.c: Remove outdated todo intrinsic list.
8055         (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
8056         (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
8057
8058 2002-09-06  Paul Brook  <paul@nowt.org>
8059
8060         * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
8061         (gt-f95-trans-types.h): Add dependancy information.
8062         * config-lang.in (gtfiles): Add trans-types.c
8063         * f95-lang.c (g95_be_parse_file): Pass error and warning counts
8064         back to top-level code.
8065         * trans-array.c, trans-types.c: Change format of array descriptor.
8066         (g95_conv_descriptor_dimension): New function.
8067         * trans-types.h (g95_conv_descriptor_rank): define.
8068         * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
8069         intrinsics.
8070
8071 2002-09-02  Steven Bosscher  <s.bosscher@student.tudelft.nl>
8072
8073         * trans-array.c, trans-types.c: Add rank information to descriptor.
8074
8075 2002-09-06  Tobias Schlueter  <Tobias.Schlueter@physik.uni-muenchen.de>
8076
8077         * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
8078
8079 2002-09-04  Paul Brook  <paul@nowt.org>
8080
8081         * f95-lang.c (g95_create_decls): New function.
8082         (g95_init):  Move initialization of external decls to above, and call
8083         from g95_be_parse_file.
8084         * trans.c (g95_finish_stmt): Don't amputate the decl chain.
8085         * trans-types.c (g95_init_types): Always name integer and char types.
8086         (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
8087
8088 2002-09-02  Steven Bosscher  <s.bosscher@student.tudelft.nl>
8089
8090         * Make-lang.in: Add options.c to F95_PARSER_OBJS
8091
8092 2002-09-02  Paul Brook  <paul@nowt.org>
8093
8094         * g95_generate_code: Clear the attr for __fortran_main.
8095         * trans-types.c (g95_finish_type): New function.
8096         * g95_init_io_state_type: Use g95_finish_type.
8097         * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
8098
8099 2002-09-01  Paul Brook  <paul@nowt.org>
8100
8101         * README.backend: Warn about the dangers of extra config.h files.
8102         Remove obsolete libgfor stuff.
8103         * config-lang.in: Add target-libgfor dependancy.
8104         * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
8105
8106 2002-09-01  Toon Moene  <toon@moene.indiv.nluug.nl>
8107
8108         * g95_conv_mpz_to_tree: Free storage pointed to by q,
8109         not by buff.
8110
8111 2002-08-30  Paul Brook  <paul@nowt.org>
8112
8113         * trans-intrinsic.c (g95_conv_intrinsic_function,
8114         g95_walk_intrinsic_function): Added ANY and ALL.
8115         (g95_conv_intrinsic_anyall): New function.
8116         * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in
8117         mangled name