OSDN Git Service

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