OSDN Git Service

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