OSDN Git Service

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