OSDN Git Service

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