OSDN Git Service

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