OSDN Git Service

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