OSDN Git Service

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