OSDN Git Service

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