OSDN Git Service

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