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