OSDN Git Service

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