OSDN Git Service

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