OSDN Git Service

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