OSDN Git Service

94a163941a1c347d6cc937812eca07e4cc7a00df
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
1 2005-01-29  Paul Brook  <paul@codesourcery.com>
2
3         PR fortran/18565
4         * check.c (real_or_complex_check): New function.
5         (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc): New functions.
6         * intrinsic.c (add_functions): Use new check functions.
7         * intrinsic.h (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc):
8         Add prototypes.
9
10 2005-01-29  Steven G. Kargl  <kargls@comcast.net>
11
12         PR fortran/19589
13         * expr.c (gfc_check_assign):  Check for conformance of logical operands
14
15 2004-01-27  Steven Bosscher  <stevenb@suse.de>
16
17         * trans-decl.c (gfc_build_label_decl): Set DECL_ARTIFICAL and
18         TREE_USED for all labels.
19         (gfc_trans_entry_master_switch): Use it instead of building a
20         label by hand.
21         * trans-io.c (add_case): Likewise.
22         * trans-stmt.c (gfc_trans_integer_select): Likewise.
23
24 2004-01-23  Paul Brook  <paul@codesourcery.com>
25         Steven G. Kargl  <kargls@comcast.net>
26
27         PR fortran/17941
28         * arith.c (gfc_convert_real): Remove sign handling.
29         * primary.c (match_digits): Allow whitespace after initial sign.
30         (match_real_const): Handle signs here.  Allow whitespace after
31         initial sign.  Remove dead code.
32         (match_const_complex_part): Remove.
33         (match_complex_part): Use match_{real,integer}_const.
34         (match_complex_constant): Cross-promote integer types.
35
36 2005-01-23  James A. Morrison  <phython@gcc.gnu.org>
37
38         PR fortran/19294
39         * iresolve.c (gfc_resolve_transpose): Resolve to transpose_c4 or
40         transpose_c8 for complex types.
41
42 2005-01-23  Kazu Hirata  <kazu@cs.umass.edu>
43
44         * data.c, dependency.c, f95-lang.c, io.c, trans-array.c,
45         trans-decl.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
46         trans-stmt.c, trans-types.c, trans.h: Fix comment typos.
47         Follow spelling conventions.
48
49 2005-01-22  Bud Davis  <bdavis9659@comcast.net>
50
51         PR fortran/19313
52         * trans-io.c (gfc_trans_inquire): Added code to support
53         pad.
54
55 2005-01-22  Steven G. Kargl  <kargls@comcast.net>
56
57         * intrinsic.c (make_alias):  Add standard argument. 
58         (add_functions): Update make_alias calls.
59
60 2005-01-22  Paul Brook  <paul@codesourcery.com>
61
62         * trans-expr.c (gfc_conv_function_call): Remove bogus TODO.
63
64 2005-01-22  Paul Brook  <paul@codesourcery.com>
65
66         * gfortran.h (gfc_check_access): Add prototype.
67         * match.c (gfc_match_namelist): Remove TODO.
68         * module.c (check_access): Rename ...
69         (gfc_check_access): ... to this.  Boolify.  Update callers.
70         * resolve.c (resolve_symbol): Check for private objects in public
71         namelists.
72
73 2005-01-22  Paul Brook  <paul@codesourcery.com>
74
75         * primary.c (gfc_match_rvalue): Only apply implicit type if variable
76         does not have an explicit type.
77         (gfc_match_variable): Resolve implicit derived types in all cases.
78         Resolve contained function types from their own namespace, not the
79         parent.
80         * resolve.c (resolve_contained_fntype): Remove duplicate sym->result
81         checking.  Resolve from the contained namespace, not the parent.
82
83 2005-01-22  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
84
85         PR fortran/19543
86         * trans-const.c (gfc_conv_constant_to_tree): Give logical
87         constants the correct type.
88
89         PR fortran/19194
90         * trans-io.c (ADD_STRING): Use gfc_charlen_type_node for string
91         length parameters.
92         (gfc_build_io_library_fndecls): 'rec' and 'recl_in' are not
93         pointer fields.
94
95 2005-01-18  Kazu Hirata  <kazu@cs.umass.edu>
96
97         * arith.c, array.c, check.c, decl.c, expr.c, f95-lang.c,
98         gfortran.h, interface.c, intrinsic.c, io.c, iresolve.c,
99         match.c, matchexp.c, misc.c, module.c, options.c, parse.c,
100         scanner.c, simplify.c, symbol.c, trans-array.c, trans-expr.c,
101         trans-io.c, trans-stmt.c, trans.c: Update copyright.
102
103 2005-01-17  Ira Rosen  <irar@il.ibm.com>
104
105         * f95-lang.c (gfc_init_builtin_functions): Call targetm.init_builtins.
106
107 2005-01-16  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
108
109         PR fortran/19182
110         * error.c (error_char): Line-buffer errors / warnings.
111
112 2005-01-16  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
113
114         * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Fix signed /
115         unsigned issue.  Use build_int_cst instead of converting
116         integer_zero_node.  Remove unnecessary conversion.
117
118         * trans-types.c (gfc_get_character_type_len): : Use
119         gfc_charlen_type_node as basic type for the range field.
120
121         * trans-intrinsic.c (build_fixbound_expr,
122         gfc_conv_intrinsic_bound, gfc_conv_intrinsic_anyall,
123         gfc_conv_intrinsic_count, gfc_conv_intrinsic_btest,
124         gfc_conv_intrinsic_singlebitop): Use 'build_int_cst' instead
125         of converting 'integer_zero_node' or 'integer_one_node'
126         respectively.
127         (gfc_conv_intrinsic_ishftc): Same, but store in local variable to
128         evade re-building.
129         (gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_rrspacing,
130         gfc_conv_intrinsic_trim, gfc_conv_intrinsic_iargc): Use
131         'build_int_cst' instead of converting 'integer_zero_node' or
132         'integer_one_node' respectively.
133
134         * trans-intrinsic.c (gfc_conv_intrinsic_index,
135         gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove
136         'gfc'-prefix from local variable, remove dead code, use correct
137         type when inserting argument.
138
139         * trans-intrinsic.c, trans-types.c: Update copyright years.
140
141 2005-01-16  Steven G. Kargl  <kargls@comcast.net>
142
143         PR 19168
144         * resolve.c (check_case_overlap): Typo in comment.
145         (validate_case_label_expr):  Fix up kinds of case values
146         (resolve_select): Properly handle kind mismatches.
147
148 2004-01-16  Paul Brook  <paul@codesourcery.com>
149
150         PR fortran/17675
151         * trans-common.c (translate_common): Remove duplicate function call.
152         (finish_equivalences): Preserve alignment when biasing offsets.
153
154 2005-01-15  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de
155
156         * primary.c (check_digit): Call 'ISXDIGIT' instead of assuming
157         ASCII-like character encoding.
158
159 2005-01-14  Steven G. Kargl  <kargls@comcast.net>
160
161         * resolve.c (compare_case): Cleanup.
162
163 2005-01-14  Steven G. Kargl  <kargls@comcast.net>
164
165         * resolve.c (compare_case): Give arguments correct type.
166
167 2005-01-13  Kazu Hirata  <kazu@cs.umass.edu>
168
169         * iresolve.c, trans-common.c, trans-types.c: Fix comment
170         typos.
171
172 2005-01-09  Paul Brook  <paul@codesourcery.com>
173
174         PR fortran/17675
175         * trans-common.c (current_common, current_offset): Remove.
176         (create_common): Add head argument.
177         (align_segment): New function.
178         (apply_segment_offset): New function.
179         (translate_common): Merge code from new_segment.  Handle alignment.
180         (new_segment): Remove.
181         (finish_equivalences): Ensure proper alignment.
182
183 2005-01-08  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
184
185         * trans-const.c: Don't include unused math.h.
186
187         * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl,
188         gfc_conv_intrinsic_bound, gfc_conv_intrinsic_minmaxloc,
189         gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_len): Remove
190         trailing whitespace.
191         (prepare_arg_info): Fix formatting, indenting and remove trailing
192         whitespace.
193         (gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_trim): Remove
194         trailing whitespace.
195
196         * arith.c (arctangent2, gfc_arith_init_1, gfc_arith_done_1,
197         gfc_constant_result, gfc_range_check, gfc_arith_power,
198         eval_type_intrinsic0, eval_intrinsic_f2, gfc_real2real,
199         gfc_real2complex, gfc_complex2int, gfc_complex2real,
200         gfc_complex2complex): Fix whitespace issues.
201         * check.c (must_be, type_check, numeric_check, int_or_real_check,
202         logical_array_check, array_check, scalar_check, nonoptional_check,
203         variable_check, dim_check, check_a_kind, gfc_check_a_ikind,
204         gfc_check_a_xkind, gfc_check_abs, gfc_check_all_any,
205         gfc_check_allocated, gfc_check_a_p, gfc_check_besn,
206         gfc_check_btest, gfc_check_char, gfc_check_cmplx, gfc_check_count,
207         gfc_check_cshift, gfc_check_dcmplx, gfc_check_dble,
208         gfc_check_digits, gfc_check_dot_product, gfc_check_eoshift,
209         gfc_check_fnum, gfc_check_g77_math1, gfc_check_huge, gfc_check_i,
210         gfc_check_iand, gfc_check_ibclr, gfc_check_ibits, gfc_check_ibset,
211         gfc_check_idnint, gfc_check_ieor, gfc_check_index, gfc_check_int,
212         gfc_check_ior, gfc_check_ishft, gfc_check_ishftc, gfc_check_kind,
213         gfc_check_lbound, gfc_check_logical, min_max_args,
214         gfc_check_min_max_integer, gfc_check_min_max_real,
215         gfc_check_min_max_double, gfc_check_matmul,
216         gfc_check_minval_maxval, gfc_check_merge, gfc_check_nearest,
217         gfc_check_pack, gfc_check_precision, gfc_check_radix,
218         gfc_check_range, gfc_check_real, gfc_check_repeat,
219         gfc_check_scale, gfc_check_scan, gfc_check_selected_real_kind,
220         gfc_check_set_exponent): Fix formatting issues.
221         (gfc_check_size, gfc_check_sign): Alphabetize function order,
222         remove whitespace-only line.
223         (gfc_check_fstat, gfc_check_fstat_sub, gfc_check_stat,
224         gfc_check_stat_sub, gfc_check_transfer, gfc_check_transpose,
225         gfc_check_ubound, gfc_check_unpack, gfc_check_verify, gfc_check_x,
226         gfc_check_cpu_time, gfc_check_date_and_time, gfc_check_mvbits,
227         gfc_check_random_number, gfc_check_random_seed,
228         gfc_check_second_sub, gfc_check_system_clock,
229         gfc_check_getcwd_sub, gfc_check_exit, gfc_check_flush,
230         gfc_check_umask, gfc_check_umask_sub, gfc_check_unlink,
231         gfc_check_unlink_sub): Fix formatting issues.
232         
233 2005-01-08  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
234
235         * gfortran.h: Remove outdated comment.  Don't include stdio.h
236         explicitly.
237
238 2005-01-06  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
239
240         * gfortranspec.c (lang_specific_driver): Change year to 2005 in
241         output of 'gfortran --version'.
242
243 2005-01-03  Steven G. Kargl  <kargls@comcast.net>
244
245         * arith.c: Add system.h; remove string.h
246         * decl.c: Ditto
247         * matchexp.c: Ditto
248         * parse.c: Ditto
249         * resolve.c: Ditto
250         * st.c: Ditto
251         * check.c: Remove stdlib.h and stdarg.h
252         * error.c: Remove stdlib.h, stdarg.h, stdio.h, string.h
253         * expr.c: Add system.h; remove stdarg.h, stdio.h, and string.h
254         * f95-lang.c: Add system.h; remove stdio.h
255         * interface.c: Add system.h; remove stdlib.h and string.h
256         * intrinsic.c: Remove stdarg.h, stdio.h, and string.h
257         * io.c: Remove string.h
258         * simplify.c: Ditto
259         * match.c: Remove stdarg.h and string.h
260         * misc.c: Update copyright; add system.h; remove stdlib.h,
261         string.h, and sys/stat.h
262         * module.c: Add system.h; remove string.h, stdio.h, errno.h,
263         unistd.h, and time.h
264         * option.c: Remove string.h and stdlib.h
265         * primary.c: Ditto
266         * scanner.c: Update copyright; add system.h; remove stdlib.h,
267         stdio.h, string.h, and strings.h
268         * symbol.c: Add system.h; remove stdlib.h, stdio.h, and string.h
269         * trans-array.c: Remove stdio.h and gmp.h
270         * trans-const.c: Ditto
271         * trans-expr.c: Ditto
272         * trans-io.c: Ditto
273         * trans-stmt.c: Ditto
274         * trans.c: Ditto
275         * trans-intrinsic.c: Remove stdio.h and string.h
276
277 2004-12-29  Steven G. Kargl  <kargls@comcast.net>
278
279         * gfortran.h (gfc_case): fix typo in comment.
280
281 2004-12-27  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de> 
282
283         * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Change to
284         logical shift.  Call fold.  Remove 0-bit shift shortcut.
285         (gfc_conv_intrinsic_ishftc): Convert first argument to at least
286         4 bytes bits.  Convert 2nd and 3rd argument to 4 bytes.  Convert
287         result if width(arg 1) < 4 bytes.  Call fold.
288
289         PR fortran/19032
290         * trans-intrinsic.c (gfc_conv_intrinsic_mod): Update comment
291         in front of function to match the standard.  Correct handling
292         of MODULO.
293
294 2004-12-27  Andrew Pinski  <pinskia@physics.uc.edu>
295
296         * trans-expr.c (gfc_conv_cst_int_power): Only check for
297         flag_unsafe_math_optimizations if we have a float type.
298
299 2004-12-23  Steven G. Kargl  <kargls@comcast.net>
300
301         * gfortran.texi: Fix typo.
302
303 2004-12-16  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
304
305         * trans-intrinsic.c (build_fixbound_expr): Clarify comment, fix
306         comment typo.
307
308 2004-12-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
309
310         PR fortran/18993
311         * match.c (gfc_match_if): Don't explicitly skip optional whitespace.
312         (gfc_match_nullify): Make sure that ')' is in front of the end of
313         statement.
314
315         * scanner.c (skip_fixed_comments): Fix typo in comment preceding
316         function.
317
318 2004-12-14  Richard Henderson  <rth@redhat.com>
319
320         * gfortran.h (gfc_expr.function.name): Make const.
321         (gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
322         (gfc_get_string): Update prototype.
323         * iresolve.c: Include tree.h.
324         (string_node, HASH_SIZE, string_head, hash): Remove.
325         (gfc_get_string): Use vsnprintf, get_identifier.
326         (free_strings, gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
327         * misc.c (gfc_init_1): Don't call gfc_iresolve_init_1.
328         (gfc_done_1): Don't call gfc_iresolve_done_1.
329         * module.c (mio_allocated_string): Take and return const char *,
330         instead of modifying char**.
331         (mio_expr): Update to match.
332         * resolve.c (pure_function): Constify name argument.
333         (resolve_function): Constify name.
334         * trans-intrinsic.c (gfc_conv_intrinsic_function): Likewise.
335
336 2004-12-12  Richard Henderson  <rth@redhat.com>
337
338         * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
339         gfc_resolve_cshift, gfc_resolve_dot_product, gfc_resolve_eoshift,
340         gfc_resolve_matmul, gfc_resolve_maxloc, gfc_resolve_maxval,
341         gfc_resolve_minloc, gfc_resolve_minval, gfc_resolve_pack,
342         gfc_resolve_product, gfc_resolve_reshape, gfc_resolve_shape,
343         gfc_resolve_spread, gfc_resolve_sum, gfc_resolve_transpose,
344         gfc_resolve_unpack: Use PREFIX.
345
346 2004-12-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
347
348         PR fortran/18869
349         * match.c (gfc_match_common): Skip whitespace.
350
351 2004-12-12  Steven G. Kargl  <kargls@comcast.net>
352
353         PR fortran/16581
354         * check.c (gfc_check_iand, gfc_check_ibclr, gfc_check_ibits,
355         gfc_check_ibset, gfc_check_ieor, gfc_check_ior): Remove default
356         integer kind check; Issue error for -std=f95 when needed.
357         * intrinsic.c (add_functions): Change ieor from GFC_STD_GNU to
358         GFC_STD_F95.
359         * iresolve.c (gfc_resolve_iand, gfc_resolve_ieor, gfc_resolve_ior):
360         Promote arguments to same kind.
361
362 2004-12-12  Steven G. Kargl  <kargls@comcast.net>
363         Paul Brook  <paul@codesourcery.com>
364
365         PR fortran/16222
366         * resolve.c (gfc_resolve_iterator_expr): New function.
367         (gfc_resolve_iterator): Use it.  Add real_ok argument.  Convert
368         start, end and stride to correct type.
369         (resolve_code): Pass extra argument.
370         * array.c (resolve_array_list): Pass extra argument.
371         * gfortran.h (gfc_resolve): Add prototype.
372         * trans-stmt.c (gfc_trans_do): Remove redundant type conversions.
373         Handle real type iterators.
374
375 2004-12-11  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
376
377         PR fortran/17175
378         * iresolve.c (gfc_resolve_scale): Convert 'I' argument if not of
379         same kind as C's 'int'.
380         (gfc_resolve_set_exponent): Convert 'I' argument if not of kind 4.
381
382 2004-12-08  Richard Henderson  <rth@redhat.com>
383
384         * intrinsic.c (gfc_convert_type_warn): Propagate the input shape
385         to the output expression.
386         * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift): Suppress
387         warning conversion.
388         (gfc_resolve_reshape): Force convert SHAPE and ORDER parameters
389         to index kind.
390
391 2004-12-08  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
392
393         PR fortran/18826
394         * resolve.c (resolve_code): Impose correct restrictions on
395         assigned variable.
396
397         * decl.c (gfc_match_end): Use locus of END when eos is an error.
398
399 2004-12-02  Steven G. Kargl  <kargls@comcast.net>
400         Paul Brook  <paul@codesourcery.com>
401
402         * check.c (gfc_check_flush, gfc_check_fnum): New functions.
403         (gfc_check_fstat, gfc_check_fstat_sub): New functions.
404         (gfc_check_stat, gfc_check_stat_sub): New functions.
405         * gfortran.h (GFC_ISYM_FNUM,GFC_ISYM_FSTAT,GFC_ISYM_STAT): New symbols
406         * intrinsic.c (add_functions,add_subroutines): Add flush, fnum,
407         fstat, and stat to intrinsics symbol tables.
408         * intrinsic.h (gfc_check_flush, gfc_resolve_stat_sub): Add prototypes.
409         (gfc_resolve_fstat_sub, gfc_resolve_stat): Ditto.
410         * iresolve.c (gfc_resolve_fnum, gfc_resolve_fstat): New functions.
411         (gfc_resolve_stat, gfc_resolve_flush): New functions.
412         (gfc_resolve_stat_sub,gfc_resolve_fstat_sub): New functions
413         * trans-intrinsic.c (gfc_conv_intrinsic_function): Add new intrinsics.
414
415 2004-12-02  Steven G. Kargl  <kargls@comcast.net>
416
417         * intrinsic.c: Fix and add comments, fix function declarations
418         (OPTIONAL,REQUIRED): New symbols
419         (add_functions,add_subroutines): Use symbols
420         (gmp.h): Remove unused include
421
422 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
423
424         * f95-lang.c, gfortranspec.c, trans-decl.c: Avoid ` as left quote
425         in diagnostics.
426
427 2004-11-24  Steven Bosscher  <stevenb@suse.de>
428
429         * options.c (gfc_post_options): Don't clear flag_inline_functions.
430
431 2004-11-20  Steven G. Kargl  <kargls@comcast.net>
432
433         * check.c (gfc_check_getcwd_sub): Fix seg fault.
434
435         * check.c (gfc_check_exit,gfc_check_umask,gfc_check_umask_sub,
436         gfc_check_unlink,gfc_check_unlink_sub): New functions
437         * gfortran.h (GFC_ISYM_UMASK,GFC_ISYM_UNLINK): New symbols
438         * intrinsic.c (add_functions,add_subroutines): Add umask, unlink,
439         exit to intrinsics symbol tables.
440         * intrinsic.h (gfc_check_umask,gfc_check_unlink,gfc_check_exit,
441         gfc_check_umask_sub,gfc_check_unlink_sub,gfc_resolve_umask,
442         gfc_resolve_unlink,gfc_resolve_exit,gfc_resolve_umask_sub,
443         gfc_resolve_unlink_sub): Add and sort prototypes.
444         * iresolve.c (gfc_resolve_umask,gfc_resolve_unlink,gfc_resolve_exit,
445         gfc_resolve_umask_sub,gfc_resolve_unlink_sub): New functions
446         * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbols
447
448 2004-11-16  Paul Brook  <paul@codesourcery.com>
449
450         PR fortran/13010
451         * trans-array.c (gfc_trans_allocate_temp_array): Use gfc_get_dtype.
452         (gfc_array_init_size, gfc_conv_expr_descriptor): Ditto.
453         * trans-types.c (gfc_get_dtype): Accept array type rather than element
454         type.
455         (gfc_get_nodesc_array_type): Don't set GFC_TYPE_ARRAY_DTYPE.
456         (gfc_get_array_type_bounds): Ditto.
457         (gfc_get_derived_type): Recurse into derived type pointers.
458         * trans-types.h (gfc_get_dtype): Add prototype.
459         * trans.h (GFC_TYPE_ARRAY_DTYPE): Add comment.
460
461 2004-11-15  Paul Brook  <paul@codesourcery.com>
462
463         * trans-types.c (gfc_get_dtype): Remove obsolete TODO.
464
465 2004-11-10  Paul Brook  <paul@codesourcery.com>
466
467         PR fortran/18375
468         * trans-expr.c (gfc_trans_subarray_assign): Free shape before ss.
469         * trans-io.c (transfer_array_component): Ditto.
470
471 2004-11-10  Paul Brook  <paul@codesourcery.com>
472
473         * invoke.texi: Fix typo.
474
475 2004-11-08  Kazu Hirata  <kazu@cs.umass.edu>
476
477         * arith.c, array.c, decl.c, expr.c, f95-lang.c, gfortran.h,
478         gfortranspec.c, interface.c, intrinsic.c, iresolve.c, match.c,
479         module.c, parse.c, parse.h, primary.c, resolve.c, scanner.c,
480         trans-array.c, trans-array.h, trans-expr.c, trans-intrinsic.c,
481         trans-io.c, trans-stmt.c, trans.h: Fix comment formatting.
482
483 2004-11-06  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
484
485         PR fortran/18023
486         * io.c (resolve_tag): Tighten up exception for assigned FORMAT.
487
488 2004-11-06  Kazu Hirata  <kazu@cs.umass.edu>
489
490         * gfortranspec.c: Replace GNU CC with GCC.
491
492 2004-11-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
493
494         * gfortranspec.c (lang_specific_driver): Change year to 2004.
495
496 2004-11-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
497
498         PR fortran/18111
499         *  trans-decl.c (create_function_arglist): Set DECL_ARTIFICIAL for
500         hidden parameters.
501
502 2004-11-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
503
504         PR fortran/15164
505         * trans-decl.c (gfc_finish_var_decl): Don't declare arguments to
506         module procedures as if they were module variables.
507
508 2004-11-03  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
509
510         PR fortran/17535
511         PR fortran/17583
512         PR fortran/17713
513         * module.c (write_symbol1): Set module_name for dummy arguments.
514
515 2004-11-02  Paul Brook  <paul@codesourcery.com>
516
517         * intrinsic.c (check_intrinsic_standard): Include error locus.
518         Remove VLA.
519         (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Pass
520         locus to check_intrinsic_standard.
521
522 2004-10-31  Janne Blomqvist  <jblomqvi@cc.hut.fi>
523
524         PR fortran/17590
525         * gfortran.h: Change GFC_STD_* flags to more appropriate
526         ones. (struct gfc_intrinsic_isym): Add field for standard. (struct
527         gfc_option_t): Add field for warning about use of nonstandard
528         intrinsics.
529         * intrinsic.c (add_sym): Add parameter for standard version, check
530         this against current standard.
531         (add_sym_0): Pass standard parameter to add_sym.
532         (add_sym_1, add_sym_0s, add_sym_1s, add_sym_1m, add_sym_2): Ditto.
533         (add_sym_2s, add_sym_3, add_sym_3ml, add_sym_3red, add_sym_3s): Ditto.
534         (add_sym_4, add_sym_4s, add_sym_5, add_sym_5s): Ditto.
535         (make_generic): Add parameter for standard, check this
536         against currently selected standard.
537         (add_functions, add_subroutines): Add parameter to tell which
538         standard an intrinsic belongs to.
539         (check_intrinsic_standard): New function.
540         (gfc_intrinsic_func_interface): Add call to check_intrinsic_standard.
541         (gfc_intrinsic_sub_interface): Ditto.
542         * lang.opt: Add Wnonstd-intrinsics option.
543         * options.c (gfc_init_options): Change to use new GFC_STD_* flags,
544         init new warning.
545         (set_Wall): Add warning about nonstd intrinsics.
546         (gfc_handle_option): Change to use new GFC_STD_* flags,
547         handle new warning.
548         * invoke.texi: Update manual to include -Wnonstd-intrinsics.
549
550 2004-10-30  Andrew Pinski  <pinskia@physics.uc.edu>
551
552         * f95-lang.c (lang_tree_node): Add chain_next to be the TREE_CHAIN.
553
554 2004-10-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
555
556         * simplify.c (twos_complement): Calculate mask in GMP arithmetic.
557
558 2004-10-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
559
560         * trans.c (gfc_trans_code): Set global locus after recursing. Fix
561         comment typo.
562
563 2004-10-30  Canqun Yang  <canqun@nudt.edu.cn>
564
565         * check.c (gfc_check_rand): Allow missing optional argument. 
566         (gfc_check_irand): Ditto.
567         * intrinsic.c (add_functions): Set arg optional flag for {i,}rand.
568
569 2004-10-28  Scott Robert Ladd  <scott.ladd@coyotegulch.com>
570
571         PR fortran/13490, PR fortran/17912
572         * gcc/fortran/gfortran.h: Added pedantic_min_int to gfc_integer_info
573         * gcc/fortran/gfortran.h: Added ARITH_ASYMMETRIC to arith
574         * gcc/fortran/arith.c: Added support for an "asymmetric integer"
575         warning when compiling with pedantic.
576         * gcc/fortran/arith.c: Set minimum integer values to reflect
577         realities of two's complement signed integers. Added
578         pedantic minimum.
579
580 2004-10-17  Andrew Pinski  <pinskia@physics.uc.edu>
581
582         * Make-lang.in (F95_ADDITIONAL_OBJS): Kill.
583         (f951): Do not depend on F95_ADDITIONAL_OBJS and don't
584         link it in.
585
586 2004-10-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
587
588         * trans-decl.c (generate_local_decl): Simplify logic, fix comment
589         typo.
590         (gfc_generate_function_code): Fix formatting issue.
591
592 2004-10-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
593
594         * module.c: Fix formatting issues.
595
596 2004-10-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
597
598         * module.c (mio_interface_rest): Set where member of interface
599         while loading.
600
601 2004-10-08  Andrew Pinski  <pinskia@physics.uc.edu>
602
603         PR fortran/17901
604         * options.c (gfc_handle_option): Add break after handing the
605         J/M option.
606
607 2004-10-08  Tobias Schlueter  <tobias.shclueter@physik.uni-muenchen.de>
608
609         * arith.c: Fix formatting issues.
610         
611 2004-10-07  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
612
613         PR fortran/17676
614         * resolve.c (resolve_operator): Use correct operator name in message.
615
616 2004-10-07  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
617
618         * primary.c (match_boz_constant): Allow kind parameter suffixes.
619         Move standard warning further to the front.
620
621 2004-10-07  Kazu Hirata  <kazu@cs.umass.edu>
622
623         * trans-stmt.c: Fix a comment typo.
624
625 2004-10-07  Paul Brook  <paul@codesourcery.com>
626
627         PR fortran/17678
628         * trans-array.c (gfc_trans_deferred_array): Leave use associated
629         variables alone.
630
631 2004-10-06  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
632
633         PR fortran/17568
634         * simplify.c (twos_complement): New function.
635         (gfc_simplify_ishft, gfc_simplify_ishftc): Revise.
636
637         * simplify.c (gfc_simplify_abs): Use mpfr_hypot for CABS.
638
639 2004-10-06  Paul Brook  <paul@codesourcery.com>
640
641         * trans-stmt.c (gfc_trans_simple_do): New function.
642         (gfc_trans_do): Use it.  Evaluate iteration bounds before entering
643         loop.  Update comments.
644
645 2004-10-04  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
646
647         PR fortran/17283
648         * iresolve.c (gfc_resolve_pack): Choose function depending if mask
649         is scalar.
650
651         PR fortran/17631
652         * intrinsic.c (add_sym_5): Remove.
653         (add_subroutines): Add resolution function for MVBITS.
654         * intrinsic.h (gfc_resolve_mvbits): Declare resolution function for
655         MVBITS
656         * iresolve.c (gfc_resolve_mvbits): New function.
657         (gfc_resolve_random_number): Remove empty line at end of function.
658
659         * trans-const.c (gfc_build_cstring_const): New function.
660         (gfc_init_cst): Use new function.
661         * trans-const.h (gfc_build_cstring_const): Add prototype.
662         * trans-io.c (set_string, set_error_locus): Use new function.
663         * trans-stmt.c (gfc_trans_goto): Use new function.
664         
665         PR fortran/17708
666         * parse.c (accept_statement): Don't treat END DO like END IF and
667         END SELECT.
668         (parse_do_block): Generate possible END DO label inside END DO
669         block.
670
671         PR fortran/17776
672         * check.c (gfc_check_system_sub): New function.
673         * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SYSTEM.
674         * intrinsic.c (add_functions): Add 'system'.
675         (add_subroutines): Add 'system'.
676         * intrinsic.h (gfc_check_etime_sub, gfc_check_getcwd_sub):
677         Move prototypes to other suborutines.
678         (gfc_check_system_sub, gfc_resolve_system, gfc_resolve_system_sub):
679         Add prototype.
680         (gfc_resolve_system_clock): Fix formatting of prototype.
681         * iresolve.c (gfc_resolve_system, gfc_resolve_system_sub): New
682         functions.
683         * trans-intrinsic.c (gfc_conv_intrinsic_function): Deal with
684         GFC_ISYM_SYSTEM.
685
686 2004-10-04  Erik Schnetter  <schnetter@aei.mpg.de>
687
688         * scanner.c (preprocessor_line): Accept preprocessor lines without
689         file names.  Check file names for closing quotes.  Handle escaped
690         quotes in file names.
691
692 2004-10-04  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
693         Paul Brook  <paul@codesourcery.com>
694
695         * trans-array.c (gfc_conv_expr_descriptor): Check for substriungs.
696         Use gfc_get_expr_charlen.
697         * trans-expr.c (gfc_get_expr_charlen): New function.
698         * trans.h (gfc_get_expr_charlen): Add prototype.
699
700 2004-10-04  Kazu Hirata  <kazu@cs.umass.edu>
701
702         * trans-intrinsic.c: Fix a comment typo.
703
704 2004-10-03  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
705
706         * simplify.c (range_check): Remove blank line at beginning of function.
707         (gfc_simplify_dint): Same at end of function.
708         (gfc_simplify_exponent, gfc_simplify_fraction): Simplify calculations.
709         (gfc_simplify_bound): Fix indentation.
710         (gfc_simplify_log10): Simplify calculation.
711         (gfc_simplify_min, gfc_simplify_max): Remove blank line at beginning
712         of function.
713         (gfc_simplify_nearest): Same at end of function.
714         (gfc_simplify_nint, gfc_simplify_idnint): Same at beginning of
715         function.
716         (gfc_simplify_rrspacing, gfc_simplify_set_exponent,
717         gfc_simplify_spacing): Simplify calulations.
718
719 2004-10-03  Feng Wang  <fengwang@nudt.edu.cn>
720
721         * trans-intrinsic.c: Fix comments on spacing and rrspacing
722         (gfc_conv_intrinsic_rrspacing): Add fold on constant trees.
723
724 2004-10-01  Jan Hubicka  <jh@suse.cz>
725
726         * f95-lang.c (gfc_expand_function): Update call of
727         tree_rest_of_compilation.
728         * trans-decl.c (gfc_generate_constructors): Likewise.
729
730 2004-09-26  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
731
732         * trans-intrinsic.c: Comment fixes.
733
734 2004-09-25  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
735
736         * decl.c (add_init_expr_to_sym, variable_decl): Comment fixes.
737
738 2004-09-24  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
739
740         * trans-types.c (gfc_return_by_reference): Remove superfluous
741         assertion.
742
743         * intrinsic.h (gfc_resolve_getcwd): Update prototype.
744         * iresolve.c (gfc_resolve_getcwd): Add second argument to function.
745
746         PR fortran/17615
747         * trans-expr.c (gfc_trans_arrayfunc_assign): Look at resolved
748         function to determine return type.
749         
750 2004-09-20  Jan Hubicka  <jh@suse.cz>
751
752         * trans-decl.c (build_entry_thunks): Finalize the function; do not lower
753         tree.
754         (gfc_generate_function_code): Likewise.
755
756 2004-09-20  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
757
758         PR fortran/15957
759         * simplify.c (gfc_simplify_reshape): Set shape of return value
760         correctly.
761
762 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
763             Zack Weinberg  <zack@codesourcery.com>
764
765         * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class
766         enumeration constants.
767
768 2004-09-17  Paul Brook  <paul@codesourcery.com>
769
770         * gfortran.h (struct gfc_linebuf): Don't use C99 empty arrays.
771         (gfc_linebuf_header_size): Define.
772         * scanner.c (load_file): Use it.
773
774 2004-09-16  Kazu Hirata  <kazu@cs.umass.edu>
775
776         * array.c, data.c, decl.c, dependency.c, error.c, f95-lang.c,
777         interface.c, intrinsic.c, io.c, misc.c, module.c, parse.h,
778         resolve.c, scanner.c, trans-array.c, trans-array.h,
779         trans-common.c, trans-const.h, trans-decl.c, trans-expr.c,
780         trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
781         trans.h: Fix comment typos.  Follow spelling conventions.
782
783 2004-09-16  Victor Leikehman  <lei@il.ibm.com>
784
785         PR/15364
786         * trans-io.c (transfer_array_component): New function.
787         (transfer_expr): For array fields, call transfer_array_component.
788
789 2004-09-16  Kazu Hirata  <kazu@cs.umass.edu>
790
791         * gfortran.texi: Fix a typo.
792
793 2004-09-15  Aaron W. LaFramboise <aaronavay62@aaronwl.com>
794
795         * parse.c (eof_buf): Rename eof to eof_buf.
796         (unexpected_eof): Same.
797         (gfc_parse_file): Same.
798
799 2004-09-15  Steven G. Kargl  <kargls@comcast.net>
800
801         * check.c (gfc_check_getcwd_sub): New function.
802         * gfortran.h (GFC_ISYM_GETCWD): New symbol.
803         * intrinsic.c (add_functions): Add function definition;
804         Use symbol.
805         * intrinsic.c (add_subroutines): Add subroutine definitions.
806         * intrinsic.h: Add prototypes.
807         * iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub):
808         New functions.
809         * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol.
810
811 2004-09-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
812
813         PR fortran/16485
814         * module.c (write_symbol): Don't fill in module name here.
815         (write_symbol0): Fill in here instead.
816
817 2004-09-14  Kazu Hirata  <kazu@cs.umass.edu>
818
819         * data.c, decl.c, f95-lang.c, gfortran.h, match.c,
820         trans-array.c, trans-common.c, trans-expr.c,
821         trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.h: Fix
822         comment typos.  Follow spelling conventions.
823
824 2004-09-09  Paul Brook  <paul@codesourcery.com>
825
826         * scanner.c (get_file): Add ATTRIBUTE_UNUSED.
827
828 2004-09-08  Paul Brook  <paul@codesourcery.com>
829
830         * array.c: Don't include assert.h.
831         * data.c: Don't include assert.h.  Replace assert and abort with
832         gcc_assert and gcc_unreachable.
833         * dependency.c: Ditto.
834         * f95-lang.c: Ditto.
835         * iresolve.c: Ditto.
836         * resolve.c: Ditto.
837         * simplify.c: Ditto.
838         * symbol.c: Ditto.
839         * trans-array.c: Ditto.
840         * trans-common.c: Ditto.
841         * trans-const.c: Ditto.
842         * trans-decl.c: Ditto.
843         * trans-expr.c: Ditto.
844         * trans-intrinsic.c: Ditto.
845         * trans-io.c: Ditto.
846         * trans-stmt.c: Ditto.
847         * trans-types.c: Ditto.
848         * trans.c: Ditto.
849
850 2004-09-07  Per Bothner  <per@bothner.com>
851         Paul Brook  <paul@codesourcery.com>
852
853         * error.c (show_locus): Handle mapped locations.
854         * f95-lang.c (gfc_be_parse_file): Initialize mapped locations.
855         * gfortran.h: Include input.h.
856         (struct gfc_linebuf): Use source_location.
857         * scanner.c (get_file): Initialize linemap.
858         (preprocessor_line): Pass extra argument to get_file.
859         (load_file): Ditto.  Setup linemap.
860         (gfc_new_file): Handle mapped locations.
861         * trans-common.c (build_field, build_equiv_decl, build_common_decl):
862         Set decl source locations.
863         (gfc_trans_common): Set blank common block location.
864         * trans-decl.c (gfc_set_decl_location): New function.
865         (gfc_get_label_decl, gfc_get_symbol_decl): Use it.
866         (trans_function_start): Move call to gfc_set_backend_locus..
867         (build_function_decl): ... to here.
868         (build_entry_thunks): Set and restore the backend locus.
869         (gfc_generate_constructors): Remove excess arguments to
870         init_function_start.
871         (gfc_generate_block_data): Add comments.  Set the decl locus.
872         * trans-io.c (set_error_locus): Handle mapped locations.
873         * trans.c (gfc_get_backend_locus, gfc_get_backend_locus): Ditto.
874         (gfc_trans_code): Use SET_EXPR_LOCATION.
875         (gfc_generate_code): Override the location of the new symbol.
876         * trans.h (gfc_set_decl_location): Add prototype.
877
878 2004-08-31  Paul Brook  <paul@codesourcery.com>
879
880         * trans-types.c (gfc_type_for_mode): Return NULL for unknown modes.
881
882 2004-09-01  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
883
884         PR fortran/15327
885         * trans-intrinsic.c (gfc_conv_intrinsic_merge): Do the right thing for
886         strings.
887
888 2004-09-01  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
889
890         PR fortran/16400
891         PR fortran/16404
892         (port from g95)
893         * resolve.c (resolve_transfer): New function.
894         (resolve_code): Call resolve_transfer in case of EXEC_TRANSFER.
895
896 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
897
898         PR fortran/16579
899         * trans-types.c (gfc_init_types): Make gfc_character1_type_node an
900         unsigned char.
901
902 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
903
904         * CONTRIB, NEWS, README, TODO: Remove obsolete files.
905
906 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
907
908         PR fortran/17244
909         * trans-types.c (gfc_return_by_reference): Remove TODO error,
910         add comment pointing out possible issue WRT compatibility with g77.
911
912 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
913
914         * trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace
915         all occurences of 'gfc_strlen_type_node' by
916         'gfc_charlen_type_node'.
917         * trans-types.h: Same. Also update comment accordingly.
918
919 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
920
921         * primary.c: Update copyright boilerplate to say GCC.
922         * f95-lang.c: Change initial comment to say gfortran.
923
924 2004-08-31  Paul Brook  <paul@codesourcery.com>
925
926         * trans-types.h: Add comments.
927         (intmax_type_node, string_type_node, const_string_type_node): Remove.
928
929 2004-08-30  Richard Henderson  <rth@redhat.com>
930
931         * Make-lang.in (fortran/f95-lang.o): Update dependencies.
932         (fortran/trans-decl.o, fortran/trans-types.o): Likewise.
933         * gfortran.h (gfc_integer_info): Add c_char, c_short, c_int,
934         c_long, c_long_long.
935         (gfc_logical_info): Add c_bool.
936         (gfc_real_info): Add mode_precision, c_float, c_double, c_long_double.
937         * trans-array.c (gfc_array_allocate): Use TYPE_PRECISION
938         rather than gfc_int[48]_type_node for allocate choice.
939         * trans-decl.c (gfc_build_intrinsic_function_decls): Cache
940         local copies of some kind type nodes.
941         (gfc_build_builtin_function_decls): Likewise.
942         * trans-expr.c (gfc_conv_power_op): Likewise.
943         * trans-intrinsic.c (gfc_conv_intrinsic_index,
944         gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify,
945         gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Likewise.
946         * trans-stmt.c (gfc_trans_pause, gfc_trans_stop,
947         gfc_trans_character_select, gfc_trans_allocate): Likewise.
948         * trans-io.c (gfc_pint4_type_node): Move into ...
949         (gfc_build_io_library_fndecls): ... here.  Cache local copies of
950         some kind type nodes.
951         * trans-types.c (gfc_type_nodes): Remove.
952         (gfc_character1_type_node, gfc_strlen_type_node): New.
953         (gfc_integer_types, gfc_logical_types): New.
954         (gfc_real_types, gfc_complex_types): New.
955         (gfc_init_kinds): Fill in real mode_precision.
956         (gfc_build_int_type, gfc_build_real_type): New.
957         (gfc_build_complex_type, gfc_build_logical_type): New.
958         (c_size_t_size): New.
959         (gfc_init_types): Loop over kinds.
960         (gfc_get_int_type, gfc_get_real_type): Use gfc_validate_kind.
961         (gfc_get_complex_type, gfc_get_logical_type): Likewise.
962         (gfc_get_character_type_len): Likewise.
963         (gfc_type_for_size): Loop over kinds; use a reduced set of
964         unsigned type nodes.
965         (gfc_type_for_mode): Loop over kinds.
966         (gfc_signed_or_unsigned_type): Use gfc_type_for_size.
967         (gfc_unsigned_type, gfc_signed_type): Use gfc_signed_or_unsigned_type.
968         * trans-types.h (F95_INT1_TYPE, F95_INT2_TYPE, F95_INT4_TYPE,
969         F95_INT8_TYPE, F95_INT16_TYPE, F95_REAL4_TYPE, F95_REAL8_TYPE,
970         F95_REAl16_TYPE, F95_COMPLEX4_TYPE, F95_COMPLEX8_TYPE,
971         F95_COMPLEX16_TYPE, F95_LOGICAL1_TYPE, F95_LOGICAL2_TYPE,
972         F95_LOGICAL4_TYPE, F95_LOGICAL8_TYPE, F95_LOGICAL16_TYPE,
973         F95_CHARACTER1_TYPE, NUM_F95_TYPES, gfc_type_nodes,
974         gfc_int1_type_node, gfc_int2_type_node, gfc_int4_type_node,
975         gfc_int8_type_node, gfc_int16_type_node, gfc_real4_type_node,
976         gfc_real8_type_node, gfc_real16_type_node, gfc_complex4_type_node,
977         gfc_complex8_type_node, gfc_complex16_type_node,
978         gfc_logical1_type_node, gfc_logical2_type_node,
979         gfc_logical4_type_node, gfc_logical8_type_node,
980         gfc_logical16_type_node, gfc_strlen_kind): Remove.
981         (gfc_character1_type_node): Turn in to a variable.
982         (gfc_strlen_type_node): Likewise.
983
984 2004-08-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
985
986         * gfortran.h (gfc_namespace): Add new field is_block_data.
987         * parse.c (accept_statement): Remove special handling for BLOCK DATA.
988         (parse_block_data): Record BLOCK DATA name, set is_block_data field.
989         * trans.c (gfc_generate_code): Handle BLOCK DATA units.
990         * trans.h (gfc_generate_block_data): Add prototype.
991         * trans-decl.c (gfc_generate_block_data): New function.
992
993 2004-08-29  Richard Henderson  <rth@redhat.com>
994
995         * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_export.
996         * trans-types.c (gfc_init_kinds): Reject integer kinds larger
997         than two HOST_WIDE_INT.
998
999 2004-08-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1000
1001         PR fortran/13910
1002         * decl.c (free_variable, free_value, gfc_free_data, var_list,
1003         var_element, top_var_list, match_data_constant, top_val_list,
1004         gfc_match_data): Move here from match.c.
1005         (match_old_style_init): New function.
1006         (variable_decl): Match old-style initialization.
1007         * expr.c (gfc_get_variable_expr): New function.
1008         * gfortran.h (gfc_get_variable_expr): Add prototype.
1009         * gfortran.texi: Start documentation for supported extensions.
1010         * match.c: Remove the functions moved to decl.c.
1011         * match.h (gfc_match_data): Move prototype to under decl.c.
1012         * symbol.c (gfc_find_sym_tree, gfc_find_symbol): Add/correct
1013         comments.
1014
1015 2004-08-29  Steven G. Kargl  <kargls@comcast.net>
1016         Paul Brook  <paul@codesourcery.com>
1017
1018         * check.c (gfc_check_besn, gfc_check_g77_math1): New functions.
1019         * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Define.
1020         (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
1021         (build_builtin_fntypes): New function.
1022         (gfc_init_builtin_functions): Use it.
1023         * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_{J,Y}{0,1,N}
1024         and GFC_ISYM_ERF{,C}.
1025         (gfc_c_int_kind): Declare.
1026         * intrinsic.c (add_functions): Add [d]bes* and [d]erf*.
1027         * intrinsic.h (gfc_check_besn, gfc_check_g77_math1, gfc_resolve_besn,
1028         gfc_resolve_g77_math1): Add prototypes.
1029         * resolve.c (gfc_resolve_besn, gfc_resolve_g77_math1): New functions.
1030         * mathbuiltins.def: Add comment.  Change third argument.  Use
1031         DEFINE_MATH_BUILTIN_C.  Add bessel and error functions.
1032         * trans-intrinsic.c (BUILT_IN_FUNCTION): Define.
1033         (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
1034         * trans-types.c (gfc_c_int_kind): Declare.
1035         (gfc_init_kinds): Set it.
1036
1037 2004-08-29  Steven G. Kargl  <kargls@comcast.net>
1038         Paul Brook  <paul@codesourcery.com>
1039
1040         * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
1041         (gfc_check_f, gfc_simplify_f): Add f0.
1042         * intrinsic.c (do_check): Call f0.  Flatten.
1043         (add_sym_0): Fix prototype.  Set f0.
1044         (add_functions): Add getgid, getgid and getuid.
1045         (resolve_intrinsic): Remove obsolete comment.
1046         (do_simplify): Call f0.
1047         * intrinsic.h (gfc_resolve_getgid, gfc_resolve_getpid,
1048         gfc_resolve_getuid): Add prototypes.
1049         * iresolve.c (gfc_resolve_getgid, gfc_resolve_getpid,
1050         gfc_resolve_getuid): New functions.
1051         * trans-intrinsic.c (gfc_conv_intrinsic_function): Handle
1052         GFC_ISYM_GET?ID.
1053
1054 2004-08-28  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1055
1056         * error.c (gfc_error_init_1): Remove blank line in front of
1057         function body. Add missing blank.
1058         (gfc_buffer_error, error_char, error_string): Remove blank line in
1059         front of function body.
1060         (show_locus): Add comma in comment.
1061         (gfc_clear_warning, gfc_warning_check, gfc_clear_error,
1062         gfc_push_error, gfc_pop_error): Remove blank line in front of
1063         function body.
1064         (gfc_get_errors): Typo fix in comment in front of function. Remove
1065         blank line in front of function body.
1066
1067 2004-08-27  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1068
1069         * gfortran.h (gfc_default_*_kind): Remove prototypes, add extern
1070         variable declaration of same name.
1071         * arith.c, check.c, decl.c, dump_parse_tree.c, expr.c,
1072         intrinsic.c, io.c, iresolve.c, match.c, options.c, primary.c,
1073         resolve.c, simplify.c, symbol.c, trans-const.c, trans-io.c:
1074         Replace all calls to gfc_default_*_kind with variable accesses.
1075         * trans-types.c: Same as above.
1076         (gfc_default_*_kind_1): Rename to gfc_default_*_kind, remove
1077         static qualifier. Replace all occurences.
1078         (gfc_default_*_kind): Remove functions.
1079
1080 2004-08-26  Richard Henderson  <rth@redhat.com>
1081
1082         * arith.c: Include system.h, not real system headers.
1083         (MPZ_NULL, MPF_NULL, DEF_GFC_INTEGER_KIND, DEF_GFC_LOGICAL_KIND,
1084         DEF_GFC_REAL_KIND, GFC_SP_KIND, GFC_SP_PREC, GFC_SP_EMIN, GFC_SP_EMAX,
1085         GFC_DP_KIND, GFC_DP_PREC, GFC_DP_EMIN, GFC_DP_EMAX, GFC_QP_KIND,
1086         GFC_QP_PREC, GFC_QP_EMIN, GFC_QP_EMAX): Remove.
1087         (gfc_integer_kinds, gfc_logical_kinds, gfc_real_kinds,
1088         gfc_index_integer_kind, gfc_default_integer_kind,
1089         gfc_default_real_kind,gfc_default_double_kind,
1090         gfc_default_character_kind, gfc_default_logical_kind,
1091         gfc_default_complex_kind, validate_integer, validate_real,
1092         validate_logical, validate_character,
1093         gfc_validate_kind): Move to trans-types.c.
1094         (gfc_set_model_kind): Use gfc_validate_kind.
1095         (gfc_set_model): Just copy the current precision to default.
1096         (gfc_arith_init_1): Use mpfr precision 128 for integer setup.
1097         * f95-lang.c (gfc_init_decl_processing): Invoke gfc_init_kinds.
1098         * gfortran.h: Update file commentary.
1099         * trans-types.c (MAX_INT_KINDS, MAX_REAL_KINDS): New.
1100         (gfc_default_integer_kind_1, gfc_default_real_kind_1,
1101         gfc_default_double_kind_1, gfc_default_character_kind_1,
1102         gfc_default_logical_kind_1, gfc_default_complex_kind_1): New.
1103         (gfc_init_kinds): New.
1104         (gfc_init_types): Don't set gfc_index_integer_kind here.
1105         * trans-types.h (gfc_init_kinds): Declare.
1106         * doc/invoke.texi: Clarify DOUBLE PRECISION behaviour wrt -r8.
1107
1108 2004-08-26  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1109
1110         * check.c (gfc_check_atan2): New function.
1111         * intrinsic.c (add_functions): Use gfc_check_atan2 for ATAN2
1112         * intrinsic.h (gfc_check_atan2): Add prototype.
1113
1114 2004-08-25  Richard Henderson  <rth@redhat.com>
1115
1116         * arith.c (gfc_validate_kind): Add may_fail argument; abort if
1117         false and we don't validate the kind.
1118         (gfc_check_integer_range, gfc_check_real_range): Update to match.
1119         * check.c (kind_check): Likewise.
1120         * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Likewise.
1121         (match_char_spec, match_logical_spec): Likewise.
1122         * gfortran.h (gfc_validate_kind): Likewise.
1123         * options.c (gfc_handle_option): Likewise.
1124         * primary.c (match_integer_constant, match_real_constant,
1125         match_string_constant, match_logical_constant,
1126         match_const_complex_part): Likewise.
1127         * simplify.c (get_kind, gfc_simplify_bit_size, gfc_simplify_digits,
1128         gfc_simplify_epsilon, gfc_simplify_huge, gfc_simplify_ibclr,
1129         gfc_simplify_ibset, gfc_simplify_ishft, gfc_simplify_ishftc,
1130         gfc_simplify_maxexponent, gfc_simplify_minexponent,
1131         gfc_simplify_nearest, gfc_simplify_not, gfc_simplify_precision,
1132         gfc_simplify_radix, gfc_simplify_range, gfc_simplify_rrspacing,
1133         gfc_simplify_scale, gfc_simplify_spacing, gfc_simplify_tan,
1134         gfc_simplify_tiny): Likewise.
1135         * trans-intrinsic.c (gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod,
1136         gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
1137         prepare_arg_info): Likewise.
1138
1139 2004-08-25  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1140
1141         * expr.c (gfc_check_assign): Add comment. Add new warning.
1142         * trans-expr.c (gfc_conv_function_call): Correctly dereference
1143         result of pointer valued function when not in pointer assignment.
1144
1145 2004-08-25  Paul Brook  <paul@codesourcery.com>
1146
1147         * config-lang.in: Remove dead commented line.
1148         * module.c: Replace g95 with gfortran in comment.
1149
1150 2004-08-25  Paul Brook  <paul@codesourcery.com>
1151
1152         PR fortran/17190
1153         * arith.c (gfc_mpfr_to_mpz): Workaround mpfr bug.
1154
1155 2004-08-25  Paul Brook  <paul@codesourcery.com>
1156
1157         PR fortran/17144
1158         * trans-array.c (gfc_trans_allocate_temp_array): Remove
1159         string_length argument.
1160         (gfc_trans_array_ctor_element): New function.
1161         (gfc_trans_array_constructor_subarray): Use it.
1162         (gfc_trans_array_constructor_value): Ditto.  Handle constant
1163         character arrays.
1164         (get_array_ctor_var_strlen, get_array_ctor_strlen): New functions.
1165         (gfc_trans_array_constructor): Use them.
1166         (gfc_add_loop_ss_code): Update to new gfc_ss layout.
1167         (gfc_conv_ss_descriptor): Remember section string length.
1168         (gfc_conv_scalarized_array_ref): Ditto.  Remove dead code.
1169         (gfc_conv_resolve_dependencies): Update to new gfc_ss layout.
1170         (gfc_conv_expr_descriptor): Ditto.
1171         (gfc_conv_loop_setup): Ditto.  Spelling fixes.
1172         * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
1173         * trans-const.c (gfc_conv_constant):  Update to new gfc_ss layout.
1174         * trans-expr.c (gfc_conv_component_ref): Turn error into ICE.
1175         (gfc_conv_variable): Set string_length from section.
1176         (gfc_conv_function_call): Remove extra argument.
1177         (gfc_conv_expr, gfc_conv_expr_reference): Update to new gfc_ss layout.
1178         * trans-types.c (gfc_get_character_type_len): New function.
1179         (gfc_get_character_type): Use it.
1180         (gfc_get_dtype): Return zero for internal types.
1181         * trans-types.h (gfc_get_character_type_len): Add prototype.
1182         * trans.h (struct gfc_ss): Move string_length out of union.
1183
1184 2004-08-25  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1185
1186         * trans.h (build2_v, build3_v): New macros.
1187         (build_v): Remove.
1188         * f95-lang.c (gfc_truthvalue_conversion): Use build2 instead of
1189         build.
1190         * trans-array.c (gfc_conv_descriptor_data,
1191         gfc_conv_descriptor_offset, gfc_conv_descriptor_dimension,
1192         gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
1193         gfc_conv_descriptor_ubound, gfc_trans_allocate_array_storage,
1194         gfc_trans_allocate_temp_array,
1195         gfc_trans_array_constructor_subarray,
1196         gfc_trans_array_constructor_value, gfc_conv_array_index_ref,
1197         gfc_trans_array_bound_check, gfc_conv_array_index_offset,
1198         gfc_conv_scalarized_array_ref, gfc_conv_array_ref,
1199         gfc_conv_array_ref, gfc_trans_preloop_setup,
1200         gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
1201         gfc_conv_loop_setup, gfc_array_init_size,
1202         gfc_conv_array_initializer, gfc_trans_array_bounds,
1203         gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
1204         gfc_conv_expr_descriptor, gfc_conv_array_parameter,
1205         gfc_trans_deferred_array): Use buildN and buildN_v macros instead
1206         of build and build_v as appropriate.
1207         * trans-common.c (create_common): Same.
1208         * trans-decl.c (gfc_trans_auto_character_variable,
1209         gfc_trans_entry_master_switch, gfc_generate_function_code): Same.
1210         * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
1211         gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
1212         gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
1213         gfc_conv_expr_op, gfc_conv_function_call,
1214         gfc_trans_structure_assign): Same.
1215         * trans-intrinsic.c (build_fixbound_expr, build_round_expr,
1216         gfc_conv_intrinsic_aint, gfc_conv_intrinsic_bound,
1217         gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
1218         gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
1219         gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_minmax,
1220         gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
1221         gfc_conv_intrinsic_arith, gfc_conv_intrinsic_minmaxloc,
1222         gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
1223         gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_singlebitop,
1224         gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
1225         gfc_conv_intrinsic_merge, gfc_conv_intrinsic_strcmp,
1226         gfc_conv_allocated, gfc_conv_associated, prepare_arg_info,
1227         gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
1228         gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat,
1229         gfc_conv_intrinsic_iargc): Same.
1230         * trans-io.c (set_parameter_value, set_parameter_ref, set_string,
1231         set_flag, add_case, io_result, transfer_namelist_element,
1232         transfer_expr): Same.
1233         * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_if_1,
1234         gfc_trans_arithmetic_if, gfc_trans_do, gfc_trans_do_while,
1235         gfc_trans_integer_select, gfc_trans_logical_select,
1236         gfc_trans_character_select, gfc_trans_forall_loop,
1237         gfc_trans_nested_forall_loop, gfc_do_allocate,
1238         generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
1239         compute_inner_temp_size, compute_overall_iter_number,
1240         allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
1241         gfc_trans_forall_1, gfc_evaluate_where_mask,
1242         gfc_trans_where_assign, gfc_trans_allocate): Same.
1243         * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Same.
1244         * trans.c (gfc_add_modify_expr, gfc_finish_block,
1245         gfc_build_array_ref, gfc_build_function_call,
1246         gfc_trans_runtime_check): Same.
1247
1248 2004-08-25  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1249
1250         * trans-const.c (gfc_conv_mpz_to_tree): Change call to
1251         build_int_cst to build_int_cst_wide in accordance to Nathan's
1252         previous patch.
1253
1254 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
1255
1256         * trans-array.c (gfc_trans_array_constructor_value): Adjust
1257         build_int_cst calls.
1258         * trans-const.c (gfc_build_string_const, gfc_init_constants,
1259         gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise.
1260         * trans-decl.c (gfc_get_symbol_decl, build_entry_thunks,
1261         gfc_trans_entry_master_switch): Likewise.
1262         * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
1263         gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
1264         * trans-io.c (add_case, set_error_locus,
1265         transfer_namelist_element, transfer_expr): Likewise.
1266         * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
1267         gfc_trans_stop, gfc_trans_character_select): Likewise.
1268         * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
1269         * trans.c (gfc_trans_runtime_check): Likewise.
1270
1271 2004-08-24  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1272
1273         * trans-decl.c, trans-types.c: Add and remove blank lines as
1274         required.
1275
1276 2004-08-24  Richard Henderson  <rth@redhat.com>
1277
1278         * trans-const.c (gfc_conv_mpz_to_tree): Fix 64-bit shift warning.
1279
1280 2004-08-24  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1281
1282         * resolve.c (merge_argument_lists): Revert unintentionally
1283         committed change.
1284
1285 2004-08-24  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1286
1287         * trans-decl.c (build_function_decl): Fix spelling in comment.
1288         (build_entry_thunks): Remove code with no function.
1289         (gfc_build_intrinsic_function_decls): Remove empty line.
1290
1291         * resolve.c (resolve_entries): Fix a bunch of comment typos.
1292
1293 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
1294
1295         * f95-lang.c (gfc_init_decl_processing): Adjust
1296         build_common_tree_nodes call.
1297
1298 2004-08-24  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1299
1300         * trans-types.c: Spelling and formatting fixes.
1301
1302 2004-08-23  Richard Henderson  <rth@redhat.com>
1303
1304         * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_getlimbn instead
1305         of going through an intermediate string.  Fix 32/64 int/long bug.
1306
1307 2004-08-23  Eric Christopher  <echristo@redhat.com>
1308
1309         * trans-types.c (gfc_type_for_mode): Remove VECTOR_TYPE_SUPPORTED_P
1310         usage. Use build_vector_type_for_mode for vector types.
1311
1312 2004-08-22  Richard Henderson  <rth@redhat.com>
1313
1314         PR 13465
1315         * data.c (find_con_by_offset): Search ordered list; handle
1316         elements with repeat counts.
1317         (gfc_assign_data_value_range): New.
1318         * gfortran.h (struct gfc_data_value): Make repeat unsigned.
1319         (gfc_assign_data_value_range): Declare.
1320         * match.c (top_val_list): Extract repeat count into a temporary.
1321         * resolve.c (values): Make left unsigned.
1322         (next_data_value): Don't decrement left.
1323         (check_data_variable): Use gfc_assign_data_value_range.
1324
1325 2004-08-22  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1326
1327         * trans-const.c, trans-decl.c, trans-expr.c: Spelling fixes.
1328
1329 2004-08-22  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1330
1331         * check.c (gfc_check_reduction): Rename to ...
1332         (check_reduction): ... this. Make static. Don't check type of
1333         first argument.
1334         (gfc_check_minval_maxval, gfc_check_prodcut_sum): New functions.
1335         * intrinsic.c (add_functions): Change MAXVAL, MINVAL, PRODUCT and
1336         SUM to use new check functions.
1337         (check_specific): Change logic to call new functions.
1338         * intrinsic.h (gfc_check_minval_maxval, gfc_check_product_sum):
1339         Add prototypes.
1340         (gfc_check_reduction): Remove prototype.
1341
1342 2004-08-20  Paul Brook  <paul@codesourcery.com>
1343         Canqun Yang  <canqun@nudt.edu.cn>
1344
1345         PR fortran/17077
1346         * trans-array.c (gfc_conv_array_parameter): Pass correct pointer
1347         for automatic arrays.
1348         * trans-types.c (gfc_get_nodesc_array_type): Add comment.
1349
1350 2004-08-19  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1351         (Port from g95)
1352
1353         PR fortran/17074
1354         * match.c (match_simple_forall, match_simple_where): Forward-declare.
1355         (gfc_match_if): Order statement list alphabetically, add WHERE and
1356         FORALL, remove double PAUSE.
1357         (gfc_match_simple_where, match_forall_header,
1358         gfc_match_simple_forall): New functions.
1359         (gfc_match_forall): Use match_forall_header.
1360
1361 2004-08-19  Paul Brook  <paul@codesourcery.com>
1362
1363         PR fortran/17091
1364         * gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0.
1365         * symbol.c (gfc_clear_attr): Use memset.
1366
1367 2004-08-19  Paul Brook  <paul@codesourcery.com>
1368
1369         PR fortran/14976
1370         PR fortran/16228
1371         * data.c (assign_substring_data_value): Remove.
1372         (create_character_intializer): New function.
1373         (gfc_assign_data_value): Track the typespec for the current
1374         subobject.  Use create_character_intializer.
1375
1376 2004-08-19  Erik Schnetter  <schnetter@aei.mpg.de>
1377
1378         PR fortran/16946
1379         * check.c (gfc_check_reduction): New function.
1380         (gfc_check_minval_maxval): Removed.
1381         (gfc_check_product): Removed.
1382         (gfc_check_sum): Removed.
1383         * intrinsic.h: Add/remove declarations for these.
1384         * gfortran.h: Add field f3red to union gfc_check_f.
1385         * intrinsic.c (add_sym_3red): New function.
1386         (add_functions): Register maxval, minval, product, and sum intrinsics
1387         through add_sym_3red.
1388         (check_specific): Handle f3red union field.
1389         * iresolve.c: Whitespace change.
1390
1391 2004-08-18  Paul Brook  <paul@codesourcery.com>
1392
1393         * trans-types.c (gfc_sym_type): Use pointer types for optional args.
1394
1395 2004-08-18  Victor Leikehman  <lei@il.ibm.com>
1396
1397         PR fortran/13278
1398         * trans-io.c (transfer_namelist_element): New. Recursively handle
1399         derived-type variables.  Pass string lengths.
1400         (build_dt): Code moved to build_namelist, with some
1401         changes and additions.
1402         (gfc_build_io_library_fndecls): Declare the fifth
1403         argument in st_set_nml_var_char -- string_length.
1404
1405 2004-08-17  Paul Brook  <paul@codesourcery.com>
1406         Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1407
1408         PR fortran/13082
1409         * decl.c (get_proc_name): Update mystery comment.
1410         (gfc_match_entry): Check for errors earlier.  Add entry point to list.
1411         * dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes.
1412         * gfortran.h (symbol_attribute): Add entry_master.  Document entry.
1413         (struct gfc_entry_list): Define.
1414         (gfc_get_entry_list): Define.
1415         (struct gfc_namespace): Add refs and entries.
1416         (enum gfc_exec_op): Add EXEC_ENTRY.
1417         (struct gfc_code): Add ext.entry.
1418         * module.c (ab_attribute, attr_bits): Remove AB_ENTRY.
1419         (mio_symbol_attribute): Don't save/reture addr->entry.
1420         (mio_namespace_ref): Refcount namespaces.
1421         * parse.c (accept_statement): Handle ST_ENTRY.
1422         (gfc_fixup_sibling_symbols): Mark symbol as referenced.
1423         (parse_contained): Fixup sibling references to entry points
1424         after parsing the procedure body.
1425         * resolve.c (resolve_contained_fntype): New function.
1426         (merge_argument_lists, resolve_entries): New functions.
1427         (resolve_contained_functions): Use them.
1428         (resolve_code): Handle EXEC_ENTRY.
1429         (gfc_resolve): Call resolve_entries.
1430         * st.c (gfc_free_statement): Handle EXEC_ENTRY.
1431         * symbol.c (gfc_get_namespace): Refcount namespaces.
1432         (gfc_free_namespace): Ditto.
1433         * trans-array.c (gfc_trans_dummy_array_bias): Treat all args as
1434         optional when multiple entry points are present.
1435         * trans-decl.c (gfc_get_symbol_decl): Remove incorrect check.
1436         (gfc_get_extern_function_decl): Add assertion.  Fix coment.
1437         (create_function_arglist, trans_function_start, build_entry_thunks):
1438         New functions.
1439         (gfc_build_function_decl): Rename ...
1440         (build_function_decl): ... to this.
1441         (gfc_create_function_decl): New function.
1442         (gfc_generate_contained_functions): Use it.
1443         (gfc_trans_entry_master_switch): New function.
1444         (gfc_generate_function_code): Use new functions.
1445         * trans-stmt.c (gfc_trans_entry): New function.
1446         * trans-stmt.h (gfc_trans_entry): Add prototype.
1447         * trans-types.c (gfc_get_function_type): Add entry point argument.
1448         * trans.c (gfc_trans_code): Handle EXEC_ENTRY.
1449         (gfc_generate_module_code): Call gfc_create_function_decl.
1450         * trans.h (gfc_build_function_decl): Remove.
1451         (gfc_create_function_decl): Add prototype.
1452
1453 2004-08-15  Andrew Pinski  <apinski@apple.com>
1454
1455         PR fortran/17030
1456         * f95-lang.c (gfc_init_builtin_functions): Initialize the builtins
1457         for cabs{,f} and copysign{,f}.
1458         * trans-decl.c (gfor_fndecl_math_cabsf): Delete.
1459         (gfor_fndecl_math_cabs): Delete.
1460         (gfor_fndecl_math_sign4): Delete.
1461         (gfor_fndecl_math_sign8): Delete.
1462         (gfc_build_intrinsic_function_decls): Remove the
1463         initializing of cabs{,f} and copysign{,f} functions.
1464         * trans-intrinsic.c (gfc_conv_intrinsic_abs): Use the builtins
1465         instead of the functions definitions.
1466         (gfc_conv_intrinsic_sign): Likewise.
1467         * trans.h (gfor_fndecl_math_cabsf): Delete.
1468         (gfor_fndecl_math_cabs): Delete.
1469         (gfor_fndecl_math_sign4): Delete.
1470         (gfor_fndecl_math_sign8): Delete.
1471
1472 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
1473
1474         * trans-array.c (gfc_trans_array_constructor_value): Use
1475         build_int_cst.
1476         * trans-const.c (gfc_build_string_const,
1477         gfc_init_constants, gfc_conv_mpz_to_tree,
1478         gfc_conv_constant_to_tree): Likewise.
1479         * trans-decl.c (gfc_get_symbol_decl): Likewise.
1480         * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
1481         gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
1482         * trans-io.c (add_case, set_error_locus, build_dt,
1483         transfer_expr): Likewise.
1484         * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
1485         gfc_trans_stop, gfc_trans_character_select): Likewise.
1486         * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
1487         * trans.c (gfc_trans_runtime_check): Likewise.
1488
1489 2004-08-14  Paul Brook  <paul@codesourcery.com>
1490
1491         * trans-decl.c (gfc_build_function_decl): Remove dead code.
1492
1493 2004-08-14  Paul Brook  <paul@codesourcery.com>
1494
1495         * trans-arry.c (gfc_trans_auto_array_allocation): Remove unused var.
1496
1497 2004-08-13  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1498
1499         * gfortran.h: Add comments.
1500         * parse.c (parse_contained): Fix comment typo.
1501         * resolve.c (was_declared): Ditto.
1502         * symbol.c: Ditto.
1503
1504 2004-08-11  Paul Brook  <paul@codeourcery.com>
1505
1506         PR fortran/16917
1507         * intrinsic.c (add_functions): Add dfloat as an alias for dble.
1508
1509 2004-08-10  Richard Henderson  <rth@redhat.com>
1510
1511         * f95-lang.c (gfc_init_builtin_functions): Remove
1512          __builtin_stack_alloc, add __builtin_alloca.
1513         * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR.
1514         * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
1515
1516 2004-08-10  Paul Brook  <paul@codesourcery.com>
1517
1518         * trans-io.c (transfer_expr): Handle pointters.
1519
1520 2004-08-10  Paul Brook  <paul@codesourcery.com>
1521
1522         PR fortran/16919
1523         * trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT.
1524         (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta.
1525         (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary):
1526         Handle GFC_SS_COMPONENT.
1527         (gfc_conv_ss_startstride): Ditto.  Set ss->shape.
1528         (gfc_conv_loop_setup): Tweak commends. Remove dead code.
1529         Use ss->shape.
1530         (gfc_conv_array_initializer): Call specific initializer routines.
1531         * trans-expr.c (gfc_trans_structure_assign): New function.
1532         (gfc_trans_subarray_assign): New function.
1533         (gfc_trans_subcomponent_assign): New fucntion
1534         (gfc_conv_structure): Use them.
1535         * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT.
1536         (gfc_ss): Add shape.
1537
1538 2004-08-08  Victor Leikehman  <lei@il.ibm.com>
1539
1540         * simplify.c (gfc_simplify_shape): Bugfix.
1541         * expr.c (gfc_copy_shape_excluding): New function.
1542         * gfortran.h (gfc_get_shape): Bugfix.
1543         (gfc_copy_shape_excluding): Added declaration.
1544         * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
1545         gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound,
1546         gfc_resolve_ubound, gfc_resolve_transpose): Added compile
1547         time resolution of shape.
1548
1549 2004-08-06  Janne Blomqvist  <jblomqvi@cc.hut.fi>
1550
1551         * intrinsic.c (add_subroutines): Add getenv and
1552         get_environment_variable. (add_sym_5s): New function.
1553         * intrinsic.h (gfc_resolve_get_environment_variable): Add
1554         prototype.
1555         * iresolve.c (gfc_resolve_get_environment_variable): New
1556         function.
1557
1558 2004-08-06  Feng Wang  <fengwang@nudt.edu.cn>
1559
1560         * f95-lang.c (gfc_init_builtin_functions): Fix the number of
1561         __builtin_pow[f] arguments.
1562
1563 2004-08-06  Steven G. Kargl  <kargls@comcast.net>
1564
1565         * arith.c: Add #define for model numbers.  Remove global GMP variables.
1566         (natural_logarithm,common_logarithm,exponential,sine,
1567         cosine,arctangent,hypercos,hypersine ): Remove.
1568         (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions.
1569         (arctangent2,gfc_arith_init_1,gfc_arith_done_1
1570         gfc_check_real_range, gfc_constant_result, gfc_range_check,
1571         gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times,
1572         gfc_arith_divide,complex_reciprocal,complex_pow_ui,
1573         gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real,
1574         gfc_convert_complex,gfc_int2real,gfc_int2complex,
1575         gfc_real2int,gfc_real2real,gfc_real2complex,
1576         gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP
1577         to MPFR, use new functions.
1578         * arith.h: Remove extern global variables.
1579         (natural_logarithm,common_logarithm,exponential, sine, cosine,
1580         arctangent,hypercos,hypersine): Remove prototypes.
1581         (arctangent2): Update prototype from GMP to MPFR.
1582         (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes.
1583         * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR.
1584         * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR.
1585         * gfortran.h (GFC_REAL_BITS): Remove.
1586         (arith): Add ARITH_NAN.
1587         Include mpfr.h.  Define GFC_RND_MODE.
1588         Rename GCC_GFORTRAN_H GFC_GFC_H.
1589         (gfc_expr): Convert GMP to MPFR.
1590         * module.c: Add arith.h, correct type in comment.
1591         (mio_gmp_real): Convert GMP to MPFR.
1592         (mio_expr):  Use gfc_set_model_kind().
1593         * primary.c:  Update copyright date with 2004.
1594         (match_real_constant,match_const_complex_part): Convert GMP to MPFR.
1595         * simplify.c: Remove global GMP variables
1596         (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag,
1597         gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint,
1598         gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan,
1599         gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx,
1600         gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh,
1601         gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon,
1602         gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor,
1603         gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int,
1604         gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log,
1605         gfc_simplify_log10,simplify_min_max,gfc_simplify_mod,
1606         gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint,
1607         gfc_simplify_rrspacing,gfc_simplify_scale,
1608         gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin,
1609         gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt,
1610         gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny,
1611         gfc_simplify_init_1,gfc_simplify_done_1):  Convert GMP to MPFR.
1612         Use new functions.
1613         * trans-const.c (gfc_conv_mpfr_to_tree): Rename from
1614         gfc_conv_mpf_to_tree.  Convert it to use MPFR
1615         (gfc_conv_constant_to_tree): Use it.
1616         * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree().
1617         * trans-intrinsic.c: Add arith.h, remove gmp.h
1618         (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR.
1619
1620 2004-08-06  Victor Leikehman  <lei@il.ibm.com>
1621         Paul Brook  <paul@codesourcery.com>
1622
1623         * trans-array.c (gfc_trans_allocate_array_storage,
1624         gfc_trans_allocate_temp_array, gfc_add_loop_ss_code,
1625         gfc_conv_loop_setup): For functions, if the shape of the result
1626         is not known in compile-time, generate an empty array descriptor for
1627         the result and let the callee to allocate the memory.
1628         (gfc_trans_dummy_array_bias): Do nothing for pointers.
1629         (gfc_conv_expr_descriptor): Use function return values directly.
1630         * trans-expr.c (gfc_conv_function_call): Always add byref call
1631         insn to pre chain.
1632         (gfc_trans_pointer_assignment): Add comments.
1633         (gfc_trans_arrayfunc_assign): Don't chain on expression.
1634
1635 2004-08-01  Roger Sayle  <roger@eyesopen.com>
1636
1637         * options.c (gfc_init_options): Don't warn about the use GNU
1638         extensions by default.
1639         (gfc_post_options): Warn about GNU extensions with -pedantic.
1640         (gfc_handle_option): Don't warn about GNU extensions with -std=gnu.
1641
1642 2004-07-30  Richard Henderson  <rth@redhat.com>
1643
1644         * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL
1645         for TREE_CONSTANTs.
1646
1647 2004-07-25  Richard Henderson  <rth@redhat.com>
1648
1649         * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL
1650         and DECL_IGNORED_P on RESULT_DECL.
1651         (gfc_generate_constructors): Likewise.
1652
1653 2004-07-18  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1654
1655         PR fortran/16465
1656         * lang.opt (ffixed-line-length-none, ffixed-line-length-): New
1657         options.
1658         (ffixed-line-length-80, ffixed-line-length-132): Remove.
1659         * options.c (gfc_handle_options): Deal with changed options.
1660         * scanner.c (load_line): Change second arg to 'char **',
1661         allocate if pointing to NULL. Keep track of buffer's length.
1662         Adapt buffer size to overlong lines. Pad lines to full length
1663         in fixed form.
1664         (load_file): Adapt to new interface of load_line.
1665
1666 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
1667
1668         * trans.h (builtin_function): Declare.
1669
1670 2004-07-16  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1671
1672         PR fortran/16404
1673         (parts ported from g95)
1674         * parse.h (gfc_state_data): New field do_variable.
1675         (gfc_check_do_variable): Add prototype.
1676         * parse.c (push_state): Initialize field 'do_variable'.
1677         (gfc_check_do_variable): New function.
1678         (parse_do_block): Remember do iterator variable.
1679         (parse_file): Initialize field 'do_variable'.
1680         * match.c (gfc_match_assignment, gfc_match_do,
1681         gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate):
1682         Add previously missing checks.
1683         (gfc_match_return): Reformat error message.
1684         * io.c (match_out_tag): New function.
1685         (match_open_element, match_close_element,
1686         match_file_element, match_dt_element): Call match_out_tag
1687         instead of match_vtag where appropriate.
1688         (match_io_iterator, match_io_element): Add missing check.
1689         (match_io): Reformat error message.
1690         (match_inquire_element): Call match_out_tag where appropriate.
1691
1692         * parse.c (gfc_check_do_variable): Fix error locus.
1693
1694 2004-07-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1695
1696         PR fortran/15129
1697         * trans-decl.c (gfc_build_function_decl): Create a new chardecl
1698         for every assumed length character dummy argument.
1699
1700         PR fortran/15140
1701         * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion.
1702
1703         PR fortran/13792
1704         * simplify.c (gfc_simplify_bound): Copy the bound expression.
1705
1706 2004-07-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1707
1708         PR fortran/15324
1709         * trans-array.c gfc_trans_g77_array,
1710         gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init
1711         for assumed length characters.
1712         (gfc_conv_expr_descriptor): Set se->string_length if dealing
1713         with a character expression.
1714         (gfc_cvonv_array_parameter): Pass string length when passing
1715         character array according to g77 conventions.
1716
1717 2004-07-12  Paul Brook  <paul@codesourcery.com>
1718
1719         * expr.c (gfc_check_assign_symbol): Handle pointer assignments.
1720         * trans-array.c (gfc_trans_auto_array_allocation): Remove
1721         initialization code.
1722         * trans-common.c (create_common): Use gfc_conv_initializer.
1723         * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer.
1724         * trans-expr.c (gfc_conv_initializer): New function.
1725         (gfc_conv_structure): Use it.
1726         * trans.h (gfc_conv_initializer): Add prototype.
1727
1728 2004-07-11  Paul Brook  <paul@codesourcery.com>
1729
1730         PR fortran/15986
1731         * parse.c (gfc_fixup_sibling_symbols): Also look for untyped
1732         variables.
1733         (parse_contained): Mark contained symbols as referenced.
1734
1735 2004-07-11  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1736
1737         PR fortran/16455
1738         * module.c (gfc_dump_module, gfc_use_module): Print locus
1739         when opening of module file fails.
1740
1741         PR fortran/16404
1742         * io.c (match_io): Flag 'WRITE(...), ...' as extension.
1743
1744         PR fortran/16404
1745         * match.c (gfc_match_program): A program name is obligatory.
1746         (gfc_match_return): RETURN in main program is an extension.
1747         (gfc_match_block_data): A space is required before a block data
1748         name.
1749
1750         PR fortran/16433
1751         * primary.c (match_boz_constant): Call gfc_notify_std only if
1752         we actually have a non-standard boz-literal-constant.
1753
1754         PR fortran/15754
1755         * expr.c (gfc_check_assign): Print ranks if incompatible. Issue
1756         warning if assigning NULL().
1757
1758 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
1759
1760         * f95-lang.c (set_block): Remove.
1761         (gfc_clear_binding_stack): New.
1762         (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
1763         (struct binding_level): Remove block_created_by_back_end.
1764         (clear_binding_level): Likewise.
1765         (poplevel): Don't handle block_created_by_back_end.
1766
1767 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1768
1769         * trans-decl.c (gfc_create_module_variable): Nothing to do if
1770         symbol is in common, because we ...
1771         (gfc_generate_module_vars): Call gfc_trans_common.
1772
1773 2004-07-10  Paul Brook  <paul@codesourcery.com>
1774
1775         * trans-array.c (gfc_build_null_descriptor): New function.
1776         (gfc_trans_static_array_pointer): Use it.
1777         * trans-array.h (gfc_build_null_descriptor): Add prototype.
1778         * trans-expr.c (gfc_conv_structure): Handle array pointers.
1779
1780 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1781
1782         PR fortran/16336
1783         * decl.c (gfc_match_save): Use-associated common block
1784         doesn't collide.
1785         * gfortran.h (gfc_common_head): Add new field 'name'.
1786         Fix typo in comment after #endif.
1787         * match.c (gfc_get_common): Add new argument from_common,
1788         mangle name if flag is set, fill in new field in structure
1789         gfc_common_head.
1790         (match_common): Set new arg in call to gfc_get_common,
1791         use-associated common block doesn't collide.
1792         * match.h (gfc_get_common): Adapt prototype.
1793         * module.c (load_commons): Set new arg in call to
1794         gfc_get_common.
1795         * symbol.c (free_common_tree): New function.
1796         (gfc_free_namespace): Call new function.
1797         * trans-common.c (several functions): Remove argument
1798         'name', use name from gfc_common_head instead.
1799
1800 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1801
1802         * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
1803         and RHS match. Return early if the RHS is NULL().
1804
1805         PR fortran/16336
1806         * match.c (match_common): Fix error reporting for used common.
1807
1808         PR fortran/15969
1809         * trans-expr.c (gfc_conv_structure): Handle initialization
1810         of scalar pointer components.
1811
1812         * parse.c (decode_statement): Fix matching of BLOCK DATA.
1813
1814         * trans-decl.c (generate_local_decl): Remove workaround obsoleted
1815         by fix for PR 15481.
1816
1817 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1818
1819         * trans-common.c: Fix whitespace issues, make variable names
1820         more readable.
1821         (create_common): Additionally, make loop logic more obvious.
1822
1823 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1824         Paul Brook  <paul@codesourcery.com>
1825
1826         PR fortran/13415
1827         * trans-common.c (calculate_length): Remove ...
1828         (get_segment_info): Merge into here.  Save field type.
1829         (build_field): Use saved type.
1830         (create_common, new_condition, new_segment, finish_equivalences):
1831         Use new get_segment_info.
1832         * trans-types.c: Update comment.
1833
1834 2004-07-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1835
1836         PR fortran/14077
1837         * moduele.c (mio_symbol): Don't I/O initial values unless
1838         symbol is a parameter.
1839
1840 2004-07-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1841
1842         PR fortran/13201
1843         * resolve.c (resolve_symbol): Verify that the shape of a
1844         parameter array is not only explicit, but also constant.
1845         * array.c (gfc_is_compile_time_shape): New function.
1846         * gfortran.h (gfc_is_compile_time_shape): Add prototype.
1847
1848 2004-07-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1849
1850         PR fortran/15481
1851         PR fortran/13372
1852         PR fortran/13575
1853         PR fortran/15978
1854         * module.c (write_symbol, write_symtree): Remove workaround.
1855         * primary.c (match_actual_arglist): Enhance comment.
1856         (gfc_match_rvalue): Handle function call with first argument
1857         a keyword argument correctly.
1858         * resolve.c (resolve_symbol): Change call to
1859         gfc_set_default_type to issue error if no implicit type
1860         can be found.
1861         * trans-decl.c (gfc_create_module_variable): Remove workaround.
1862
1863 2004-07-08  Paul Brook  <paul@codesourcery.com>
1864
1865         * intrinsic.c (add_sym_4s): New function.
1866         (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
1867
1868 2004-07-04  Janne Blomqvist  <jblomqvi@cc.hut.fi>
1869         Paul Brook  <paul@codesourcery.com>
1870
1871         PR fortran/15280
1872         PR fortran/15665
1873         * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
1874         GFC_ISYM_COMMAND_ARGUMENT_COUNT.
1875         * intrinsic.c (add_functions):  Identify iargc.  Add
1876         command_argument_count.
1877         (add_subroutines): Resolve getarg.  Add get_command and
1878         get_command_argument.
1879         * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
1880         gfc_resolve_get_command_argument): Add prototypes.
1881         * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
1882         gfc_resolve_get_command_argument): New functions.
1883         * trans-decl.c (gfor_fndecl_iargc): New variable.
1884         (gfc_build_intrinsic_function_decls): Set it.
1885         * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
1886         (gfc_conv_intrinsic_function): Use it.
1887         * trans.h (gfor_fndecl_iargc): Declare.
1888
1889 2004-07-04  Matthias Klose  <doko@debian.org>
1890
1891         * Make-lang.in: Generate and install gfortran man page.
1892         * invoke.texi: Remove extra '@c man end'.
1893
1894 2004-07-04  Richard Henderson  <rth@redhat.com>
1895
1896         * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
1897
1898 2004-07-04  Paul Brook  <paul@codesourcery.com>
1899
1900         * decl.c (gfc_match_implicit_range): Don't use typespec.
1901         (gfc_match_implicit): Handle character selectors.
1902         * gfortran.h (gfc_set_implicit): Remove prototype.
1903         (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
1904         * parse.c (accept_statement): Don't call gfc_set_implicit.
1905         * symbol.c (new_ts): Remove.
1906         (gfc_set_implicit_none): Use same loop bounds as other functions.
1907         (gfc_set_implicit): Remove.
1908         (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
1909         (gfc_merge_new_implicit): Combine with gfc_set_implicit.
1910
1911 2004-06-30  Richard Henderson  <rth@redhat.com>
1912
1913         * match.c (var_element): Remove unused variable.
1914
1915         * trans-decl.c (gfc_generate_function_code): Don't set
1916         x_whole_function_mode_p.
1917         (gfc_generate_constructors): Likewise.
1918
1919 2004-06-30  Richard Henderson  <rth@redhat.com>
1920
1921         * trans-decl.c (gfc_generate_function_code): Don't set
1922         immediate_size_expand.
1923         (gfc_generate_constructors): Likewise.
1924
1925 2004-06-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1926
1927         PR fortran/16161
1928         * decl.c (gfc_match_type_spec): Rename second argument to
1929         'implicit_flag', reverse meaning. Don't match_char_spec if
1930         'implicit_flag' is set. Rename to ...
1931         (match_type_spec): ... this.
1932         (gfc_match_implicit_none, match_implicit_range): Move here
1933         from match.c.
1934         (gfc_match_implicit): Move here from match.c, try to
1935         match_char_len if match_implicit_range doesn't succeed for
1936         CHARACTER implicits. Call renamed fucntion match_type_spec.
1937         (gfc_match_data_decl, match_prefix): Call renamed function
1938         match_type_spec.
1939         * match.c (gfc_match_implicit_none, match_implicit_range,
1940         gfc_match_implicit): Move to decl.c.
1941         * match.h (gfc_match_implicit_none, gfc_match_implicit):
1942         Move protoypes to section 'decl.c'.
1943         (gfc_match_type_spec): Remove prototype.
1944
1945 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1946
1947         * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
1948         copyright years.
1949
1950 2004-06-29  Steven Bosscher  <stevenb@suse.de>
1951
1952         Make sure types in assignments are compatible.  Mostly mechanical.
1953         * trans-const.h (gfc_index_one_node): New define.
1954         * trans-array.c (gfc_trans_allocate_array_storage,
1955         gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
1956         gfc_trans_array_constructor_value, gfc_trans_array_constructor,
1957         gfc_conv_array_ubound, gfc_conv_array_ref,
1958         gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
1959         gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
1960         gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
1961         gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
1962         types in assignments, conversions and conditionals for expressions.
1963         * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
1964         gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
1965         gfc_conv_function_call, gfc_trans_pointer_assignment,
1966         gfc_trans_scalar_assign): Likewise.
1967         * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
1968         gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
1969         gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
1970         gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
1971         gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
1972         gfc_conv_allocated, gfc_conv_associated,
1973         gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
1974         * trans-io.c (set_string): Likewise.
1975         * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
1976         gfc_do_allocate, generate_loop_for_temp_to_lhs,
1977         generate_loop_for_rhs_to_temp, compute_inner_temp_size,
1978         compute_overall_iter_number, gfc_trans_assign_need_temp,
1979         gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
1980         gfc_evaluate_where_mask, gfc_trans_where_assign,
1981         gfc_trans_where_2): Likewise.
1982         * trans-types.c (gfc_get_character_type, gfc_build_array_type,
1983         gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
1984
1985         * trans.c (gfc_add_modify_expr): Add sanity check that types
1986         for the lhs and rhs are the same for scalar assignments.
1987
1988 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1989
1990         * dump-parse-tree.c (show_common): New function.
1991         (gfc_show_namespace): Show commons.
1992
1993 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1994         Andrew Vaught  <andyv@firstinter.net>
1995
1996         PR fortran/13249
1997         PR fortran/15481
1998         * decl.c (gfc_match_save): Adapt to new common structures,
1999         don't allow saving USE-associated common.
2000         * dump-parse-tree (gfc_show_attr): (saved_)common are not
2001         symbol attributes any longer.
2002         (gfc_show_symbol): Don't show old-style commons any longer.
2003         (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
2004         interface.
2005         * gfortran.h (symbol_attribute): Remove common and saved_common
2006         attributes.
2007         (gfc_symbol): Remove common_head element.
2008         (gfc_common_head): New struct.
2009         (gfc_get_common_head): New macro.
2010         (gfc_symtree): Add field 'common' to union.
2011         (gfc_namespace): Add field 'common_root'; change type of field
2012         'blank_common' to blank_common.
2013         (gfc_add_data): New prototype.
2014         (gfc_traverse_symtree): Expect a symtree as first argument
2015         instead of namespace.
2016         * match.c (gfc_get_common): New function.
2017         (match_common_name): Change to take char * as argument, adapt,
2018         fix bug with empty name.
2019         (gfc_match_common): Adapt to new data structures. Disallow
2020         redeclaration of USE-associated COMMON-block. Fix bug with
2021         empty common.
2022         (var_element): Adapt to new common structures.
2023         * match.h (gfc_get_common): Declare.
2024         * module.c: Add 2004 to copyright years, add commons to module
2025         file layout description.
2026         (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
2027         for removed attributes.
2028         (mio_symbol): Adapt to new way of storing common relations.
2029         (load_commons): New function.
2030         (read_module): Skip common list on first pass, load_commons at
2031         second.
2032         (write_commons): New function.
2033         (write_module): Call write_commons().
2034         * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
2035         functions related to removed attributes.
2036         (gfc_add_data): New function.
2037         (gfc_clear_attr): Don't set removed attributes.
2038         (gfc_copy_attr): Don't copy removed attributes.
2039         (traverse_symtree): Remove.
2040         (gfc_traverse_symtree): Don't traverse symbol
2041         tree of the passed namespace, but require a symtree to be passed
2042         instead. Unify with traverse_symtree.
2043         (gfc_traverse_ns): Call gfc_traverse_symtree according to new
2044         interface.
2045         (save_symbol): Remove setting of removed attribute.
2046         * trans-common.c (gfc_sym_mangled_common_id): Change to
2047         take 'char *' argument instead of 'gfc_symbol'.
2048         (build_common_decl, new_segment, translate_common): Adapt to new
2049         data structures, add new
2050         argument name.
2051         (create_common): Adapt to new data structures, add new
2052         argument name. Fix typo in intialization of derived types.
2053         (finish_equivalences): Add second argument in call to
2054         create_common.
2055         (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
2056         (gfc_trans_common): Adapt to new data structures.
2057         * trans-decl.c (gfc_create_module_variables): Remove test for
2058         removed attribute.
2059
2060 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2061
2062         * io.c: Add 2004 to copyright years.
2063
2064 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2065         Andrew Vaught  <andyv@firstinter.net>
2066
2067         * gfortran.h (gfc_gsymbol): New typedef.
2068         (gfc_gsym_root): New variable.
2069         (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
2070         * parse.c (global_used): New function.
2071         (parse_block_data): Check for double empty BLOCK DATA,
2072         use global symbol table.
2073         (parse_module): Use global symbol table.
2074         (add_global_procedure, add_global_program): New functions.
2075         (gfc_parse_file): Use global symbol table.
2076         * symbol.c (gfc_gsym_root): New variable.
2077         (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
2078         functions.
2079
2080 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2081
2082         * module.c (mio_gmp_real): Correct writing of negative numbers.
2083
2084 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2085
2086         PR fortran/15963
2087         * expr.c (check_intrinsic_op): Allow comparison of characters.
2088         Make logic easier.
2089
2090 2004-06-26  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2091         Andrew Vaught  <andyv@firstinter.net>
2092
2093         * decl.c (contained_procedure): New function.
2094         (match_end): Verify correctness of END STATEMENT in
2095         all cases.
2096
2097 2004-06-26  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2098         Andrew Vaught  <andyv@firstinter.net>
2099
2100         PR fortran/15190
2101         * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
2102         (decode_statement): Enforce required space in free-form.
2103
2104 2004-06-22  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2105
2106         * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
2107         * trans-array.c (gfc_conv_descriptor_data): Add operand
2108         for COMPONENT_REF.
2109         (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
2110         (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
2111         (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
2112         * trans-common.c (create_common): Likewise.
2113         * trans-expr.c (gfc_conv_component_ref): Likewise.
2114         * trans-io.c (set_parameter_value): Likewise.
2115         (set_parameter_ref, set_string, set_flag, io_result): Likewise.
2116         (transfer_expr): Likewise.
2117         * trans-decl.c (gfc_trans_auto_character_variable):
2118         Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
2119         (gfc_gimplify_function): New function.
2120         (gfc_generate_function-code): Properly handle nested functions.
2121         * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
2122
2123 2004-06-22  Janne Blomqvist  <jblomqvi@cc.hut.fi>
2124
2125         PR fortran/15750
2126         * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
2127         (gfc_resolve_inquire): Resolve the iolength tag.  Return
2128         SUCCESS at end of function if no failure has occured.
2129         * resolve.c (resolve_code): Resolve if iolength is encountered.
2130         * trans-io.c: (ioparm_iolength, iocall_iolength,
2131         iocall_iolength_done): New variables.
2132         (last_dt): Add IOLENGTH.
2133         (gfc_build_io_library_fndecls ): Set iolength related variables.
2134         (gfc_trans_iolength): Implement.
2135         (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
2136
2137 2004-06-21  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de
2138
2139         PR fortran/15511
2140         * scanner.c (load_line): Don't truncate preprocessor lines.
2141         Reformat error message.
2142         (preprocessor_line): Issue warning in case of malformed
2143         preprocessor line.
2144
2145 2004-06-21  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2146
2147         * resolve.c (resolve_symbol): Add comment in function body.
2148         (check_data_variable): Change type of mark to ar_type, adapt code
2149         accordingly.
2150
2151 2004-06-21  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2152
2153         * array.c (gfc_insert_constructor): Avoid redundant call to
2154         mpz_comp. Add 2004 to copyright years.
2155
2156 2004-06-21  Joseph S. Myers  <jsm@polyomino.org.uk>
2157
2158         * trans.h (stmtblock_t): Change has_scope to unsigned int.
2159
2160 2004-06-20  Steven G. Kargl  <kargls@comcast.net>
2161
2162         * arith.c (gfc_range_check): correct complex underflow.
2163
2164 2004-06-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2165
2166         PR fortran/15962
2167         * match.c (match_case_selector): Call gfc_match_init_expr
2168         instead of gfc_match_expr.
2169         * resolve.c (validate_case_label_expr): No need to check for
2170         constant, since it wouldn't have been matched with the fix to
2171         match.c.
2172
2173 2004-06-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2174
2175         PR fortran/15211
2176         * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
2177         of strings.
2178
2179 2004-06-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2180
2181         PR fortran/15510
2182         * trans-deecl.c (generate_local_decl): Do not issue warning for
2183         unused variables if they're use associated.
2184
2185 2004-06-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2186         Andrew Vaught <andyv@firstinter.net>
2187
2188         PR fortran/14928
2189         * gfortran.h (gfc_check_f): Add new field f3ml.
2190         * check.c (gfc_check_minloc_maxloc): Take argument list instead
2191         of individual arguments, reorder if necessary.
2192         * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
2193         * intrinsic.c (add_sym_3ml): New function.
2194         (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
2195         (check_specific): Catch special case MINLOC, MAXLOC.
2196
2197 2004-06-14  Paul Brook  <paul@codesourcery.com>
2198
2199         * intrinsic.c (add_sym_2s): Use correct function types.
2200
2201 2004-06-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2202
2203         * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize.  Move data.c
2204         * data.c (gfc_get_section_index):  Remove dependency on trans.h.
2205
2206 2004-06-12  Steven G. Kargl  <kargls@comcast.net>
2207
2208         * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
2209         gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
2210         * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
2211         GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
2212         * trans-intrinsic.c:  Use symbols.
2213         * intrinsic.c (add_sym_2s): New function.
2214         * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
2215         * intrinsic.h: Function prototypes.
2216         * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
2217         gfc_resolve_srand):  New functions.
2218
2219 2004-06-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2220
2221         PR fortran/14957
2222         * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
2223         contained procedure.
2224
2225 2004-06-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2226
2227         PR fortran/12841
2228         * interface.c (compare_parameter, compare_actual_formal): Don't
2229         check types and array shapes for NULL()
2230         * trans-expr.c (conv_function_call): No double indirection for
2231         NULL()
2232
2233 2004-06-09  Toon Moene  <toon@moene.indiv.nluug.nl>
2234
2235         * trans-expr.c (gfc_conv_cst_int_power): Compute
2236         x**(-n) by converting it to (1/x)**n instead of
2237         1/x**n.
2238
2239 2004-06-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2240
2241         PR fortran/13372
2242         * module.c (write_symbol, write_symtree): Don't write symbols
2243         wrongly added to namespace.
2244         * trans-decl.c (gfc_create_module_variable): Don't create a
2245         backend decl for a symbol incorrectly added to namespace.
2246
2247 2004-06-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2248
2249         PR fortran/13201
2250         * resolve.c (resolve_symbol): Verify that parameter array has an
2251         explicit shape. Fix typos and coding style issues in surrounding
2252         lines.
2253
2254 2004-06-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2255
2256         PR fortran/15478
2257         * gfortran.texi: The documentation doesn't contain infomration on
2258         how to report bugs, and shouldn't, so remove the line which
2259         says it does.
2260
2261 2004-06-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2262
2263         * intrinsic.c (sort_actual): Keep track of type of missing
2264         arguments. (Missing from previous commit.)
2265
2266 2004-06-03  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2267
2268         * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
2269         * interface.c (compare_actual_formal): Keep type of omitted
2270         optional arguments.
2271         * trans-expr.c (gfc_conv_function_call): Add string length
2272         argument for omitted string argument.
2273
2274 2004-06-03  Paul Brook  <paul@codesourcery.com>
2275
2276         * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
2277         lists instead of compound expr chains.
2278         (gfc_trans_code): Annotate statement lists.
2279
2280 2004-06-03  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2281
2282         * trans-array.c: Fix spelling in comments.
2283
2284 2004-06-02  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2285
2286         PR fortran/15557
2287         * data.c (assign_substring_data_value): New function.
2288         (gfc_assign_data_value): Call the new function if we're dealing
2289         with a substring LHS.
2290
2291 2004-06-01  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2292
2293         PR fortran/15477
2294         * gfortran.h (GFC_VERSION): Remove.
2295         * gfortran.texi (version-gfortran): Remove, replace by version-GCC
2296         where used.
2297
2298 2004-05-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2299
2300         * trans-types.c: Fix spelling & layout in comments.
2301
2302 2004-05-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2303
2304         PR fortran/14067
2305         * trans-const.c (gfc_conv_string_init): Allow variable string
2306         length lower than initialization string length.
2307
2308 2004-05-30  Paul Brook  <paul@codesourcery.com>
2309
2310         PR fortran/15620
2311         * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
2312         * trans-expr.c (gfc_trans_string_copy): New function.
2313         (gfc_conv_statement_function): Use them.  Create temp vars.  Enforce
2314         character lengths.
2315         (gfc_conv_string_parameter): Use gfc_trans_string_copy.
2316         * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
2317         * trans.h (struct gfc_saved_var): Define.
2318         (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
2319
2320 2004-05-30  Steven G. Kargl  <kargls@comcast.net>
2321
2322         * iresolve.c (gfc_resolve_random_number): Clean up conditional.
2323
2324 2004-05-29  Steven G. Kargl  <kargls@comcast.net>
2325
2326         * simplify.c (gfc_simplify_log): Remove useless line of code.
2327
2328 2004-05-29  Paul Brook  <paul@codesourcery.com>
2329
2330         * trans-common.c (find_equivalence): Find multiple rules.
2331
2332 2004-05-27  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2333
2334         * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
2335         (gfc_current_locus): Declare new global variable.
2336         * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
2337         (gfc_current_locus1): Rename ...
2338         (gfc_current_locus): ... to this.
2339         (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
2340         skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
2341         gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
2342         gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
2343         and gfc_current_locus(), respectively.
2344         * array.c (match_subscript, gfc_match_array_ref, match_array_list,
2345         match_array_cons_element, gfc_match_array_constructor):
2346         Read/modify gfc_current_locus instead of calling gfc_set_locus()
2347         and gfc_current_locus().
2348         * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
2349         match_attr_spec, gfc_match_function_decl, gfc_match_end,
2350         attr_decl1, gfc_match_save): Likewise.
2351         * error.c (error_print, gfc_internal_error): Likewise.
2352         * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
2353         * interface.c (gfc_add_interface): Likewise.
2354         * io.c (gfc_match_format, match_dt_format, match_dt_element,
2355         match_io_iterator, match_io): Likewise.
2356         * match.c (gfc_match_space, gfc_match_eos,
2357         gfc_match_small_literal_int, gfc_match_st_label,
2358         gfc_match_strings, gfc_match_name, gfc_match_iterator,
2359         gfc_match_char, gfc_match, gfc_match_assignment,
2360         gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
2361         gfc_match_nullify, gfc_match_call, match_implicit_range,
2362         gfc_match_implicit, gfc_match_data, match_case_selector,
2363         gfc_match_case, match_forall_iterator): Likewise.
2364         * matchexp.c (gfc_match_defined_op_name, next_operator,
2365         match_level_1, match_mult_operand, match_ext_mult_operand,
2366         match_add_operand, match_ext_add_operand, match_level_2,
2367         match_level_3, match_level_4, match_and_operand, match_or_operand,
2368         match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
2369         * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
2370         * parse.c (match_word, decode_statement, next_free, next_fixed,
2371         add_statement, verify_st_order, parse_if_block, gfc_parse_file):
2372         Likewise.
2373         * primary.c (match_digits, match_integer_constant,
2374         match_boz_constant, match_real_constant, match_substring,
2375         next_string_char, match_charkind_name, match_string_constant,
2376         match_logical_constant, match_const_complex_part,
2377         match_complex_constant, match_actual_arg, match_keyword_arg,
2378         gfc_match_actual_arglist, gfc_match_structure_constructor,
2379         gfc_match_rvalue, gfc_match_variable): Likewise.
2380         * st.c (gfc_get_code): Likewise.
2381         * symbol.c (check_conflict, check_used, check_done,
2382         duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
2383         gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
2384         gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
2385
2386 2004-05-26  Roger Sayle  <roger@eyesopen.com>
2387
2388         * io.c (format_asterisk): Silence compiler warnings by correcting
2389         the number of elements of a "locus" initializer.
2390
2391 2004-05-25  Roger Sayle  <roger@eyesopen.com>
2392
2393         PR fortran/13912
2394         * matchexp.c: Allow unary operators after arithmetic operators
2395         as a GNU extension.
2396         (match_ext_mult_operand, match_ext_add_operand): New functions.
2397         (match_mult_operand): Tweak to call match_ext_mult_operand.
2398         (match_add_operand): Tweak to call match_ext_mult_operand.
2399         (match_level_2): Rearrange to call match_ext_add_operand.
2400
2401 2004-05-25  Paul Brook  <paul@codesourcery.com>
2402
2403         * expr.c (check_inquiry): Remove bogus tests.
2404
2405 2004-05-23  Paul Brook  <paul@codesourcery.com>
2406
2407         PR fortran/13773
2408         * expr.c (restricted_args): Remove redundant checks/argument.
2409         (external_spec_function): Update to match.
2410         (restricted_intrinsic): Rewrite.
2411
2412 2004-05-23  Paul Brook  <paul@codesourcery.com>
2413         Victor Leikehman  <lei@haifasphere.co.il>
2414
2415         * gfortran.h (struct gfc_symbol): Add equiv_built.
2416         * trans-common.c: Change int to HOST_WIDE_INT.  Capitalize error
2417         messages.
2418         (current_length): Remove.
2419         (add_segments): New function.
2420         (build_equiv_decl): Create initialized common blocks.
2421         (build_common_decl): Always add decl to bindings.
2422         (create_common): Create initializers.
2423         (find_segment_info): Reformat to match coding conventions.
2424         (new_condition): Use add_segments.
2425         (add_condition, find_equivalence, add_equivalences): Move iteration
2426         inside functions.  Only process each segment once.
2427         (new_segment, finish_equivalences, translate_common): Simplify.
2428
2429 2004-05-23  Steven G. Kargl  <kargls@comcast.net>
2430
2431         * check.c (gfc_check_random_seed): Issue for too many arguments.
2432
2433 2004-05-22  Steven G. Kargl  <kargls@comcast.net>
2434
2435         * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
2436
2437 2004-05-22  Paul Brook  <paul@codesourcery.com>
2438
2439         * dump-parse-tree.c (gfc_show_equiv): New function.
2440         (gfc_show_namespace): Use it.
2441
2442 2004-05-22  Victor Leikehman  <lei@haifasphere.co.il>
2443
2444         PR fortran/13249
2445         * symbol.c (gfc_add_common): Disable checks to work around other more
2446         fundamental inadequacies.
2447
2448 2004-05-22  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
2449
2450         * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
2451         only for functions.
2452         (gfc_build_function_decl): Likewise.
2453
2454 2004-05-22  Steven G. Kargl  <kargls@comcast.net>
2455
2456         * check.c (gfc_check_system_clock): New function.
2457         * intrinsic.c (add_sym_3s): New function.
2458         (add_subroutines): Use it.
2459         * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
2460         Add prototypes.
2461         * iresolve.c (gfc_resolve_system_clock): New function.
2462
2463 2004-05-22  Steven G. Kargl  <kargls@comcast.net>
2464
2465         * invoke.texi: Document -Wunderflow and spell check.
2466         * lang.opt: Add Wunderflow.
2467         * gfortran.h (gfc_option_t): Add warn_underflow option.
2468         * options.c (gfc_init_options, set_Wall): Use it.
2469         * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
2470         * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
2471         gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
2472         gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
2473         * arith.c (common_logarithm): Fix typo in comment.
2474
2475 2004-05-21  Roger Sayle  <roger@eyesopen.com>
2476
2477         * io.c (check_format): As a GNU extension, allow the comma after a
2478         string literal to be optional in a format.  Use gfc_notify_std to
2479         issue an error/warning as appropriate.
2480
2481 2004-05-21  Roger Sayle  <roger@eyesopen.com>
2482
2483         * io.c (check_format): Use gfc_notify_std to determine whether to
2484         issue an error/warning for omitting the digits from the X format.
2485
2486 2004-05-20  Roger Sayle  <roger@eyesopen.com>
2487
2488         * io.c (check_format): Allow the number before the X format to
2489         be optional when not -pedantic.
2490
2491 2004-05-18  Feng Wang  <fengwang@nudt.edu.cn>
2492         Paul Brook  <paul@codesourcery.com>
2493
2494         * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
2495         Create decls for __builtin_pow{,f}.
2496         * gfortran.h (PREFIX_LEN): Define.
2497         * trans-decl.c (gfor_fndecl_math_powi): Add.
2498         (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
2499         (gfc_build_intrinsic_function_decls): Create decls for powi.
2500         * trans-expr.c (powi_table): Add.
2501         (gfc_conv_integer_power): Remove.
2502         (gfc_conv_powi): New function.
2503         (gfc_conv_cst_int_power): New function.
2504         (gfc_conv_power_op): Use new powi routines.
2505         * trans.h (struct gfc_powdecl_list): Add.
2506         (gfor_fndecl_math_powi): Add.
2507         (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
2508
2509 2004-05-18  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2510
2511         * trans.c, trans-decl.c: Fix comment typos.
2512
2513 2004-05-18  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2514
2515         * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
2516
2517 2004-05-18  Steve Kargl  <kargls@comcast.net>
2518
2519         * arith.c (gfc_int2complex): Fix incorrect range checking.
2520
2521 2004-05-18  Paul Brook  <paul@codesourcery.com>
2522
2523         PR fortran/13930
2524         * decl.c (add_init_expr_to_sym): Remove incorrect check.
2525         (default_initializer): Move to expr.c.
2526         (variable_decl): Don't assign default initializer to variables.
2527         * expr.c (gfc_default_initializer): Move to here.
2528         * gfortran.h (gfc_default_initializer): Add prototype.
2529         * resolve.c (resolve_symbol): Check for illegal initializers.
2530         Assign default initializer.
2531
2532 2004-05-17  Steve Kargl  <kargls@comcast.net>
2533
2534         * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
2535
2536 2004-05-17  Steve Kargl  <kargls@comcast.net>
2537
2538         * arith.c (gfc_real2complex): Range checking wrong part of complex
2539         number.
2540
2541 2004-05-16  Paul Brook  <paul@codesourcery.com>
2542
2543         * options.c (gfc_handle_module_path_options): Fix buffer overrun.
2544
2545 2004-05-16  Paul Brook  <paul@codesourcery.com>
2546
2547         * arith.c (gfc_range_check): Fix logic error.
2548
2549 2004-05-16  Steve Kargl  <sgk@troutmask.apl.washington.edu>
2550
2551         * arith.c: Fix comment typos.
2552
2553 2004-05-15  Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2554
2555         PR fortran/13742
2556         * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
2557         not initialized in a disallowed fashion.
2558         * match.c (gfc_match_common): Likewise.
2559         (var_element): Verify that variable is not in the blank COMMON,
2560         if it is in a common.
2561
2562 2004-05-15  Joseph S. Myers  <jsm@polyomino.org.uk>
2563
2564         * Make-lang.in (f95.generated-manpages): Remove.
2565         (f95.srcextra): New.
2566         (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
2567         f95.maintainer-clean): Generate info and dvi files in objdir/doc.
2568         (f95.dvi): Remove.
2569         (dvi): New.
2570         (f95.install-info): Remove.
2571         (install-info): New.
2572
2573 2004-05-15  Victor Leikehman  <lei@haifasphere.co.il>
2574
2575         * decl.c (add_init_expr_to_sym): Check for variable size arrays.
2576
2577 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2578
2579         * primary.c (match_boz_constant): Use gfc_notify_std() for
2580         issuing a warning or an error.
2581
2582 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2583
2584         PR fortran/13826
2585         * primary.c (match_structure_constructor): Rename ...
2586         (gfc_match_structure_constructor): ... to this. Make non-static.
2587         (gfc_match_rvalue): Call renamed function.
2588         * match.h (gfc_match_structure_constructor): Declare.
2589         * match.c (gfc_match_data_constant): Handle structure
2590         constructor.
2591
2592 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2593
2594         PR fortran/13702
2595         (Port from g95)
2596         * gfortran.h (gfc_linebuf): New typedef.
2597         (linebuf): Remove.
2598         (gfc_file): Revamped, use new gfc_linebuf.
2599         (locus): Revamped, use new types.
2600         (gfc_current_file): Remove.
2601         (gfc_current_form, gfc_source_file): New global variables.
2602         * match.c (gfc_match_space, gfc_match_strings): Use
2603         gfc_current_form to find source form.
2604         * module.c (gfc_dump_module): Use gfc_source_file when printing
2605         module header.
2606         * error.c (show_locus, show_loci) Use new data structures to print
2607         locus.
2608         * scanner.c (first_file, first_duplicated_file, gfc_current_file):
2609         Remove.
2610         (file_head, current_file, gfc_current_form, line_head, line_tail,
2611         gfc_current_locus1, gfc_source_file): New global variables.
2612         (gfc_scanner_init1): Set new global variables.
2613         (gfc_scanner_done1): Free new data structures.
2614         (gfc_current_locus): Return pointer to gfc_current_locus1.
2615         (gfc_set_locus): Set gfc_current_locus1.
2616         (gfc_at_eof): Set new variables.
2617         (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
2618         to new locus structure.
2619         (gfc_check_include): Remove.
2620         (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
2621         (gfc_skip_comments): Use gfc_current_form, find locus with
2622         gfc_current_locus1.
2623         (gfc_next_char): Use gfc_current_form.
2624         (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
2625         (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
2626         comment formatting.
2627         (get_file): New function.
2628         (preprocessor_line, include_line): New functions.
2629         (load_file): Move down, rewrite to match new data structures.
2630         (gfc_new_file): Rewrite to match new data structures.
2631         * parse.c (next_statement): Remove code which is now useless. Use
2632         gfc_source_form and gfc_source_file where appropriate.
2633         * trans-decl.c (gfc_get_label_decl): adapt to new data structures
2634         when determining locus of frontend code.
2635         * trans-io.c (set_error_locus): Same.
2636         * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
2637         * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
2638         preprocessor flags.
2639         (all): Add missing initializers.
2640
2641 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2642
2643         * Make-lang.in (trans-common.o): Remove redundant dependency.
2644         (data.c): Replace object file name ...
2645         (data.o): ... by the correct one.
2646
2647 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2648
2649         * dump-parse-tree.c (gfc_show_array_ref): Print colon only
2650         for ranges when dumping array references.
2651
2652 2004-05-14  Victor Leikehman  <lei@haifasphere.co.il>
2653
2654         * decl.c (variable_decl): Always apply default initializer.
2655
2656 2004-05-08  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
2657
2658         PR fortran/15206
2659         * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
2660         handle zero correctly.
2661
2662 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2663
2664         * match.c (gfc_match): Eliminate dead code.
2665
2666 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2667
2668         * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
2669         Detect bad continuation line in fixed form sources.
2670
2671 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2672
2673         PR fortran/15205
2674         * iresolve.c (gfc_resolve_nearest): Add new function.
2675         * intrinsic.h: ... declare it here.
2676         * intrinsic.c (add_functions): ... add it as resolving function
2677         for NEAREST.
2678
2679 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2680
2681         PR fortran/14066
2682         * match.c (gfc_match_do): Allow infinite loops with
2683         label-do-stmt. Do not enforce space after comma.
2684
2685 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2686
2687         PR fortran/15051
2688         * parse.c (parse_interface): Allow empty INTERFACE, remove
2689         seen_body.
2690
2691 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2692
2693         * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
2694         decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
2695         expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
2696         intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
2697         matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
2698         primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
2699         trans-array.c, trans-array.h, trans-common.c, trans-const.c,
2700         trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
2701         trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
2702         trans-types.h, trans.c, trans.h: Update copyright years and
2703         boilerplate.
2704         * data.c: Likewise, also removed two whitespace-only lines.
2705         * gfortranspec.c, lang.opt: Update copyright years.
2706
2707 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2708
2709         PR fortran/14568
2710         * trans-decl.c (generate_local_decl): Don't warn for unused
2711         variables which are in common blocks.
2712
2713 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
2714
2715         * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
2716         trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
2717         trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
2718
2719 2004-05-13  Victor Leikehman  <lei@haifasphere.co.il>
2720
2721         PR fortran/15314
2722         * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
2723
2724 2004-05-13  Joseph S. Myers  <jsm@polyomino.org.uk>
2725
2726         * gfortran.texi: Use @table @emph instead of @itemize @emph.
2727         Remove "set DEVELOPMENT".
2728         (Compiling GFORTRAN): Remove.
2729
2730 2004-05-09  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
2731
2732         * array.c (match_subscript, match_array_ref): Add comments
2733         explaining argument 'init'.
2734         * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
2735         trans-expr.c, trans.c: Fix some typos in comments.
2736         * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
2737         * primary.c (match_digits, match_integer_constant): Add comment
2738         explaining signflag.
2739
2740 2004-05-01  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
2741
2742         PR fortran/13940
2743         * primary.c: Include system.h and flags.h, needed for pedantic.
2744         (match_boz_constant): Allow "x" for hexadecimal constants, warn if
2745         pedantic is set.
2746
2747 2004-05-01  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
2748
2749         PR fortran/13940
2750         * match.c (match_data_constant): Handle case where
2751         gfc_find_symbol sets sym to NULL
2752
2753 2004-04-28  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
2754
2755         * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
2756         dependency on mathbuiltins.def
2757
2758 2004-04-24  Victor Leikehman  <lei@il.ibm.com>
2759
2760         * trans-io.c (transfer_expr): Implemented recursive printing
2761         of derived types.
2762
2763 2004-04-24  Andrew Pinski  <pinskia@physics.uc.edu>
2764
2765         * gfortranspec.c: Do not include multilib.h.
2766
2767 2004-04-24  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
2768
2769         * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
2770         2004 to copyright years.
2771         * trans-expr.c, trans-decl.c: Comment update, we now generate
2772         GENERIC, not SIMPLE. Add 2004 to copyright years.
2773
2774 2004-04-24  Paul Brook  <paul@codesourcery.com>
2775
2776         * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
2777
2778 2004-04-24  Feng Wang  <fengwang@nudt.edu.cn>
2779
2780         PR 14817
2781         * arith.c (gfc_arith_divide): Fix complex divide.
2782
2783 2004-04-23  Andrew Pinski  <pinskia@physics.uc.edu>
2784
2785         * gfortranspec.c: Include the target headers.
2786
2787 2004-04-18  Feng Wang  <fengwang@nudt.edu.cn>
2788
2789         PR fortran/14921
2790         PR fortran/14540
2791         * arith.c (arctangent2): New function.
2792         * arith.h (arctangent2): Add function prototype.
2793         * simplify.c (gfc_simplify_atan2): Use it.
2794         (gfc_simplify_log): Use it.
2795
2796 2004-04-12  Diego Novillo  <dnovillo@redhat.com>
2797
2798         * fortran/f95-lang.c (gfc_expand_stmt): Remove.
2799         (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
2800
2801 2004-04-11  Bud Davis  <bdavis9659@comcast.net>
2802
2803         PR fortran/14872
2804         * trans-io.c (build_dt): Change REC to value.
2805
2806 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
2807
2808         PR 14394
2809         * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
2810         the real value when converting mpf to string.
2811
2812 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
2813
2814         PR 14395
2815         * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
2816         the result.
2817
2818 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
2819
2820         PR fortran/14377
2821         * simplify.c (simplify_min_max): Convert the type of the result.
2822
2823 2004-04-11  Paul Brook  <paul@codesourcery.com>
2824
2825         * gfortran.texi: Use full target triplet.
2826
2827 2004-04-11  Paul Brook  <paul@codesourcery.com>
2828
2829         * Make-lang.in (GFORTRAN_TEXI): Set it.
2830         (fortran/dfortran.dvi): Use it.  Add fortran to include paths.
2831         (fortran/gfortran.info): Ditto.
2832         * gfortran.texi: Major update.
2833         * invoke.texi: New file.
2834
2835 2004-04-10  Paul Brook  <paul@codesourcery.com>
2836
2837         * trans-array.c (gfc_trans_allocate_temp_array,
2838         gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
2839         * trans-decl.c (gfc_build_dummy_array_decl,
2840         gfc_get_symbol_decl, gfc_build_function_decl,
2841         gfc_create_module_variable): Ditto.
2842         * trans-expr.c (gfc_conv_variable): Ditto.
2843         * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
2844         * trans.h (GFC_DECL_STRING): Remove.
2845         (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
2846         GFC_DECL_ASSIGN): Renumber flags.
2847
2848 2004-04-05  Paul Brook  <paul@codesourcery.com>
2849
2850         PR 13252
2851         PR 14081
2852         * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
2853         and stack_restore.
2854         * gfortran.h (struct gfc_charlen): Add backend_decl.
2855         * trans-array.c (gfc_trans_allocate_temp_array,
2856         gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
2857         (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
2858         Remove old, broken string handling.
2859         (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
2860         gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
2861         gfc_trans_deferred_array): Handle character arrays.
2862         * trans-const.c (gfc_conv_const_charlen): New function.
2863         * trans-const.h (gfc_conv_const_charlen): Add prototype.
2864         * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
2865         as static.
2866         (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
2867         (gfc_create_string_length): New function.
2868         (gfc_get_symbol_decl): Create lengths for character variables.
2869         (gfc_get_fake_result_decl): Ditto.
2870         (gfc_build_function_decl): Only set length for assumed length
2871         character arguments.
2872         (gfc_trans_dummy_character): New function.
2873         (gfc_trans_auto_character_variable): Rewrite.
2874         (gfc_trans_deferred_vars): Handle more types of character variable.
2875         (gfc_create_module_variable): String lengths have moved.
2876         (gfc_generate_function_code): Initialize deferred var chain earlier.
2877         * trans-expr.c (gfc_conv_init_string_length): Rename ...
2878         (gfc_trans_init_string_length):  ... to this.
2879         (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
2880         gfc_conv_function_call): Update to new format for character variables.
2881         (gfc_conv_string_length): Remove.
2882         (gfc_conv_string_parameter): Update assertion.
2883         * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
2884         * trans-io.c (set_string): Use new macro names.
2885         * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
2886         * trans-types.c (gfc_get_character_type): Use existing length expr.
2887         (gfc_is_nodesc_array): Make public.
2888         (gfc_get_dtype_cst): Rename ...
2889         (gfc_get_dtype): ... to this.  Handle unknown size arrays.
2890         (gfc_get_nodesc_array_type): Use new name.
2891         (gfc_sym_type): New character variable code.
2892         (gfc_get_derived_type): Ditto.
2893         (gfc_get_function_type): Evaluate character variable lengths.
2894         * trans-types.h (gfc_strlen_kind): Define.
2895         (gfc_is_nodesc_array): Add prototype.
2896         * trans.h: Update prototypes.
2897         (struct lang_type): Update comments.
2898         (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
2899         (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
2900
2901 2004-04-04  Paul Brook  <paul@codesourcery.com>
2902
2903         * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
2904         * options.c (gfc_init.options, gfc_handle_option): Ditto.
2905         * trans-expr.c (gfc_conv_function_call): Ditto.
2906         * trans-types.c (gfc_is_nodesc_array): Ditto
2907         * lang.opt (fg77-calls): Remove.
2908
2909 2004-04-04  Paul Brook  <paul@codesourcery.com>
2910
2911         * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
2912         (gfc_conv_descriptor_base): Rename ...
2913         (gfc_conv_descriptor_offset): ... to this.
2914         (gfc_trans_allocate_array_storage): Set offset to zero.
2915         (gfc_conv_array_base): Rename ...
2916         (gfc_conv_array_offset): ... to this.
2917         (gfc_conv_array_index_ref): Add offset parameter.
2918         (gfc_conv_array_ref): Include offset.
2919         (gfc_trans_preloop_setup): Use existing offset.
2920         (gfc_trans_allocate_temp_array,  gfc_array_allocate,
2921         gfc_trans_auto_array_allocation, gfc_trans_g77_array,
2922         gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
2923         gfc_conf_ss_descriptor): Set offset.
2924         * trans-array.h: Rename prototypes.
2925         * trans-const.h (gfc_index_zero_node): Define.
2926         * trans-decl.c (gfc_build_qualified_array): Change base to offset.
2927         * trans-types.c (gfc_get_array_type_bounds): Ditto.
2928         (gfc_get_nodesc_array_type): Calculate offset before upper bound.
2929
2930 2004-03-25  Diego Novillo  <dnovillo@redhat.com>
2931
2932         * convert.c (convert): Don't handle WITH_RECORD_EXPR.
2933
2934 2004-03-24  Bud Davis  <bdavis9659@comcast.net>
2935
2936         PR 14055
2937         * arith.c (gfc_convert_integer,gfc_convert_real):  Removed leading '+'
2938         before conversion by gmp library call.
2939
2940 2004-03-24  Bud Davis  <bdavis9659@comcast.net>
2941
2942         PR 12921
2943         * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
2944
2945 2004-02-24  Richard Henderson  <rth@redhat.com>
2946
2947         * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
2948
2949 2004-02-19  Loren J. Rittle  <ljrittle@acm.org>
2950
2951         * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
2952         (fortran/gfortran.info): ... to here.
2953         (f95.srcinfo): New.
2954
2955 2004-02-16  Richard Henderson  <rth@redhat.com>
2956
2957         * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
2958         * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
2959         (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
2960         (gfc_expand_function): Rename from expand_function_body, make static,
2961         don't do anything except invoke tree_rest_of_compilation.
2962         (gfc_be_parse_file): Invoke cgraph.
2963         (gfc_expand_decl): Remove.
2964         (gfc_init_builtin_functions): Add __builtin_init_trampoline and
2965         __builtin_adjust_trampoline.
2966         * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
2967         (gfc_finalize): New.
2968         (gfc_generate_function_code): Use it.  Lower nested functions.
2969         * trans-expr.c (gfc_conv_function_call): Add static chain operand
2970         to call_expr.
2971         * trans.c (gfc_build_function_call): Likewise.
2972         * trans.h (expand_function_body): Remove.
2973
2974 2004-02-15  Victor Leikehman  <lei@il.ibm.com>
2975
2976         PR gfortran/13433
2977         * trans-decl.c (gfc_build_function_decl) For functions
2978         returning CHARACTER pass an extra length argument,
2979         following g77 calling conventions.
2980         * trans-types.c (gfc_get_function_type) Ditto.
2981         * trans-expr.c (gfc_conv_function_call) Ditto.
2982
2983 2004-02-14  Paul Brook  <paul@codesourcery.com>
2984
2985         * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
2986
2987 2004-02-12  Paul Brook  <paul@nowt.org>
2988
2989         * BUGS: Remove.
2990
2991 2004-02-08  Steve Kargl  <sgk@troutmask.apl.washington.edu>
2992
2993         * gfortran.texi: Fix typos.
2994
2995 2004-02-07  Bud Davis  <bdavis9659@comcast.net>
2996
2997         PR gfortran/13909
2998         * intrinsic.c (add_conversions) Use logical conversion instead
2999         of real.
3000         * trans-types.c (gfc_get_logical_type) implemented logical*1
3001         and logical*2.
3002
3003 2004-01-17  Paul Brook  <paul@codesourcery.com>
3004
3005         * lang-specs.h: Remove %<fixed-form.
3006
3007 2004-01-15  Toon Moene  <toon@moene.indiv.nluug.nl>
3008
3009         * lang-specs.h: Enable preprocessing of source files
3010         ending in .F, .fpp, .FPP, .F90 and .F95.
3011
3012 2004-01-13  Toon Moene  <toon@moene.indiv.nluug.nl>
3013
3014         PR fortran/12912
3015         * lang-specs.h: Enable compilation of files ending
3016         in .f, .for and .FOR.
3017
3018 2004-01-11  Paul Brook  <paul@codesourcery.com>
3019
3020         * trans-stmt.c (gfc_trans_if_1): New function.
3021         (gfc_trans_if): Use it.
3022
3023 2004-01-11  Erik Schnetter  <schnetter@uni-tuebingen.de>
3024
3025         * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
3026         (gfc_option_t): Add max_identifier_length.
3027         * lang.opt: Add fmax-identifier-length.
3028         * match.c (parse_name): Use limit.
3029         * options.c (gfc_init_options): Set max_identifier_length.
3030         (gfc_handle_option): Ditto.
3031
3032 2004-01-11  Feng Wang  <fengwang@nudt.edu.cn>
3033
3034         * intrinsic.c (add_functions): Add resolve function to dcmplx.
3035         * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
3036         * iresolve.c (gfc_resolve_dcmplx): New function.
3037
3038 2004-01-10  Paul Brook  <paul@codesourcery.com>
3039
3040         * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
3041         * trans-types.c (gfc_sym_type): Handle external dummy procedures.
3042         (gfc_return_by_reference): Correct condition.
3043         (gfc_get_function_type): Ditto.
3044
3045 2004-01-10  Paul Brook  <paul@codesourcery.com>
3046
3047         * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
3048         types.
3049
3050 2004-01-10  Huang Chun  <chunhuang73@hotmail.com>
3051
3052         * iresolve.c: Use correct kind.
3053
3054 2004-01-10  Huang Chun  <chunhuang73@hotmail.com>
3055
3056         PR fortran/13467
3057         * trans-decl.c (gfc_create_module_variable):  Output array valued
3058         parameters.
3059
3060 2004-01-10  Paul Brook  <paul@codesourcery.com>
3061
3062         * resolve.c (resolve_branch): Get error message right way round.
3063
3064 2004-01-10  Canqun Yang <canqun@nudt.edu.cn>
3065
3066         * trans-array (gfc_conv_loop_setup): Adjust comment to track
3067         reality.
3068         (gfc_array_allocate): Don't count size of element twice.
3069
3070 2004-01-04  Paul Brook  <paul@codesourcery.com>
3071
3072         * lang.opt (i8, r8, std=*): Remove RejectNegative.
3073
3074 2004-01-04  Paul Brook  <paul@codesourcery.com>
3075
3076         * error.c (gfc_notify_std): New function.
3077         * gfortran.h (gfc_notify_std): Declare.
3078         (GFC_STD_*): Define.
3079         (gfc_option_t): Add warn_std and allow_std.
3080         * intrinsic.c (gfc_init_expr_extensions): Fix logic.
3081         (gfc_intrinsic_func_interface): Use gfc_notify_std.
3082         * check.c (check_rest): Use gfc_notify_std.
3083         * match.c (gfc_match_pause): Ditto.
3084         (gfc_match_assign): Ditto.
3085         (gfc_match_goto): Ditto.
3086         * resolve.c (resolve_branch): Ditto.
3087         * lang.opt: Add std=<foo> and w.
3088         * options.c (gfc_init_options): Set allow_std and warn_std.
3089         (gfc_handle_option): Handle OPT_std_* and OPT_w.
3090
3091 2004-01-01  Paul Brook  <paul@codesourcery.com>
3092
3093         * array.c (gfc_append_constructor): Take constructor, not expression.
3094         * data.c (struct gfc_expr_stack): Remove.
3095         (expr_stack): Remove.
3096         (find_con_by_offset): Rename from find_expr_in_con.
3097         (find_con_by_component): Rename from find_component_in_con.
3098         (gfc_get_expr_stack): Remove.
3099         (gfc_assign_data_value): Rewrite.
3100         (gfc_expr_push): Remove.
3101         (gfc_expr_pop): Remove.
3102         (gfc_advance_section): Rename from
3103         gfc_modify_index_and_calculate_offset.  Handle unbounded sections.
3104         (gfc_get_section_index): Handle unbounded sections.
3105         * gfortran.h: Update prototypes.
3106         * resolve.c (check_data_variable): Array section maight not be the
3107         last ref.
3108
3109 2004-01-01  Paul Brook  <paul@codesourcery.com>
3110
3111         PR fortran/13432
3112         * resolve.c (resolve_symbol): Allow assumed length function results.
3113
3114 2004-01-01  Steve Kargl  <sgk@troutmask.apl.washington.edu>
3115
3116         * match.c (gfc_match_pause): Fix spelling.
3117
3118 2004-01-01  Steven Bosscher  <stevenb@suse.de>
3119
3120         PR fortran/13251
3121         * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
3122         reference from the expression.
3123
3124 2003-12-26  Feng Wang  <fengwang@nudt.edu.cn>
3125
3126         * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
3127         dumping.
3128         * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
3129         (gfc_exec_op): New EXEC_LABEL_ASSIGN.
3130         (symbol_attribute):New variable attribute: assign.
3131         * io.c (resolve_tag):Integer variable is allowed.
3132         (match_dt_format): Add ASSIGN statement. Set assign flag.
3133         * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
3134         (gfc_match_assign): Add ASSIGN statement. Set assign flag.
3135         (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
3136         * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
3137         (next_statement): Add ST_LABEL_ASSIGNMENT.
3138         (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
3139         * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
3140         (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
3141         * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
3142         * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
3143         assign.  Put them into the stuct lang_decl.
3144         * trans-io.c (set_string): Add the assign statement.
3145         * trans-stmt.c (gfc_trans_label_assign): New function.
3146         (gfc_trans_goto): Translate ASSIGNED GOTO statement.
3147         * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
3148         * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
3149         * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
3150         (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
3151         (GFC_DECL_ASSIGN(node)): New macro to access flag.
3152
3153 2003-12-31  Huang Chun <chunhuang73@hotmail.com>
3154
3155         PR fortran/13434
3156         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
3157         minval/maxval.
3158
3159 2003-12-22  Toon Moene  <toon@moene.indiv.nluug.nl>
3160
3161         * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
3162         that arguments to subroutines/functions can't alias themselves, nor global
3163         memory.
3164
3165 2003-12-20  Steven Bosscher  <stevenb@suse.de>
3166
3167         * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
3168         * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
3169
3170 2003-12-12  Huang Chun <chunhuang73@hotmail.com>
3171
3172         * primary.c (match_substring): Fix substring bug for start point
3173         or end point is NULL.
3174         * trans-expr.c (gfc_conv_substring): Ditto
3175         * trans-types.c (gfc_sym_type): Get correct type of scalar
3176         character variables.
3177         * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
3178         derived type.
3179
3180 2003-12-10  Richard Henderson  <rth@redhat.com>
3181
3182         * options.c (gfc_post_options): Don't ever use rtl inlining.
3183
3184 2003-12-05  Canqun Yang  <canqun@nudt.edu.cn>
3185
3186         * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
3187         * trans-equivalence.c: Remove.
3188         * trans-decl.c (gfc_get_symbol_decl): Update to match.
3189         (gfc_generate_function_code): Ditto.
3190         * trans-array.c (gfc_conv_array_parameter): Ditto.
3191         * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
3192         (F95_ADDITIONAL_OBJS): Add stor-layout.o
3193         * trans.h (gfc_trans_equivalence): Remove.
3194         * gfortran.h (struct gfc_equiv): Add used field.
3195         (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
3196         equiv_offset fields.
3197
3198 2003-12-05  Richard Henderson  <rth@redhat.com>
3199
3200         * trans.c (gfc_build_addr_expr): New.
3201         (gfc_build_indirect_ref, gfc_build_array_ref): New.
3202         * trans.h: Declare them.
3203         * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
3204         trans-stmt.c, trans.c (*): Use them.
3205
3206         * f95-lang.c (gfc_post_options): Remove dead prototype.
3207         * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
3208         * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
3209         allocation size.
3210
3211 2003-12-01  Feng Wang  <fengwang@nudt.edu.cn>
3212
3213         * io.c (gfc_match_format): Check for missing format label.
3214
3215 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
3216
3217         PR fortran/13155
3218         * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
3219         from interfaces in modules.
3220
3221 2003-11-30  Paul Brook  <paul@nowt.org>
3222
3223         * trans-array.c (gfc_trans_g77_array): Make non-static.
3224         (gfc_trans_assumed_size): Remove.
3225         (gfc_trans_dummy_array_bias): Explicitly free temporary.
3226         * trans-array.h (gfc_trans_g77_array): Add prototype.
3227         (gfc_trans_assumed_size): Remove.
3228         * trans-decls.c (gfor_fndecl_push_context): Remove.
3229         (gfor_fndecl_pop_context): Remove.
3230         (gfc_build_function)decls): Don't create them.
3231         (gfc_trans_deferred_vars): Update to match. Remove dead code.
3232         * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
3233
3234 2003-11-30  Kejia Zhao  <kejia_zh@nudt.edu.cn>
3235
3236         * trans-array.c (gfc_conv_array_parameter): Simplify
3237         array argument passing for array name actual argument.
3238         * trans-expr.c (gfc_conv_function_call): Ditto
3239         * trans-types.c (gfc_is_nodesc_array):Ditto.
3240
3241 2003-11-30  Paul Brook  <paul@nowt.org>
3242
3243         * f95-lang.c (gfc_post_options): Move ...
3244         * options.c (gfc_post_options): .. to here.  Handle inlining options.
3245         * gfortran.h (gfc_post_options): Add prototype.
3246
3247 2003-11-28  Richard Henderson  <rth@redhat.com>
3248
3249         * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
3250
3251 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
3252
3253         * trans.h (has_alternate_specifier): New global variable.
3254         * match.c (gfc_match_call): Handle actual arguments associated with
3255         alternate return indicators.
3256         * trans-expr.c (gfc_conv_function_call): Ditto
3257         * trans-stmt.c (gfc_trans_call): Ditto
3258         (gfc_trans_return): Handle return statement with value.
3259         * trans-decl.c (gfc_generate_function_code): Handle functions with
3260         asterisk dummy.
3261         (gfc_get_fake_result_decl): Ditto
3262         * trans-types.c (gfc_get_function_type): Ditto
3263         * resolve.c (resolve_actual_arglist): Check alternate return indicators.
3264         (resolve_formal_arglist): Check asterisk dummy.
3265
3266 2003-11-27  Paul Brook  <paul@nowt.org>
3267
3268         * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
3269         allocation interface.
3270         (gfc_conv_ array_parameter): Ditto.
3271         (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
3272         * trans-array.c: Update prototype.
3273         * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
3274         (gfc_trans_auto_character_variable): Use new memory alloc interface.
3275         * trans-expr.c (gfc_conv_string_tmp): Ditto.
3276         (gfc_conv_function_call): Use gfc_conv_string_tmp.
3277         * trans-stmt.c (gfc_do_allocate):  Use new memory alloc interface.
3278         * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
3279         * trans.h (gfc_ss_info): Remove unused pdata field.
3280         * trans.c (gfc_create_var_np): Change T to V.
3281
3282 2003-11-26  Richard Henderson  <rth@redhat.com>
3283
3284         * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
3285         * trans-intrinsic.c (gfc_intrinsic_map): ... here.  Add SCALE,
3286         FRACTION, NEAREST, SET_EXPONENT.
3287         (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
3288         Fix GTY marking.  Remove unnecessary const's.
3289         (LIBM_FUNCTION): Rename from I_LIB.
3290         (LIBF_FUNCTION): New.
3291         (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
3292         conventions.  Assume the expr signature is correct.  Mark const.
3293         (gfc_conv_intrinsic_exponent): Use library functions.
3294         (gfc_conv_intrinsic_set_exponent): Remove.
3295         (gfc_conv_intrinsic_scale): Remove.
3296         (gfc_conv_intrinsic_nearest): Remove.
3297         (gfc_conv_intrinsic_fraction): Remove.
3298         (gfc_conv_intrinsic_function): Update.
3299         * trans-decl.c (gfor_fndecl_math_exponent4): New.
3300         (gfor_fndecl_math_exponent8): New.
3301         (gfc_build_intrinsic_function_decls): Set them.
3302         * trans.h: Declare them.
3303
3304 2003-11-25  Canqun Yang  <canqun@nudt.edu.cn>
3305
3306         * trans-common.c (gfc_layout_global_equiv): Locate the error for
3307         underflow COMMON block.
3308         (gfc_trans_one_common): Fix bug for size of COMMON block containing
3309         EQUIVALENCE object. Also fix typo in an error message.
3310
3311 2003-11-25  Diego Novillo  <dnovillo@redhat.com>
3312
3313         * Make-lang.in: Add check-gfortran to lang_checks.
3314         (check-f95): Alias for check-gfortran.
3315
3316 2003-11-25  Jason Merrill  <jason@redhat.com>
3317
3318         * Make-lang.in (f95.tags): Create TAGS.sub files in each
3319         directory and TAGS files that include them for each front end.
3320
3321 2003-11-24  Paul Brook  <paul@nowt.org>
3322
3323         PR fortran/13154
3324         * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
3325
3326 2003-11-24  Paul Brook  <paul@nowt.org>
3327
3328         * expr.c (simplify_const_ref): Return SUCCESS for things we don't
3329         handle.
3330         * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
3331
3332 2003-11-24  Paul Brook  <paul@nowt.org>
3333
3334         PR fortran/13105
3335         * array.c (gfc_array_ref_shape): Handle elemental dimensions.
3336         * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
3337
3338 2003-11-20  Richard Henderson  <rth@redhat.com>
3339
3340         * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
3341         (gfc_conv_array_base): Likewise.
3342         * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
3343         * trans-expr.c (gfc_conv_string_tmp): Likewise.
3344         * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
3345         * trans-stmt.c (gfc_trans_character_select): Likewise.
3346
3347 2003-11-13  Paul Brook  <paul@nowt.org>
3348
3349         * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
3350
3351 2003-11-13  Canqun Yang  <canqun@nudt.edu.cn>
3352
3353         * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
3354         (resolve_equivalence): New function.
3355         (resolve_equivalence_derived): New function.
3356
3357 2003-11-12  Richard Henderson  <rth@redhat.com>
3358
3359         * trans.c (gfc_trans_code): Use annotate_with_locus instead of
3360         annotate_all_with_locus.
3361
3362 2003-11-11  Canqun Yang  <canqun@nudt.edu.cn>
3363
3364         * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
3365         * trans-decl.c (gfc_finish_var_decl): Modified.
3366
3367 2003-11-08  Paul Brook  <paul@nowt.org>
3368
3369         PR fortran/12704
3370         * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
3371         arrays.
3372
3373 2003-11-06  Paul Brook  <paul@nowt.org>
3374
3375         * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
3376
3377 2003-11-02  Canqun Yang  <canqun@nudt.edu.cn>
3378
3379         * match.c (gfc_match_stopcode): Assign '0' to stop_code.
3380
3381 2003-10-27  Anthony Green  <green@redhat.com>
3382
3383         * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
3384         (f95.stagefeedback): Ditto.
3385
3386 2003-10-27  Andrew Pinski  <pinskia@physics.uc.edu>
3387
3388         PR fortran/12682
3389         * Make-lang.in (f95.stageprofile): Add.
3390         (f95.stagefeedback): Add.
3391
3392 2003-10-23  Richard Henderson  <rth@redhat.com>
3393
3394         * f96-lang.c (gfc_gimplify_expr): Remove.
3395         (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
3396         (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
3397
3398 2003-10-23  Richard Henderson  <rth@redhat.com>
3399
3400         * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
3401
3402 2003-10-20  Paul Brook  <paul@nowt.org>
3403
3404         * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
3405         * trans-stmt.c (gfc_trans_do_while): Ditto.
3406
3407 2003-10-17  Paul Brook  <paul@nowt.org>
3408
3409         * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
3410
3411 2003-10-17  Paul Brook  <paul@nowt.org>
3412
3413         * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
3414
3415 2003-10-17  Feng Wang  <wf_cs@yahoo.com>
3416
3417         * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
3418         (gfc_resolve_minloc): Ditto.
3419         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
3420         Return the value after subtracting the lower bound.
3421
3422 2003-10-16  Richard Henderson  <rth@redhat.com>
3423
3424         * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
3425
3426 2003-10-16  Steven Bosscher  <steven@gcc.gnu.org>
3427
3428         * lang.c: Remove -M option for now, it's in the way for C.
3429
3430 2003-10-14  Jason Merrill  <jason@redhat.com>
3431
3432         * Make-lang.in (f95.tags): New rule.
3433
3434 2003-10-13  Richard Henderson  <rth@redhat.com>
3435
3436         * trans.c (gfc_trans_code): Use annotate_all_with_locus.
3437
3438 2003-10-13  Paul Brook  <paul@nowt.org>
3439
3440         * trans-decl.c (generate_local_decl): Don't create junk variables.
3441
3442 2003-10-13  Paul Brook  <paul@nowt.org>
3443
3444         * resolve.c (resolve_formal_arglist): Use function result decl in
3445         preference to function decl.
3446
3447 2003-10-12  Richard Henderson  <rth@redhat.com>
3448
3449         * f95-lang.c (gfc_define_builtin): New const_p argument.  Set
3450         TREE_READONLY.  Update all callers.
3451
3452 2003-10-12  Feng Wang  <wf_cs@yahoo.com>
3453
3454         * iresolve.c (gfc_resolve_cshift): Change to match implementation.
3455         * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
3456         (gfc_is_intrinsic_libcall): Add CSHIFT.
3457
3458 2003-10-12  Richard Henderson  <rth@redhat.com>
3459
3460         * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
3461         (gfc_trans_array_constructor_value): Likewise.
3462         (gfc_conv_array_initializer): Likewise.
3463         * trans-stmt.c (gfc_trans_character_select): Likewise.
3464
3465 2003-11-12  Kejia Zhao  <kejia_zh@yahoo.com.cn>
3466
3467         * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
3468
3469 2003-10-11  Huang Chun  <jiwang@mail.edu.cn>
3470
3471         * check.c (gfc_check_repeat): Check arguments are scalar.
3472         (gfc_check_trim): New function.
3473         * intrinsic.h (gfc_check_trim): Add prototype.
3474         * intrinsic.c (add_functions): Use it.
3475         * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
3476         Decalare.
3477         * trans-decl.c: Ditto.
3478         (gfc_build_intrinsic_fucntion_decls): Set them.
3479         * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
3480         (gfc_conv_intrinsic_trim): New function.
3481         (gfc_conv_intrinsic_repeat): New function.
3482         (gfc_conv_intrinsic_function): Use them.
3483
3484 2003-10-11  Huang Chun  <jiwang@mail.edu.cn>
3485
3486         * trans-types.c (gfc_sym_type): Handle result variables.
3487
3488 2003-10-11  Huang Chun  <jiwang@mail.edu.cn>
3489
3490         * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
3491         gfc_get_character_type.
3492
3493 2003-10-11  Feng Wang  <wf_cs@yahoo.com>
3494
3495         * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
3496
3497 2003-10-11  Paul Brook  <paul@nowt.org>
3498
3499         * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
3500         (gfc_resolve_dprod): New function.
3501         (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
3502         * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
3503         (gfc_resolve_dprod): Declare.
3504         * intrinsic.c (add_functions): Use them.
3505         * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
3506
3507 2003-10-06  Richard Henderson  <rth@redhat.com>
3508
3509         * f95-lang.c (gfc_init_builtin_functions): Add clzll.
3510         * trans-intrinsic.c (call_builtin_clz): Use it.
3511
3512 2003-10-05  Paul Brook  <paul@nowt.org>
3513
3514         * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
3515         * trans-decl.c (gfc_generate_function_code): Set
3516         cfun->function_end_locus.
3517
3518 2003-09-24  Jason Merrill  <jason@redhat.com>
3519
3520         * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
3521         TREE_LOCUS.
3522
3523 2003-09-21  Lifang Zeng  <zlf605@hotmail.com>
3524         Paul Brook  <paul@nowt.org>
3525
3526         * Make-lang.in (F95_OBJS): Add fortran/data.o.
3527         * array.c (gfc_inser_constructor): New function.
3528         (gfc_get_constructor): New function.
3529         (gfc_free_constructor): Initialize offset and repeat.
3530         (iterator_stack): Remove.
3531         (expand_info): Add offset, component and repeat fields.
3532         (expand_constructor): Set them.
3533         (expand): Set new fields.
3534         (gfc_copy_constructor): Ditto. Avoid recursion.
3535         * gfortran.h: Add prototypes for new functions.
3536         (gfc_constructor): Add offset, component and repeat.
3537         (iteratio_stack): Move to here.
3538         * resolve.c (check_data_variable): Convert data values into variable
3539         initializers.
3540         (traverse_data_list): Build implicit loop chain.
3541         (gfc_resolve): Ditto.
3542         * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
3543         * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
3544         * trans-expr.c (gfc_conv_structure): Handle array initializers.
3545         (gfc_conv_expr): Update to match.
3546         * trans.h (gfc_conv_structure): Declare.
3547         * data.c: New file.
3548
3549 2003-09-20  Kejia Zhao  <kejia_zh@yahoo.com.cn>
3550
3551         * trans.h: Add declarations for gfor_fndecl_si_kind and
3552         gfor_fndecl_sr_kind.
3553         * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
3554         * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
3555         (g95_conv_intrinsic_sr_kind): New function.
3556         (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
3557         SELECTED_REAL_KIND.
3558
3559 2003-09-17  Lars Segerlund  <Lars.Segerlund@comsys.se>
3560
3561         * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
3562         instead of _4 and _8 as postfix for libgfortran calls.
3563
3564 2003-09-16  Paul Brook  <paul@nowt.org>
3565
3566         * array.c (compare_bounds): New function.
3567         (gfc_compare_array_spec): Use it.
3568
3569 2003-09-14  Paul Brook  <paul@nowt.org>
3570
3571         * primary.c (gfc_match_rvalue): Make sure sym->result is set.
3572         * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
3573
3574 2003-09-14  Paul Brook  <paul@nowt.org>
3575
3576         * check.c (dim_rank_check): Allow assumed bounds if requested.
3577         (gfc_check_lbound): Call it.
3578         (gfc_check_ubound): Ditto.
3579         (gfc_check_size): Change to match.
3580         * simplify.c (gfc_simplify_bound): New function.
3581         (gfc_simplify_lbound): New function.
3582         (gfc_simplify_ubound): New function.
3583         * intrinsic.h: Declare them.
3584         * intrinsic.c (add_functions): Use them.
3585
3586 2003-09-14  Paul Brook  <paul@nowt.org>
3587
3588         * io.c (format_lex): Initialize negative_flag.
3589         (check_format): Intialize repeat.
3590         * trans-io.c (gfc_new_nml_name_expr): Declare static.
3591         (gfc_new_var_expr): Ditto.
3592
3593 2003-09-14  Paul Brook  <paul@nowt.org>
3594
3595         * trans-array.c (gfc_conv_array_initializer): Handle derived types.
3596         * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
3597
3598 2003-09-12  Paul Brook  <paul@nowt.org>
3599
3600         * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
3601
3602 2003-09-12  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
3603
3604         * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
3605         for a correct expression.
3606
3607 2003-09-10  Kejia Zhao  <kejia_zh@yahoo.com.cn>
3608
3609         * trans-intrinsic.c (real_compnt_info): New struct.
3610         (prepare_arg_info): New function.
3611         (gfc_conv_intrinsic_set_exponent): New function.
3612         (gfc_conv_intrinsic_scale): New function.
3613         (gfc_conv_intrinsic_nearest): New function.
3614         (gfc_conv_intrinsic_fraction): New function.
3615         (gfc_conv_intrinsic_exponent): New function.
3616         (gfc_conv_intrinsic_spacing): New function.
3617         (gfc_conv_intrinsic_rrspacing): New function.
3618         (gfc_conv_intrinsic_function): Use them.
3619
3620 2003-08-24 XiaoQiang Zhang  (zhangapache@yahoo.com>
3621
3622         * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
3623         build_int_2 changed from (high, low) to (low, high).
3624         * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
3625         ioparm_namelist_read_mode, iocall_set_nml_val_int,
3626         iocall_set_nml_val_float, iocall_set_nml_val_char,
3627         iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
3628         (gfc_build_io_library_fndecls): Add variable initialization.
3629         (gfc_new_nml_name_expr, get_new_var_expr): New function.
3630         (build_dt): Add namelist support.
3631         * io.c (value): New variable.
3632         (check_format): Support FMT_H now.
3633
3634 2003-09-07  Paul Brook  <paul@nowt.org>
3635
3636         * io.c (gfc_resolve_dt): Error if format label is not defined.
3637
3638 2003-09-07  Kejia Zhao  <kejia_zh@yahoo.com.cn>
3639
3640         * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
3641         about case_switch's break. The other is about building the condition
3642         statement tree, which judges the argument in the range of the
3643         corresponding integer type.
3644         * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
3645         for the large values.
3646
3647 2003-09-05  Paul Brook  <paul@nowt.org>
3648
3649         * f95-lang.c (expand_function_body): Gimplify the function.
3650
3651 2003-09-04  Jeff Law  <law@redhat.com>
3652
3653         * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
3654         index zero!
3655
3656 2003-09-04  Paul Brook  <paul@nowt.org>
3657
3658         * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
3659         (gfc_expand_stmt): New function.
3660         (LANG_HOOKS_RTL_EXPAND_STMT): Define.
3661         (expand_function_body): Use tree_rest_of_compilation.
3662         * trans-decl.c (gfc_generate_function_code): Don't free cfun.
3663
3664 2003-09-03  Jeff Law  <law@redhat.com>
3665
3666         * f95-lang.c (gfc_init_builtin_functions): C arrays start at
3667         index zero!
3668
3669 2003-08-30  Paul Brook  <paul@nowt.org>
3670
3671         * f95-lang.c (builtin_function): Remove #if 0 code.
3672         (gfc_define_builtin): New function.
3673         (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
3674         * mathbuiltins.def: New file.
3675         * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
3676         (gfc_intrinsic_map): Use mathbuiltins.def.
3677         (gfc_intrinsic_builtin_t): Remove.
3678         (gfc_build_intrinsic_lib_fndecls): Update.
3679         * trans-types.c (gfc_init_types): Remove redundant initilaization of
3680         signed_size_type_node.
3681
3682 2003-08-29  Paul Brook  <paul@nowt.org>
3683
3684         * arith.c (gfc_real_kinds): Use correct minimum exponents.
3685
3686 2003-08-22  Kejia Zhao  <kejia_zh@yahoo.com.cn>
3687
3688         * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
3689         (gfc_conv_intrinsic_function): Add MODULO.
3690
3691 2003-08-22  Jason Merrill  <jason@redhat.com>
3692
3693         * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
3694
3695 2003-08-22  Andreas Jaeger  <aj@suse.de>
3696
3697         * Make-lang.in (f95.install-common): Add DESTDIR support.
3698         * (f95.install-info): Likewise.
3699         (f95.uninstall): Likewise.
3700
3701 2003-08-19  Diego Novillo  <dnovillo@redhat.com>
3702
3703         * trans-types.c (gfc_init_types): Initialize
3704         signed_size_type_node with size_type_node.
3705
3706 2003-08-18  Paul Brook  <paul@nowt.org>
3707
3708         * dependency.c (gfc_dependency): New enum.
3709         (check_another_array_ref): Remove.
3710         (gfc_get_array_from_component): Remove.
3711         (get_x): Remove.
3712         (get_range): Remove.
3713         (get_no_of_elements): Use mpz_t, not mpf_t.
3714         (transform_sections): New function.
3715         (gfc_check_range_range): Rename ...
3716         (gfc_check_section_vs_section): ... to this.  Use new function.
3717         (gfc_is_inside_range): Rewrite to match.
3718         (gfc_check_element_vs_section): Ditto.
3719         (gfc_check_element_vs_element): Ditto.
3720         (get_deps): Ditto.
3721         (gfc_dep_resolver): Ditto.  Remove unused parameter.
3722         * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
3723         gfc_check_element_vs_element, gfc_is_inside_range,
3724         gfc_get_array_from_component): Remove prototypes for static functions.
3725         (gfc_dep_resolver): Update prototype.
3726         * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
3727
3728 2003-08-15  Paul Brook  <paul@nowt.org>
3729
3730         * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
3731         return values to parent scope.
3732         (gfc_build_dummy_array_decl): Ditto.
3733
3734 2003-08-14  Paul Brook  <paul@nowt.org>
3735
3736         * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
3737         size of the type, not the pointer.
3738         * resolve.c (resolve_symbol): Give more accurate error message.
3739
3740 2003-08-10  Paul Brook  <paul@nowt.org>
3741
3742         * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
3743
3744 2003-08-10  Paul Brook  <paul@nowt.org>
3745
3746         * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
3747         type components.
3748
3749 2003-08-10  Chun Huang  <compiler@sohu.com>
3750
3751         * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
3752         (resolve_symbol): Ditto.
3753         * trans-expr.c (gfc_conv_statement_function): New function.
3754         (gfc_conv_function_expr): Use it.
3755
3756 2003-08-10  Paul Brook  <paul@nowt.org>
3757
3758         * trans-array.c (gfc_conv_ss_startstride): Handle functions.
3759         (walk_function_expr): Set section rank.
3760         * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
3761
3762 2003-08-10  Paul Brook  <paul@nowt.org>
3763
3764         * intrinsic.c (add_sym): Prefix names with correct string.
3765         (add_sym_0s): New function.
3766         (add_subroutines): Register abort.
3767
3768 2003-08-10  Erik Schnetter  <schnetter@uni-tuebingen.de>
3769
3770         * gfortran.h: Introduce options to control the mangling.
3771         * lang.opt: Likewise.
3772         * options.c (gfc_init_options): Handle the options.
3773         * trans-common.c (gfc_sym_mangled_common_id): New function.
3774         (gfc_build_common_decl): Call it.
3775         * trans-decl.c (gfc_sym_mangled_function_id): New function.
3776         (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
3777
3778 2003-08-09  Paul Brook  <paul@nowt.org>
3779
3780         * module.c (mio_symbol): Always ouput a namespace for formal args.
3781         (load_needed): Namespace now belong to their proper symbol.
3782         (gfc_dump_module): Change G95=>GFORTRAN.
3783
3784 2003-08-05  Paul Brook  <paul@nowt.org>
3785
3786         * options.c: Force -fg77-calls.
3787
3788 2003-08-02  Paul Brook  <paul@nowt.org>
3789
3790         * Makelang.in: Rename G95_* to GFORTRAN_*.
3791         * All sources: Rename G95_* to GFC_*.
3792
3793 2003-08-01  Paul Brook  <paul@nowt.org>
3794
3795         * fortran/Make-lang.in: Use GMPLIBS.
3796         * fortran/config-lang.in: Set need_gmp.
3797         * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
3798
3799 2003-07-27  Andreas Jaeger  <aj@suse.de>
3800
3801         * trans-decl.c (gfc_generate_constructors): Convert prototype to
3802         ISO C90.
3803         * trans-const.c (gfc_init_constants): Likewise.
3804         * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
3805
3806         * gfortranspec.c: Convert to ISO C90.
3807         (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
3808
3809 2003-07-26  Paul Brook  <paul@nowt.org>
3810
3811         * lang.opt: Add -fdump-parse-tree.
3812         * options.c (gfc_handle_option): Ditto.
3813         * resolve.c (resolve_forall_iterators): Convert to proper type.
3814         * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
3815
3816 2003-07-26  Paul Brook  <paul@nowt.org>
3817
3818         * Makefile.in: Add build dependencies on files common with rest of gcc.
3819
3820 2003-07-26  Lifang Zeng  <zlf605@hotmail.com>
3821
3822         * trans.h: Declare g95_trans_pointer_assignment.
3823         * trans-expr.c (g95_trans_pointer_assignment): New function.
3824         (g95_trans_pointer_assign): Use it.
3825         * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
3826         (g95_trans_pointer_assign_need_temp): New function.
3827
3828 2003-07-26  Paul Brook  <paul@nowt.org>
3829
3830         * gfortran.texi: Replace references to g95.
3831
3832 2003-07-26  Paul Brook  <paul@nowt.org>
3833
3834         Rename g95_* to gfc_*.
3835
3836 2003-07-25  Paul Brook  <paul@nowt.org>
3837
3838         * gfortran.h: Rename from g95.h.
3839         * trans-types.c (boolean_type_node, booelan_true_node,
3840         boolean_false_node): Remove.
3841         * trans-types.h: Ditto.
3842
3843 2003-07-25  Chun Huang  <compiler@sohu.com>
3844
3845         * parse.c (accept_statement): Implement BLOCK DATA statement.
3846         * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
3847         variables.
3848
3849 2003-07-24  Lifang Zeng  <zlf605@hotmail.com>
3850
3851         * trans-stmt.c (temporary_list): Define.
3852         (g95_trans_assign_need_temp): New function.
3853         (g95_trans_forall_1): Modified for WHERE.
3854         (g95_trans_where_assign): Modified.
3855         (g95_trans_where_2): Modified.
3856         (g95_evaluate_where_mask): Modified.
3857         (g95_trans_where): Modified.
3858         (g95_get_temp_expr): Removed.
3859         (g95_add_to_where_stmt_list): Removed.
3860         (compute_overall_iter_number): Modified for WHERE.
3861         * trans.h: Remove where_stmt_list.
3862
3863 2003-07-24  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
3864
3865         * lang.opt: Correct description of options -J and -M.
3866
3867 2003-07-23  Steven Bosscher   <steven@gcc.gnu.org>
3868
3869         * lang.opt: Move help text to here.
3870         * lang-options.h: Remove.
3871
3872 2003-07-23  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
3873         * iresolve.c (g95_resolve_transpose): Proper variable in switch.
3874         * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
3875         on kind.
3876
3877 2003-07-22  Steven Bosscher  <steven@gcc.gnu.org>
3878         Paul Brook  <paul@nowt.org>
3879
3880         * check.c (check_rest): Use global pedantic flag.
3881         * io.c (data_desc): Ditto.
3882         * error.c (g95_warning, g95_warning_now): Use global flag.
3883         * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
3884         (expand_function_body): Update to new prototypes.
3885         (g95_init): Use new option names.
3886         * g95.h (g95_option_t): Standardize names.
3887         (g95_init_options, g95_handle_option): Update prototypes.
3888         * interface.c: Use new option names.
3889         * match.c: Ditto.
3890         * module.c: Ditto.
3891         * parse.c: Ditto.
3892         * primary.c: Ditto.
3893         * resolve.c: Ditto.
3894         * scanner.c: Ditto.
3895         * simplify.c: Ditto.
3896         * symbol.c: Ditto.
3897         * trans-array.c: Ditto.
3898         * trans-expr.c: Ditto.
3899         * trans-types.c: Ditto.
3900         * trans-decl.c: Ditto.
3901         (g95_build_library_function_decl): Remove obsolete VPARAMS.
3902         * trans.h: Ditto.
3903         * options.c (g95_display_help): Remove.
3904         (g95_init_options): Convert to new scheme.
3905         (set_Wall): Ditto
3906         (g95module_option): Ditto, rename from g95_parse_arg.
3907         (g95_handle_module_path_options): New function.
3908         * trans-equivalence.c: Fix error message.
3909         * lang.opt: Corrections.
3910
3911 2003-07-21  Steven Bosscher  <steven@gcc.gnu.org>
3912
3913         * lang.opt: New file.
3914
3915 2003-07-21  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
3916
3917         * decl.c (match_attr_spec): Set colon_seen.
3918
3919 2003-07-14  Paul Brook  <paul@nowt.org>
3920
3921         * trans-array.c: Update comment.
3922         (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
3923         * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
3924         minmaxloc,minmaxval): Ditto.
3925         * trans-io.c (g95_trans_transfer): Ditto.
3926         * trans-stmt.c: Remove unneeded prototypes.
3927         (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
3928         (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
3929         (compute_inner_temp_size): Remove bits of dead code. Add comments.
3930         Don't share loopinfo.
3931         (compute_overall_iter_number): Declare as static.
3932         (allocate_temp_for_forall_nest): Ditto.
3933         (g95_trans_forall_1): Don't pass shared loopinfo.
3934         * trans.c (g95_start_block): Expand comment.
3935
3936 2003-07-12  Paul Brook  <paul@nowt.org>
3937
3938         * arith.c (g95_index_integer_kind): Remove unused initializer.
3939         * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
3940         index by size of element.
3941         (generate_loop_for_rhs_to_temp): Ditto.
3942         (allocate_temp_for_forall_nest): Use element size, not index size.
3943
3944 2003-07-11  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
3945
3946         * arith.c (g95_index_integer_kind): Add a TODO.
3947         * simplify.c (g95_simplify_nearest): Add a TODO.
3948
3949 2003-07-09  Chun Huang  <compiler@sohu.com>
3950
3951         * trans.h: Add declarations for gfor_fndecl_string_scan and
3952         gfor_fndecl_string_verify.
3953         * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
3954         * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
3955         (g95_conv_intrinsic_verify): New function.
3956         (g95_conv_intrinsic_function): Add SCAN and VERIFY.
3957         * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
3958         of parameter 'BACK=.TRUE.'
3959
3960 2003-07-05  Lifang Zeng  <zlf605@hotmail.com>
3961
3962         * trans-stmt.c (iter_info, forall_info): Define.
3963         (g95_trans_forall_block): Remove.
3964         (g95_trans_forall_loop): Use forall info blocks.
3965         (g95_trans_nested_forall_loop): New function.
3966         (g95_do_allocate): Handle things other than logical masks.
3967         (generate_loop_for_temp_to_lhs): New function.
3968         (generate_loop_for_rsh_to_temp): New function.
3969         (compute_inner_temp_size): New function.
3970         (compute_overall_iter_number): New function.
3971         (allocate_temp_for_forall_nest): New function.
3972         (g95_trans_forall): Move body ...
3973         (g95_trans_forall_1): ... to here.  Handle loops with temporaries.
3974
3975 2003-07-02  Paul Brook  <paul@nowt.org>
3976
3977         * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
3978         in correct scope.  Change callers to match.
3979         * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
3980         * iresolve.c (g95_resolve_reshape): Only use constant shapes.
3981
3982 2003-07-02  Paul Brook  <paul@nowt.org>
3983
3984         * trans-array.c (g95_conv_loop_setup): Remove dead var.  Use
3985         expression shape for all expressions.
3986         * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
3987
3988 2003-07-03  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
3989
3990         * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
3991         g95_parse_arg), intrinsic.c (g95_convert_type): support of
3992         -Wconversion.
3993         * intrinsic.c, g95.h: Add g95_convert_type_warn,
3994         * resolve.c (g95_resolve_index): Call it.
3995
3996 2003-07-02  Paul Brook  <paul@nowt.org>
3997
3998         * iresolve.c (g95_resolve_reshape): Set expression shape.
3999         (g95_resolve_shape): Ditto.
4000         * simplify.c (g95_simplify_shape): Move common code outside condition.
4001         * trans-array.c (g95_conv_array_initializer): Teach it how to count.
4002
4003 2003-07-01  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
4004
4005         * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
4006         conformance checks.
4007
4008 2003-06-29  Paul Brook  <paul@nowt.org>
4009
4010         * array.c (g95_simplify_iterator_var): Don't bother with return value.
4011         * expr.c (find_array_element, find_component_ref): New functions.
4012         (remove_subobject_ref): New function.
4013         (simplify_const_ref): Use them.  Rename from simplify_component_ref.
4014         (simplify_ref_chain): New function.
4015         (g95_simplify_expr): Use it.  Simplify parameter variable subobjects.
4016         (g95_specification_expr): Simplify the expression.
4017         * resolve.c (resolve_operator): Check simplifications return code.
4018         (g95_resolve_expr): Ditto.
4019
4020 2003-06-26  Paul Brook  <paul@nowt.org>
4021
4022         * expr.c (simplify_component_ref): New function.
4023         (g95_simplify_expr): Use it.
4024         * resolve.c (resolve_structure_cons): Handle references.
4025
4026 2003-06-25  Paul Brook  <paul@nowt.org>
4027
4028         * trans-io.c (build_dt): Handle internal units.
4029
4030 2003-06-25  Canqun Yang  <canqun@yahoo.com.cn>
4031
4032         * trans-common.c (g95_build_common_decl): Array index range starts at 0.
4033         (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
4034         Use g95_array_index_type instead of integer_type_node.
4035         (g95_build_common_decl, g95_set_common_master_type): Use
4036         g95_character1_type_node instead of char_type_node.
4037         * trans-equivalence.c (g95_layout_local_equiv): As above.
4038
4039 2003-06-24  Steven G. Kargl  <kargls@attbi.com>
4040
4041         * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
4042         remove last remains of -fquiet.
4043
4044 2003-06-22  Paul Brook  <paul@nowt.org>
4045
4046         * resolve.c (resolve_operator): Don't fail if we can't simplify.
4047         (g95_resolve_expr): Ditto.
4048         (resolce_code): Mark as static.
4049         * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
4050         gimplifer doesn't (yet).
4051
4052 2003-06-20  Paul Brook  <paul@nowt.org>
4053
4054         * g95.h: Add ST_PAUSE and EXEC_PAUSE.
4055         * match.c (g95_match_if): Add ST_PAUSE.
4056         (g95_match_stopcode): New function.
4057         (g95_match_pause, g95_match_stop): Use it.
4058         * parse.c (g95_ascii_statement): Handle ST_PAUSE.
4059         (decode_stmt, next_statement, parse_executable): Ditto.
4060         * resolve.c (resolve_code): Ditto.
4061         * st.c (g95_free_statement): Ditto.
4062         * trans-stmt.c (g95_trans_pause): New function.
4063         * trans-stmt.h: Declare it.
4064         * trans.c (g95_trans_code): Use it.
4065         * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
4066         Declare.
4067         (g95_build_builtin_function_decls): Initialize them.
4068         * trans.h: Ditto.
4069         * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
4070
4071 2003-06-18  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
4072
4073         * io.c (g95_match_open , g95_match_close, g95_match_inquire,
4074         match_filepos): Fix error handling.
4075
4076 2003-06-18  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
4077
4078         * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
4079         Add assertions on arguments.
4080         * resolve.c (expression_shape): Remove useless &.
4081         * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
4082         g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
4083         g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
4084         g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
4085         g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
4086         g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
4087         (g95_simplify_not, g95_simplify_scale): Add assertions.
4088
4089 2003-06-15  Paul Brook  <paul@nowt.org>
4090
4091         Clean up stuff to work with the ssa optimizers.
4092         * convert.c (convert): Handle BOOLEAN_TYPEs.
4093         * f95-lang.c (g95_truthvalue_conversion): Implement.
4094         * trans-array.c (g95_trans_array_constructor_value): Group multiple
4095         scalar values.
4096         * trans.h (g95_truthvalue_conversion): Declare.
4097         * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
4098         * trans-stmt.c (g95_trans_character_select): Don't create array
4099         assignments.  Mark labels as indirect jump targets.
4100         * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
4101         (g95_get_dtype_cst): Handle LOGICAL types.
4102
4103 2003-06-14  Paul Brook  <paul@nowt.org>
4104
4105         * f95-lang.c (g95_gimplify_expr): New function.
4106         * trans-array.c (g95_trans_array_constructor_value): Don't create
4107         array assignments.
4108         (g95_conv_expr_descriptor): Rename simple->gimple.
4109         * trans-expr.c (conv_expr_op): Use proper logical operators.
4110         * trans-intrinsic.c (build_fixbound_expr): New function.
4111         (build_fix_expr): Ditto.
4112         (g95_conv_intinsic_aint): Use them. Use builtin functions.
4113         (g95_conv_intrinsic_function): Add FLOOR and CEILING.
4114
4115 2003-06-10  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
4116
4117         * array.c (g95_compare_array_spec): Remove unreachable code.
4118         * expr.c (g95_copy_expr): Likewise.
4119         * intrinsic.c (g95_convert_type): Likewise.
4120         * misc.c (g95_code2string): Likewise.
4121         * simplify.c (g95_simplify_ishft, g95_simplify_real,
4122         g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
4123         * trans-stmt.c (g95_trans_select): Likewise.
4124         * primary.c (extend_ref): Add an assertion.
4125         * simplify.c (g95_convert_constant): Add const.
4126         * intrinsic.h: Remove g95_check_x_ni.
4127         * f95-lang.c (g95_finish): Call g95_release_include_path.
4128
4129 2003-06-10  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
4130
4131         * resolve.c (resolve_contained_functions): Fix typo introduced on
4132         2003-01-13.
4133
4134 2003-06-09  Paul Brook  <paul@nowt.org>
4135
4136         * g95.h: Include system.h not hwint.h.
4137         * many: use safe-ctype.h not ctype.h.  Change isalpha -> ISALPHA, etc.
4138         * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
4139
4140 2003-06-09  Paul Brook  <paul@nowt.org>
4141
4142         * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
4143         * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
4144         * trans-decl.c (g95_add_decl_to_functions): Make non-static.
4145         (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
4146         (g95_generate_function_code): Translate COMMON and EQUIVALENCE
4147         objects.
4148         * trans.h (g95_trans_equivalence, g95_trans_common,
4149         g95_add_decl_to_function): Declare.
4150         * trans-common.c, trans-equivalence.c: New files.
4151
4152 2003-06-08  Steven Bosscher  <steven@gcc.gnu.org>
4153
4154         * intrinsic.c (g95_intrinsic_extension): Remove.
4155         (add_functions): Substitute g95_check_x for g95_check_x_ni
4156         everywhere.
4157         (g95_init_expr_extensions): New function.
4158         (g95_intrinsic_func_interface): Use it.
4159         * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
4160         * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
4161         g95_check_precision, g95_check_present, g95_check_radix,
4162         g95_check_range, g95_check_selected_real_kind): Do not set
4163         g95_intrinsic_extension.
4164         (g95_check_x_ni): Remove now duplicate of g95_check_x.
4165
4166         * expr.c (check_inquiry): Add FIXME, fixup some code style.
4167
4168 2003-06-06  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
4169
4170         * g95.h (ref_type): Name this type explicitly.
4171         * module.c (MIO_NAME): Add specialisations of mio_name.
4172         (mio_symbol_attribute, mio_typespec, mio_array_ref,
4173         mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
4174         (ab_attribute): Name this type explicitly.
4175         (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
4176
4177 2003-06-05  Kejia Zhao  <kejia_zh@yahoo.com.cn>
4178
4179         * trans-intrinsic.c (g95_conv_allocated): New function.
4180         (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
4181
4182 2003-06-05  Steven Bosscher  <steven@gcc.gnu.org>
4183
4184         * f95-lang.c: Don't include g95-support.h
4185         (g95_mark_addressable): Add prototype.
4186         (g95_init_decl_processing): Remove C front end hack.
4187         * f95-tree.c: Remove file.
4188         * support.c: Remove file.
4189         * g95-support.h: Remove file.
4190         * trans-types.c (g95_init_types): Set up boolean
4191         type related tree nodes.
4192         * Make-lang.in: Remove rules for dead files and
4193         dependencies on them.
4194
4195 2003-06-05  Steven Bosscher  <steven@gcc.gnu.org>
4196
4197         * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
4198         C front end dependency.  Also, convert.c does not depend on
4199         g95-support.h anymore.
4200         * convert.c: Don't include c-common.h and g95-support.h
4201         * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
4202         (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
4203         stmts_are_full_exprs_p, current_stmt_tree,
4204         current_scope_stmt_stack): Remove.
4205         * g95-support.h (unsigned_conversion_warning): Kill proto.
4206         (boolean_type_node, boolean_true_node, boolean_false_node):
4207         Don't define here.  Instead, make then true tree nodes in
4208         trans-types.
4209         * support.c (c_global_trees): Die, C front end, die!!!
4210         (g95_init_c_decl_hacks): Don't touch intmax_type_node,
4211         uintmax_type_node, string_type_node and const_string_type_node.
4212         (decl_constant_value, overflow_warning): Make static functions.
4213         They are in death row too, though.
4214         (default_conversion, c_expand_asm_operands): Remove.
4215         * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
4216         trans.c: Don't include c-common.h.
4217         * trans-types.c (boolean_type_node, boolean_true_node,
4218         boolean_false_node): Make them real tree nodes.
4219         * trans-types.h (intmax_type_node, string_type_node,
4220         const_string_type_node): Hack to work around C dependencies
4221         in builtin-types.def.
4222
4223 2003-06-04  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
4224
4225         * decl.c (decl_types): Add some iterators-like sentinels.
4226         * decl.c (match_attr_spec): Use them.
4227         Use "decl_types" instead of "int".
4228         Add cast in call to g95_match_strings.
4229         * dump-parse-tree.c (g95_show_namespace):  Use "g95_intrinsic_op"
4230         instead of "int".
4231         * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
4232         (g95_interface_info): Use "g95_intrinsic_op".
4233         * dump-parse-tree.c (g95_show_namespace): Use them.
4234         * interface.c (g95_check_interfaces): Use them.
4235         * module.c (read_module, write_module): Use them.
4236         * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
4237         Use "g95_intrinsic_op".
4238         * interface.c (check_operator_interface): Use "g95_intrinsic_op".
4239         Add a default case in switch statement.
4240         * intrinsic.h (g95_generic_isym_id): Moved to...
4241         * g95.h (g95_generic_isym_id): here.
4242         (g95_intrinsic_sym): Use "g95_generic_isym_id".
4243         * intrinsic.c (make_generic): Use "g95_generice_isym_id".
4244         * trans-intrinsic.c (g95_intrinsic_map_t,
4245          g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
4246         * match.c (g95_match_intrinsic_op): Add cast in call to
4247         g95_match_strings.
4248
4249 2003-06-03  Steven Bosscher  <steven@gcc.gnu.org>
4250
4251         * support.c (skip_evaluation, warn_conversion, lvalue_p,
4252         lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
4253         constant_fits_type_p, convert_and_check,
4254         unsigned_conversion_warning): Remove these ugly remnants
4255         we inherited from the C front end.
4256         (function_types_compatible): Remove '#if 0'-edcode.
4257         (build_modify_expr): Likewise.
4258         (convert_for_assignment): Don't use the deceased functions.
4259         The parameter fundecl is now unused.
4260         (decl_constant_value): Always just return decl.  In fact
4261         this function is not used at present, but it might be in
4262         the future, when we start using the tree inliner.
4263         (overflow_warning, default_conversion, c_expand_asm_operands):
4264         Abort when these are called, they are part of the C type
4265         checking implementation and therefore poison to Fortran.
4266
4267 2003-06-04  Steven Bosscher  <steven@gcc.gnu.org>
4268
4269         * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
4270         c-pretty-print.o and c-dump.o.  Add a comment on why we
4271         depend on c-semantics.c.
4272         * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
4273         Don't use the C front end tree dumper hook to dump the
4274         language specific tree representation -- we don't have
4275         one.  So instead, inherit the default langhook.
4276
4277 2003-06-02  Paul Brook  <paul@nowt.org>
4278
4279         * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
4280
4281 2003-06-02  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
4282
4283         * check.c (g95_check_associated): Use proper types.  Remove
4284         extraneous argument in call to g95_error().
4285
4286 2003-06-02  Kejia Zhao  <kejia_zh@yahoo.com.cn>
4287
4288         * resolve.c (resolve_operator): Make logical operands convert to the
4289         type with higher kind.
4290
4291 2003-06-02  Kejia Zhao  <kejia_zh@yahoo.com.cn>
4292
4293         * check.c (g95_check_associated): Make sure both pointer and target has
4294         the same type and rank. Null pointer or array section with vector
4295         subscript as target are not allowed.
4296         * trans.h: Declare gfor_fndecl_associated.
4297         * trans-decl.c: (g95_build_builtin_function_decls): Initialize
4298         gfor_fndecl_associated.
4299         * trans-intrinsic.c (g95_conv_associated): New function.
4300         (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
4301
4302 2003-06-02  Kejia Zhao  <kejia_zh@yahoo.com.cn>
4303
4304         * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
4305         according to POINTER itself rather than TARGET.
4306         (g95_conv_expr_descriptor): Make lbound start at 1.
4307         * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
4308
4309 2003-06-01  Paul Brook  <paul@nowt.org>
4310
4311         * expr.c (g95_type_convert_binary): Make it match the standard.
4312         * g95.texi: Remove dead link.
4313
4314 2003-06-01  Steven Bosscher  <steven@gcc.gnu.org>
4315
4316         * g95.texi: Cleanup somewhat in preparation for inclusion
4317         in GCC CVS.
4318
4319 2003-05-23  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
4320             Canqun Yang  <canqun@yahoo.com.cn>
4321
4322         * resolve.c (compare_bound_int, resolve_where_shape): Proper return
4323         type.
4324         (g95_find_forall_index): Return proper value.
4325         (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
4326         compare the return value from g95_find_forall_index.
4327
4328 2003-05-23  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
4329         * g95.h, io.c (g95_st_label): Remove "length".
4330         (g95_symtree): Remove "link".
4331         (g95_case): Remove "code".
4332         * arith.c, arith.h (g95_compare_string, g95_convert_integer,
4333         g95_convert_real): Make an argument pointer to const.
4334         * decl.c (colon_seen): Add a TODO.
4335         * interface.c (g95_compare_types): Fix typo.
4336         * interface.c (compare_interfaces): Preserve value of "p".
4337         * intrinsic.c (sort_actual): Remove "i".
4338         * match.c (g95_match_assign): Proper type in call to g95_match().
4339         * parse.c (next_free): Avoid duplicate call due to macro.
4340         * parse.c (check_statement_label): wrong type in call to g95_error.
4341         * primary.c (match_real_constant): Add a TODO.
4342         * resolve.c (resolve_select):  Remove useless conditional.
4343         * simplify.c (g95_simplify_repeat): Proper assignment to
4344         "value.character.string".
4345         * simplify.c (g95_simplify_reshape): Wrong variable in call to
4346         g95_error.
4347
4348 2003-05-20  Canqun Yang  <canqun@yahoo.com.cn>
4349
4350         * trans-stmt.c: Remove unnecessary include file defaults.h.
4351
4352 2003-05-19  Lifang Zeng  <zlf605@hotmail.com>
4353
4354         * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
4355         stride.
4356         (g95_trans_forall): Allow arbitrary number of FORALL indexes and
4357         actual variables used as FORALL indexes.
4358
4359 2003-05-15  Paul Brook  <paul@nowt.org>
4360
4361         * trans-array.c (g95_trans_static_array_pointer): Use
4362         null_pointer_node.
4363         (g95_trans_deferred_array): Initialize static array pointers.
4364         * trans-expr.c (g95_conv_function_call): Use formal arglist to
4365         correctly pass POINTER and absent CHARACTER arguments.
4366
4367 2003-05-14  Lifang Zeng  <zlf605@hotmail.com>
4368
4369         * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
4370         (g95_resolve_forall_body): Resolve FORALL body.
4371         (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
4372         (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
4373         (g95_find_forall_index): Check whether the FORALL index appears in
4374         the expression or not.
4375         (resolve_code): Modified.
4376
4377 2003-05-14  Paul Brook  <paul@nowt.org>
4378
4379         * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
4380
4381 2003-05-13  Paul Brook  <paul@nowt.org>
4382
4383         * trans-types.c (g95_max_array_element_size): Now a tree node.
4384         (g95_init_types): Work out max size properly.
4385         (g95_get_dtype_cst): Modify to match.
4386
4387 2003-05-11  Paul Brook  <paul@nowt.org>
4388
4389         * trans-io.c (add_case): Create a label decl for case labels.
4390
4391 2003-05-11  Paul Brook  <paul@nowt.org>
4392
4393         * arith.c (g95_integer_index_kind): New variable.
4394         * f95-lang.c (g95_init): Move frontend initialization here ...
4395         (g95_post_options): ... from here.
4396         * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
4397         * intrinsic.c (add_functions): Use index kinds.
4398         * iresolve.c: Convert to index_kind where needed.
4399         * resolve.c (g95_resolve_index): Make public, use index_kind.
4400         (resolve_array_ref): Adjust to match.
4401         * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
4402         * trans-stmt.c: Ditto.
4403         * trans-types.c: Ditto.
4404         * trans-types.h (g95_array_index_kind): Remove declaration.
4405         * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
4406
4407 2003-05-07  Paul Brook  <paul@nowt.org>
4408
4409         * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
4410         * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
4411         of bound indices.
4412
4413 2003-05-07  Paul Brook  <paul@nowt.org>
4414
4415         * trans-array.c (trans_static_array_pointer,
4416         g95_trans_array_constructor_value, g95_conv_array_initializer,
4417         g95_conv_structure): CONSTRUCTOR nodes only have one operand.
4418         (g95_add_loop_ss_code): Convert subscripts to the correct type.
4419         * trans-stmt.c (g95_trans_character_select): Ditto.
4420         * trans-types.c (g95_init_types): Ditto.
4421
4422 2003-05-07  Steven Bosscher  <steven@gcc.gnu.org>
4423
4424         * f95-lang.c (expand_function_body): Use input_line, not lineno.
4425         * trans-decl.c (g95_generate_function_code,
4426         g95_generate_constructors): Likewise.
4427         * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
4428         g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
4429         Likewise.
4430
4431 2003-05-07  Kejia Zhao  <kejia_zh@yahoo.com.cn>
4432         * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
4433         with components point to the DERIVED type itself, and two DERIVED
4434         type with components point to each other.
4435         * trans-expr.c (g95_conv_componet_ref): Modified
4436
4437 2003-05-07  Kejia Zhao  <kejia_zh@yahoo.com.cn>
4438         * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
4439         null_pointer_node.
4440         (g95_trans_pointer_assign): Implement Nullify.
4441
4442 2003-05-01  Paul Brook  <paul@nowt.org>
4443
4444         * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
4445         * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
4446
4447 2003-05-01  Paul Brook  <paul@nowr.org>
4448
4449         * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
4450         trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
4451         IS_EMPTY_STMT.
4452
4453 2003-05-01  Canqun Yang  <canqun@yahoo.com.cn>
4454
4455         * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
4456         CASE_LABEL_EXPR.
4457
4458 2003-04-28  Paul Brook  <paul@nowt.org>
4459
4460         * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
4461         as their kind suggests.
4462         (g95_resolve_reshape): Ditto.
4463
4464 2003-04-28  Chun Huang  <compiler@sohu.com>
4465
4466         * trans-expr.c (g95_conv_substring_expr): New function.
4467         (g95_conv_expr): Use it.
4468
4469 2003-04-28  Paul Brook  <paul@nowt.org>
4470
4471         * iresolve.c (g95_resolve_transpose): Make it match the
4472         implementation.
4473         * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
4474
4475 2003-04-18  Steven Bosscher  <steven@gcc.gnu.org>
4476
4477         * trans-types.c (g95_add_field_to_struct): New function to
4478         add a field to a UNION_TYPE or RECORD_TYPE.
4479         * trans-types.h (g95_add_field_to_struct): Prototype.
4480         (g95_get_derived_type): Use g95_add_field_to_struct to add
4481         components.
4482         * trans-io.c (g95_add_field): Remove.
4483         (ADD_FIELD): Use new g95_add_field_to_struct function.
4484         (ADD_STRING): Likewise.
4485         * trans-stmt.c (g95_trans_select): Likewise.
4486         (g95_add_field): Remove duplicated function.
4487
4488 2003-04-18  Canqun Yang  <canqun@yahoo.com.cn>
4489
4490         Port implementation for CHARACTER SELECT from Andy's tree.
4491         * trans-stmt.c (g95_trans_character_select): Implement character
4492         select. (g95_add_field): New function.
4493         * trans-decl.c: Declare 'gfor_gndecl_select_string'.
4494         (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
4495         * g95.h (struct g95_case): Add field 'int n'.
4496         * trans.h: Declare 'gfor_fndecl_select_string'.
4497
4498 2003-04-18  Steven Bosscher  <steven@gcc.gnu.org>
4499
4500         * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
4501         (g95_insert_bbd): Die on duplicates.
4502         * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
4503
4504 2003-04-14  Steven Bosscher  <steven@gcc.gnu.org>
4505
4506         * g95.texi: Require GMP 4.0 -- like we actually
4507         do.  Explain the testsuite and what-goes-where.
4508         Don't use undefined texinfo symbol.  Break very
4509         long line.  Remove finished item from the list
4510         of open projects.
4511
4512 2003-04-11  Canqun Yang  <canqun@yahoo.com.cn>
4513
4514         * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
4515         LOGICAL type.
4516
4517 2003-04-10  Canqun Yang  <canqun@yahoo.com.cn>
4518
4519         * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
4520         (g95_trans_forall_body): New function.
4521
4522 2003-04-10  Canqun Yang  <canqun@yahoo.com.cn>
4523
4524         * resolve.c (resove_where): New function.
4525         (resolve_where_shape): New function.
4526         (resolve_code): Add call to 'resolve_where'
4527         * trans-stmt.c (g95_trans_where): Modified.
4528         (g95_trans_where_2): New function.
4529         (g95_trans_where_assign): New function.
4530         (g95_evaluate_where_mask): New function.
4531         (g95_add_to_stmt_list): New function.
4532         (g95_get_temp_expr): New function.
4533         * trans.h (where_stmt_list): New structure.
4534
4535 2003-04-10  Paul Brook  <paul@nowt.org>
4536
4537         * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
4538         (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
4539
4540 2003-04-10  Steven Bosscher  <steven@gcc.gnu.org>
4541
4542         Update after mainline -> tree-ssa-branch merge.
4543         * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
4544         call.
4545         (g95_init): Update for new lang_hooks definition.
4546         (g95_post_options): New langhook.
4547         (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
4548         * scanner.c (g95_new_file): Comment update.
4549
4550 2003-04-09  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
4551
4552         * g95.h, lang-options.h: Add -Wimplicit-interface.
4553         * options.c (g95_init_options, g95_parse_arg): Set it.
4554         * interface.c (check_intents): Warn about call with implicit
4555         interface.
4556         * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
4557         g95_procedure_use.
4558
4559 2003-04-05  Paul Brook  <paul@nowt.org>
4560
4561         * iresolve.c (g95_resolve_spread): Don't resole based on type.
4562         * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
4563
4564 2003-03-29  Paul Brook  <paul@nowt.org>
4565
4566         * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
4567         (g95_resolve_unpack): Ditto.
4568         * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
4569         (g95_conv_intrinsic_function): Use it.  Remove PACK and UNPACK.
4570         (g95_is_intrinsic_libcall): Add PACK and UNPACK.
4571
4572 2003-03-25  Paul Brook  <paul@nowt.org>
4573
4574         * arith.c (g95_unary_user, g95_user): Remove dead functions.
4575         * arith.h: Ditto.
4576         * array.c (g95_free_array_ref): Ditto.
4577         * g95.h: Ditto.
4578         * symbol.c (g95_use_derived_tree): Ditto.
4579         * intrinsic.c (add_functions): Use simplification for SCALE.
4580         * primary.c (g95_match_rvalue): Test sym, not symtree.
4581
4582 2003-03-25  Paul Brook  <paul@nowt.org>
4583
4584         * trans-decl.c (build_function_decl): Add parameter before it gets
4585         turned into a constant.
4586         * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
4587         * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
4588         * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
4589
4590 2003-03-22  Paul Brook  <paul@nowt.org>
4591
4592         * trans-array.c (g95_conv_array_initializer): Allow scalar
4593         expressions.
4594         * trans-decl.c (g95_finish_var_decl): Result variables are not
4595         module variables.
4596         * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
4597         (g95_conv_intrinsic_function): Use it.
4598         * trans-types.h (g95_type_spec): Remove dead declaration.
4599
4600 2003-03-21  Paul Brook  <paul@nowt.org>
4601
4602         * trans-decl.c (g95_build_function_decl): Mark string parameters.
4603
4604 2003-03-20  Paul Brook  <paul@nowt.org>
4605
4606         * trans-decl.c (g95_build_function_decl): Put character length
4607         parameters at the end of the function declaration.
4608         * trans-expr.c (g95_conv_function_call): Ditto.
4609         * trans-types.c (g95_get_function_type): Ditto.
4610
4611 2003-03-20  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
4612
4613         * resolve.c (resolve_formal_arglist): Don't impose intent for
4614         procedure arguments of pure functions.
4615         (resolve_select): Remove redundant assignment.
4616
4617 2003-03-19  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
4618
4619         * arith.c (validate_logical), g95.h, options.c (g95_init_options):
4620         Remove option l1.
4621         * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
4622         * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
4623         const.
4624         * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
4625         Order list.
4626         * symbol.c (g95_add_type): Fix typo in comment.
4627
4628
4629 2003-03-16  Paul Brook  <paul@nowt.org>
4630
4631         * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
4632         * expr.c (g95_build_call): Remove.
4633         * f95-lang.c (puchdecl_top_level): New function.
4634         * g95.h (g95_code): Store resolved symbol, not just the name.
4635         * intrinsic.c (g95_intrinsic_namespace): New global namespace.
4636         (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
4637         (g95_get_intrinsic_sub_symbol): New function.
4638         * iresolve.c (g95_resolve_cpu_time): Use it.
4639         (g95_resolve_random_number): Ditto.
4640         * resolve.c: Set code->resolved_sym instead of code->sub_name.
4641         * trans-decl.c (g95_get_extern_function_decl): Give external decls
4642         the correct DECL_CONTEXT.  Add global symbold to the global scope.
4643         * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
4644         fixed.
4645
4646 2003-03-16  Paul Brook  <paul@nowt.org>
4647
4648         * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
4649         * options.c (g95_parse_arg): Ditto.
4650         * module.c (mio_symbol_attribute): Handle the always_explicit bit.
4651         * resolve.c (resolve_formal_arglist): The always_explicit sould be set
4652         for the procedure, not the parameter.
4653         * trans-array.c (g95_trans_g77_array): New function.
4654         (g95_trans_assumed_size): Use it.
4655         (g95_trans_dummy_array_bias): Ditto.
4656         (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
4657         (g95_conv_expr_descriptor): ... to here.  Update callers.
4658         * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
4659         (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
4660         * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
4661         * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
4662         * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
4663         (g95_sym_type): Ditto.
4664
4665 2003-03-15  Paul Brook  <paul@nowt.org>
4666
4667         * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
4668         first chain.
4669         * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
4670
4671 2003-03-14  Paul Brook  <paul@nowt.org>
4672
4673         * trans-array.c (g95_array_is_packed): Remove.
4674         (g95_conv_array_base): Correctly handle all descriptorless cases.
4675         (g95_conv_array_stride): Use descriptorless strides.
4676         (g95_trans_dummy_array_bias): Don't always repack the array.
4677         (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
4678         packed.
4679         * trans-types.c (g95_get_nodesc_array_type): Differentiate between
4680         dummy and non-dummy arrays...
4681         (g95_sym_type, g95_get_derived_type): ... like these.
4682         (g95_get_array_type_bounds): Allow discontiguous arrays.
4683
4684 2003-03-12  Paul Brook  <paul@nowt.org>
4685
4686         * array.c (g95_resolve_array_spec): Fix comment.
4687         * g95.h (symbol_attributes): New flag always_explicit.
4688         * resolve.c (resolve_formal_arglist): Set it always_explicit.
4689         * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
4690         * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
4691         (g95_trans_array_bounds): Allow assumed shape arrays.
4692         (g95_trans_repack_array): Remove.
4693         (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
4694         * trans-decl.c (g95_build_qualified_array): Only ignore absent
4695         bounds for assumed size arrays.
4696         (g95_build_dummy_array_decl): Use descriptorless arrays.
4697         * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
4698         (g95_trans_pointer_assign): Fix typo.
4699         * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
4700         code.
4701         (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
4702         * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
4703         Also modify callers.
4704         * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
4705
4706 2003-03-08  Paul Brook  <paul@nowt.org>
4707
4708         * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
4709         (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
4710         * resolve.c (compare_spec_to_ref): Allow full array sections.
4711
4712 2003-03-08  Paul Brook  <paul@nowt.org>
4713
4714         * expr.c (g95_simplify_expr): Also simplify array index and
4715         substring expressions.
4716         * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
4717         * trans-array.c (g95_trans_array_bounds): New function.
4718         (g95_trans_auto_array_allocation): Use it.
4719         (g95_trans_assumed_size): Rewrite.
4720         * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
4721         (gfor_fndecl_repack): Remove.
4722         (g95_build_qualified_array): Handle absent upper bounds.
4723         (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
4724         (g95_get_symbol_decl): Update.
4725         (g95_build_intrinsic_function_decls): Initialize new decls.
4726         * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
4727         (gfor_fndecl_repack): Remove.
4728         * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
4729         * trans-types.c: (g95_build_array_type): Merge duplicated code..
4730         (g95_get_nodesc_array_type): Handle absent bounds.
4731         * trans-types.h (g95_get_nodesc_array_type): Declare.
4732
4733 2003-03-04  Paul Brook  <paul@nowt.org>
4734
4735         * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
4736         builtin-types.def.
4737
4738 2003-03-02  Paul Brook  <paul@nowt.org>
4739
4740         * options.c (g95_init_options): Drfault to 1.
4741         (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
4742         * trans-array.c (g95_conv_array_data, g95_conv_array_base,
4743         g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
4744         Handle non-constant size automatic arrays.
4745         (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
4746         generic bound functions.
4747         (g95_trans_auto_array_allocation): Don't create a descriptor.
4748         (g95_trans_assumed_size): New function (broken).
4749         (g95_trans_dummy_array_bias): Remove unused var.
4750         * trans-array.h (g95_trans_assumed_size): Declare.
4751         * trans-decl.c (create_index_var): New fuction.
4752         (g95_build_qualified_array): New function.
4753         (g95_get_symbol_decl): Use it.
4754         (g95_trans_deferred_vars): Handle assumed shape seperately.
4755         * trans-types.c (get_element_type): Handle heap allocated arrays.
4756         (g95_is_nodesc_array): Include non-const size arrays.
4757         (g95_get_nodesc_array_type): Ditto.
4758
4759 2003-02-23  Paul Brook  <paul@nowt.org>
4760
4761         * trans-array.c (g95_array_init_size): Should use stride, not size of
4762         last dimension.
4763
4764 2003-02-18  Paul Brook  <paul@nowt.org>
4765
4766         * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
4767         after intrinsic function check.
4768
4769 2003-02-18  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
4770
4771         * io.c (match_io): Fix missing return value and remove useless
4772         assignment.
4773         * match.c (g95_match): Remove useless assignment.
4774         * module.c (parse_string):  Remove useless post increment.
4775         * simplify.c (g95_simplify_verify): Remove useless assignment.
4776
4777 2003-02-15  Paul Brook  <paul@nowt.org>
4778
4779         * expr.c (restricted_intrinsic): Handle bad values gracefully.
4780         * g95.h (symbol_attribute): Add referenced member.
4781         (g95_symbol): Add dummy_order member.
4782         (g95_set_sym_referenced): Declare.
4783         * match.c (g95_match_assignment, g95_match_call): Use it
4784         * primary.c (match_actual_arg, g95_match_rvalue,
4785         g95_match_variable): Ditto.
4786         * symbol.c (next_dummy_order): New variable.
4787         (g95_set_sym_referenced): New function.
4788         (check_done): New function.
4789         (g95_add_*): Use it.
4790         * trans-decl.c: Make formatting conform to GCC standards.
4791         (g95_defer_symbol_init): Add dummy variables in the right order.
4792         (g95_get_symbol_decl): Only accept referenced variables.
4793         (g95_create_module_variable): Module variables are always required.
4794         (generatr_local_decls): New function.
4795         (generate_local_vars): New function.
4796         (g95_generate_function_code): Use it.
4797
4798 2003-02-13  Paul Brook  <paul@nowt.org>
4799
4800         * trans-decl.c (g95_conv_struct_cons): Remove.
4801         (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
4802         * trans-expr.c (g95_conv_structure): New function.
4803         (g95_conv_expr): Use it.
4804
4805 2003-02-09  Paul Brook  <paul@nowt.org>
4806
4807         * trans-array.c (g95_array_init_size): Don't evaluate the linit
4808         expressions multiple times.
4809         (g95_trans_auto_arry_allocation): Use pointer not tmp.
4810
4811 2003-02-08  Paul Brook  <paul@nowt.org>
4812
4813         * module.c (mio_symtree_ref): Declare as static.
4814         (mio_expr): Remove dead code.
4815         (read_module): Set the symtree link for fixups.
4816         * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
4817         (build_round_expr): ... to this.
4818         (g95_conv_intrinsic_aint): New function.
4819         (g95_conv_intrinsic_function): Use it.
4820
4821 2003-02-08  Paul Brook  <paul@nowt.org>
4822
4823         * trans-array.c (g95_trans_array_constructor_value): Use the acutal
4824         offset after modificaton, not the increment expression.
4825         * dependency.c: Kill excess whitespace.
4826
4827 2003-02-07  Sanjiv Gupta  <sanjivg@noida.hcltech.com>
4828
4829         * dependency.h: Remove some function declarations.
4830         * dependency.c (get_no_of_elements): Change this function not to
4831         return int.
4832         * other: Add comments for all modified functions.
4833
4834 2003-02-06  Paul Brook  <paul@nowt.org>
4835
4836         * g95spec.c (lang_specific_functions): Fix initializer warning.
4837         * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
4838         for structure type names.
4839         * trans-decl.c (g95_cons_structure_cons): New function.
4840         (g95_get_symbol_decl): Use it.
4841         * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
4842         referencing code.
4843
4844 2003-02-06  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
4845
4846         * resolve.c (compare_cases): Add const to casts.
4847
4848 2003-01-30  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
4849
4850         * g95.h (g95_check_f): Change a1 to f1m.
4851         * intrinsic.c (add_sym_1m, check_specific,
4852         g95_intrinsic_func_interface): Use it.
4853
4854         * module.c (init_pi_tree): Remove useless cast.
4855         (fp2): Fix argument type.
4856
4857         * parse.c (parse_select_block): Add comment.
4858
4859 2003-02-05  Toon Moene  <toon@moene.indiv.nluug.nl>
4860
4861         * lang-options.h: Fix warning involving C90 concatenated
4862         strings.
4863
4864 2003-02-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
4865             Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
4866
4867         * io.c (format_asterisk): Complete initializer to kill warning.
4868         * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
4869         DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
4870         (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
4871         new defines to complete initializers.  Kills all warnings.
4872
4873         * Make-lang.in: Comment cleanup.
4874
4875 2003-02-05  Paul Brook  <paul@nowt.org>
4876
4877         * array.c (g95_free_constructor): Handle NULL expressions.
4878         * resolve.c (resolve_structure_cons): Ditto.
4879         * decl.c (g95_match_null): New Function.
4880         (variable_decl): Use it.
4881         * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
4882         * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
4883         * trans-types.c (g95_set_decl_attributes): Remove empty function.
4884
4885 2003-02-05  Paul Brook  <paul@nowt.org>
4886
4887         * trans.h (build1_v): New macro.
4888         (build_v): Remove pointless and incorrect prototype.
4889         * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
4890         * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
4891
4892 2003-02-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
4893
4894         * Make-lang.in (F95_OBJS): Remove one more dead file.
4895
4896 2003-02-01  Paul Brook  <paul@nowt.org>
4897
4898         * lang-specs.h: Don't pass -ffixed-form to the linker.
4899         * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
4900
4901 2003-02-01  Paul Brook  <paul@nowt.org>
4902
4903         * Make-lang.in (F95_OBJS): Remove dead files.
4904         * trans-array.c (g95_array_init_size): Do the right thing when
4905         ubound=NULL.
4906         * trans-decl.c (g95_generate_function_code): Initialize deffered
4907         symbol list before translating contained subroutines.
4908         * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
4909         scalar invariant values here...
4910         (g95_conv_variable, g95_conv_function_call): ... instead of here ...
4911         * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
4912
4913 2003-01-29  Paul Brook  <paul@nowt.org>
4914
4915         * trans-array.c (g95_add_loop_code): Put pre code in the right block.
4916         (g95_walk_elemental_function_args): Reverse chains before adding.
4917         (g95_reverse_ss): Move about a bit.
4918         * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
4919         function arguments.
4920
4921 2003-01-28  Paul Brook  <paul@nowt.org>
4922
4923         * intrinsic.c (resolve_intrinsic): Use correct union member.
4924         * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
4925         parameters.
4926         * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
4927         use associated variables.
4928         * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
4929         * trans-expr.c (g95_conv_expr_present): ... to here.
4930         * trans.h: Declare it.
4931         * trans-types.c (g95_sym_type): Assume subroutine if not specified.
4932
4933 2003-01-28  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
4934
4935         * array.c (expand_iterator): Suppress useless assignment.
4936         * decl.c (match_char_spec): Ditto.
4937         * io.c (match_io_iterator): Ditto.
4938         * primary.c (match_real_constant): Ditto.
4939         * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
4940         Ditto.  Also, use g95_intrinsic_op not int for intrinsic operators.
4941         * matchexp.c (match_add_operand, match_level_5): Likewise.
4942         * module.c (parse_atom, find_enum): Likewise.
4943         * resolve.c: move #include <string.h>
4944         (resolve_select): Fix serious typo.
4945
4946 2003-01-28  Steven Bosscher  <s.bosscher@student.tudelft.n>
4947
4948         * Make-lang.in: Don't build with broken tree-ssa-pre.
4949
4950 2003-01-28  Steven Bosscher  <s.bosscher@student.tudelft.nl>
4951
4952         * resolve.c (resolve_index): Add a TODO.
4953         * symbol.c: Remove useless "#include <ctype.h>".
4954
4955 2003-01-27  Paul Brook  <paul@nowt.org>
4956
4957         * check.c (check_rest): Allow different type kinds as an extension.
4958         * g95.h (g95_resolve_f): Add f1m.
4959         * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
4960         * intrinsic.h: Chenge prototypes for MIN and MAX.
4961         * iresolve.c (g95_resolve_minmax): New function.
4962         (g95_resolve_min, g95_resolve_max): Use it.
4963         * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
4964         arguments once.
4965         (g95_conv_intrinsic_present): Fix logic.
4966
4967 2003-01-27  Steven Bossche  <s.bosscher@student.tudelft.nl>
4968
4969         * g95.h (g95_case): Don't be a tree, be a double linked list.
4970         * match.c (match_case_selector): Remove redundant semantics check.
4971         Clean up a few goto's to make it a tiny little bit faster.
4972         * resolve.c (case_tree): Die.
4973         (compare_cases): Accept and compare unbounded cases too.
4974         (check_case_overlap): Don't build a tree.  Instead, merge-sort the
4975         whole list of g95_cases passed from resolve_select.
4976         (sane_logical_select): Die.
4977         (check_case_expr): Return FAILURE if a CASE label is of the wrong
4978         type kind.
4979         (resolve_select): Fixup case expression for computed GOTOs, put it
4980         in expr, not expr2, for easier handing in the parse tree dumper and
4981         the code generator.  Rewrite the rest of the function: Kill
4982         unreachable case labels and unreachable case blocks.
4983         * dump-parse-tree.c (g95_show_code_node): Always dump expr for
4984         an EXEC_SELECT, not case2 anymore.
4985         * trans-const.c (g95_conv_constant_to_tree): New function.
4986         (g95_conv_constant): Use it.
4987         * trans-const.h: Declare prototype for the new function.
4988         * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
4989         g95_trans_character_select): New static functions.
4990         (g95_trans_select): Rewrite.
4991
4992 2003-01-26  Paul Brook  <paul@nowt.org>
4993
4994         * intrinsic.c (add_fnctions): Properly add dreal.
4995         * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
4996         (g95_conv_intrinsic_function): Use it.
4997         * trans-io.c (build_dt): Abort on internal files (unimplemented).
4998
4999 2003-01-26  Paul Brook  <paul@nowt.org>
5000
5001         Widespread changes to the handling of symbols in expressions.  These
5002         are now linked via g95_symtree nodes.
5003         * parse.c (g95_fixup_sibling symbols): New function.
5004         (parse_contained): Use it.
5005         * g95.h (symbol_attribute): Add contained.  Indicates a symbol is a
5006         contained procedure that has bee correctly fixed up.
5007         (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
5008
5009 2003-01-24  Paul Brook  <paul@nowt.org>
5010
5011         * trans-array.c (g95_walk_expr): Function result attributes are in
5012         sym->result.
5013         * trans-expr.c (g95_conv_function_call,
5014         g95_trans_arrayfunc_assign): Ditto.
5015         * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
5016
5017 2003-01-23  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5018
5019         * expr.c (check_restricted): Fix error message.
5020         * symbol.c (free_st_labels): Plug memleak.
5021
5022 2003-01-22  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5023
5024         * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
5025         reduce_binary_aa, reduce_binary, eval_intrinsic,
5026         eval_intrinsic_f2): Use typesafe prototypes for eval functions.
5027         * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
5028         for typesafe intrinsics helper functions.
5029         (g95_intrinsic_sym): Use them.
5030         * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
5031         add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
5032         add_sym_5, add_conv, resolve_intrinsic, do_simplify,
5033         check_specific, g95_intrinsic_func_interface,
5034         g95_intrinsic_sub_interface): Adjust all calls to intrinsics
5035         helper functions.
5036         * trans-decl.c (g95_get_extern_function_decl): Likewise.
5037         * Make-lang.in: Don't disable warnings for strict prototypes
5038         any longer, everything is typesafe now.
5039
5040 2003-01-22  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5041
5042         * bbt.c (duplicate_node): Make static.
5043         * module.c (module_name): Make static.
5044         * scanner.c (include_dirs): Make static.
5045
5046 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5047
5048         Hard coded _gfor_'s should not show up anymore.
5049         * g95.h (PREFIX): New macro.
5050         * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
5051         hard-coded "_gfor".
5052         (g95_resolve_random_number): Likewise.
5053         * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
5054         * trans-io.c: Remove 'prefix' macro.  Replace all uses with
5055         the new PREFIX macro from g95.h.
5056
5057 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5058
5059         The troubles of forking... Andy implemented this just now too.
5060         Let's stick to that and keep the trees close.
5061         * g95.h (g95_st_label): 'format' member is now a g95_expr.
5062         * io.c: Revert previous changes.
5063         (g95_match_format): Match the format string as a character
5064         literal expression.
5065         * match.h (g95_statement_label): Declare external.
5066         * parse.c: Revert previous changes.
5067         * symbol.c (g95_free_st_label): Free a g95_expr instead
5068         if a 'char *'.
5069         * trans-io.c: Revert previous changes.
5070         (build_dt): Use set_string to set the format string.
5071
5072 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5073
5074         * io.c (format_string): Make non-static.
5075         (g95_match_format): Remember the format string.
5076         (terminate_io): Add I/O termination for empty I/O lists.
5077         * match.h: Declare external format_string.
5078         * parse.c (check_statement_label): Attack the format string
5079         to a format label for FORMAT statements.
5080         * trans-io.c (g95_add_field): Define prefix macro.  Replace
5081         all uses of PREFIX define with a use of this macro.
5082         (build_dt): Implement formatted I/O for format labels.
5083
5084 2003-01-20  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5085
5086         * lang-options.h: Kill "-std=F".
5087         * options.c: Remove unimplemented "-std=F".  Modify
5088         web address.
5089         * misc.c (g95_terminal_width): New function.
5090         * error.c (g95_error_init_1): Use g95_terminal_width.
5091         * g95.h: Add prototype for g95_terminal_width, remove
5092         fmode flag.
5093
5094 2003-01-19  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5095
5096         * Make-lang.in: Fix typo.
5097
5098 2003-01-18  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5099
5100         * g95.h (struct g95_case): Remove unused cruft, new member
5101         'where' to keep track of the locus of the default case.
5102         * match.c (g95_match_case): Add locus to the current case.
5103         (match_case_selector): Likewise.
5104         * parse.c (parse_select_block): Move semantics check for
5105         multiple DEFAULT cases out of here to...
5106         * resolve.c (check_case_overlap): ...here.  Return sooner
5107         when possible.
5108         (check_case_expr): Take two g95_cases now, use to sure the
5109         expression kinds are the same.
5110         (resolve_select): Cleanup.
5111
5112 2003-01-18  Paul Brook  <paul@nowt.org>
5113
5114         * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
5115         * trans-decl.c (g95_set_symbol_decl): Handle non-array result
5116         variables.
5117         (g95_get_extern_function_decl): Put decls in the correct context.
5118
5119 2003-01-18  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5120
5121         * trans-io.c: Port changes from Andy to set ERR flag.
5122
5123 2003-01-17  Paul Brook  <paul@nowt.org>
5124
5125         * trans-array.c: Add various comments.
5126         (g95_ss_terminator): Declare as const.
5127         (g95_walk_expr): Remove first parameter and update all callers.
5128         (g95_walk_op_expr): Initialize scalar SS properly.
5129         * trans-array.h (g95_walk_expr): Update prototype.
5130         * trans-expr.c: Update for new g95_walk_expr.
5131         * trans-intrinsic.c: Ditto.
5132         * trans-io.c: Ditto.
5133         * trans.h: Various comments for SS chains.
5134
5135 2003-01-17  Paul Brook  <paul@nowt.org>
5136
5137         * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
5138         and RRSPACING.
5139         * intrinsic.c (add_functions): Use them.
5140         * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
5141         * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
5142
5143 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5144
5145         Fallout of a small merge conflict:
5146         * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
5147
5148 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5149
5150         * initrinsic.c: New add_sym_* functions for strong typing.
5151         (add_conv): Make prototype strict.
5152         * dump-parse-tree.c, dependency.c: Include config.h
5153         * resolve.c, trans-io.c: Fix typos.
5154
5155 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5156
5157         * dump-parse-tree.c (g95_show_code_node): Show the
5158         condition for a computed GOTO that was transformed
5159         to a SELECT CASE construct.
5160         * resolve.c (check_case_overlap): Revert previous switch
5161         to treaps, it was too slow and didn't catch all trouble.
5162         (resolve_symbol): Be more flexible about module procedures.
5163         * symbol.c (check_conflict): Point to relevant section in
5164         the standard for dubious conflict.  Allow procedure
5165         dummy arguments to be optional again.
5166         * trans-io (add_field): Rename to g95_add_field.  Change
5167         all callers.
5168         * trans-stmt (trans_select): Handle unbounded cases for
5169         integer SELECT CASE constructs.  Fix/add more comment.
5170
5171 2003-01-17  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5172
5173         * g95.h: Uses GCC's function attribute macros.
5174         * error.c, module.c, parse.c, g95.h: More function attributes.
5175
5176 2003-01-16  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5177         Forgot a file...
5178         * trans-decl.c (get_label_decl): Use TREE_LINENO instead
5179         of DECL_SOURCE_LINE, and TREE_FILENAME instead of
5180         DECL_SOURCE_FILE.
5181
5182 2003-01-16  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5183
5184         * f95-lang.c (pushdecl): Use TREE_LINENO instead of
5185         DECL_SOURCE_LINE.
5186         * trans.c (g95_trans_code): Use annotate_all_with_file_line
5187         instead of nowdead wrap_all_with_wfl.
5188
5189 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5190
5191         * parse.c (g95_parse_file): In verbose mode, dump the parse tree
5192         before generating code, so we can still see it even if the code
5193         generation phase dies.
5194
5195 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5196
5197         * decl.c (build_sym): Split out initialization expression parts...
5198         (add_init_expr_to_sym): ...to here.
5199         (variable_decl): Add the symbol following an attribute list to the
5200         symbol tree before parsing the optional initialization expression
5201         if the symbol is not of a derived type.
5202         * primary.c (g95_match_rvalue): Don't assume a symbol always has
5203         a value if it is a PARAMETER.
5204
5205 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5206
5207         * misc.c: Don't #include <mcheck.h>
5208         * module.c: Ditto.  Kill uses of mtrace, muntrace.  If there
5209         ever was a glibc bug, then either this was never reported to
5210         glibc people, or it has been fixed for so long that there's
5211         no information you can find about it, anywhere.
5212
5213 2003-01-14  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5214
5215         Fix warnings:
5216         * module.c (attr_bits, bt_types, array_spec_types):
5217         Switch 'const' and 'static'.
5218         * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
5219
5220         GNU'ify source code:
5221         * trans-io.c: Numerous fixes, one fixed warning and a few
5222         TODO markers so that we don't forget about them.
5223
5224 2003-01-13  Paul Brook  <paul@nowt.org>
5225
5226         * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
5227         * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
5228         Add G95_ISYM_SCALE.
5229         * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
5230         * match.c (g95_match_stop): Fix dumb == -> != error.
5231
5232 2003-01-13  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5233
5234         * dump-parse-tree.c (show_indent): Add line breaks.  This
5235         whole dumping process needs cleanups.
5236         * f95-lang.c (g95_mark_addressable): Fix prototype to match
5237         the langhook.  Fix 'return's accordingly.
5238         * g95-support.h: Adjust prototype.
5239         * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
5240         * lang-options.h: Add '-fsyntax-only'.
5241         * options.c (g95_init_options): Init 'no_backend'.
5242         (g95_parse_arg): Deal with '-fsyntax-only'.
5243         * parse.c (g95_parse_file): Do not generate code if 'no_backend'
5244         is set.
5245
5246 2003-01-13  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5247         Patch from Arnaud
5248         * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
5249         arguments.  Also make sure that if a symbol is marked INTRINSIC,
5250         an intrinsic with the symbol's name actually exists.
5251         (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
5252         Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
5253         ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
5254
5255 2003-01-13  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5256
5257         * resolve.c (resolve_contained_functions): Fix condition, don't
5258         throw internal_error if a child namespace has no name.  Apparently
5259         this can be the case?
5260
5261 2003-01-11  Paul Brook  <paul@nowt.org>
5262
5263         Port changes from Andy's tree:
5264         * g95.h (g95_code): Add stop_code.
5265         * match.c (g95_match_stop): Detter syntax checking.
5266         * resolve.c (resolve_generic_f0): Return match type.
5267         (resolve_generic_f): Remove dead/duplicated code.
5268         (resolve_specific_f): Ditto.
5269         * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
5270         * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
5271         * trans-stmt.c (g95_trans_stop): Handle new STOP format.
5272
5273 2003-01-11  Paul Brook  <paul@nowt.org>
5274
5275         * trans-array.c: Various documentation/comment changes.
5276         * trans-stmt.c: Ditto.
5277
5278
5279 2003-01-10  Paul Brook  <paul@nowt.org>
5280
5281         * options.c/h: Add -fdump-parse-tree as alias of -v.
5282
5283 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5284
5285         * dump-parse-tree.c (g95_show_namespace): Fixed another
5286         typo.  Sorry, it's Friday...
5287
5288 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5289
5290         Spotted by Tobi:
5291         * trans-array.c, trans-array.h, trans.c, trans-const.c,
5292         trans-const.h, trans-decl.c, trans-expr.c, trans.h
5293         trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
5294         trans-types.c: Fix bogus copyright years, add 2003.
5295         * trans-types.h: Give copyright header.
5296
5297 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5298
5299         * dump-parse-tree.c (g95_show_namespace): Fixed typo.
5300         * expr.c, options.c, scanner.c: Add some more 'const' markers.
5301         * intrinsic.c: Some constant strings moved to read-only memory.
5302         * io.c (format_asterisk): Move to...
5303         * g95.h: ...here.
5304
5305 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5306
5307         * dump-parse-tree.c (g95_show_namespace): Dump implicit
5308         types for ranges instead of per-letter.  Indent the
5309         'CONTAINS' just like everything else.
5310         * resolve.c (resolve_contained_functions): Clarify comment.
5311         Explain non-obvious conditional expression.  Improve
5312         diagnostics if tyoe cannot be resolved.
5313         Port semi-fix from Andy's tree:
5314         (was_declared): Move up before first use.
5315         (generic_sym, specific_sym): New functions.  Code moved
5316         out if procedure_kind.
5317         (procedure_kind): Simplify using new functions.
5318         (resolve_generic_f): Make sure the functions we find in
5319         a parent namespace is generic.
5320         (resolve_specific_f): Ditto for specific functions.
5321
5322 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5323
5324         * trans-stmt.c, trans.c: Fix some code style issues. Add
5325         some more comment (but still not enough!).
5326
5327 2003-01-10  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5328
5329         * symbol.c (flavors, procedures, intents, acces_types,
5330         access_types, ifsrc_types): Make const.
5331         * misc.c (g95_string2code): Make 'm' param 'const'.
5332         * module.c (find_enum, write_atom, mio_name): Make
5333         'm' param 'const'.
5334         (attr_bits, bt_types, array_spec_types, array_ref_types,
5335         ref_types, expr_types): Make const.
5336         * g95.h: Adjust external decls.
5337
5338 2003-01-09  Paul Brook  <paul@nowt.org>
5339
5340         * Testsuite: Add a load of new cases.
5341
5342 2003-01-08  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5343
5344         * Make-file.in: Add dependency on back end header files;
5345         a parallel build should work now.
5346         * f95-lang-c (lang_identifier): Remove bogus comment.
5347         (g95_be_parse_file): Fix prototype.
5348         (g95_init): Make static.
5349         (g95_finish): Make static.
5350         * error.c (g95_syntax_error): Kill. Make define in...
5351         * g95.h (g95_syntax_error): Define.
5352         (g95.options): Make 'source' member 'const'.
5353         * interface.c (g95_match_interface): Explain
5354         hard-to-read condition.
5355         (g95_match_end_interface): Ditto.
5356         * trans_const.c (g95_build_string_const): Make 's' parameter
5357         'const'.
5358         * trans_const.h: Adjust protoype accordingly.
5359         * trans-decl.c: Include tree-dump.h
5360         (g95_generate_function_code): Build fixes for recent changes
5361         in the tree-ssa branch.
5362
5363 2003-01-08  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5364
5365         * format.c: Kill, move code from here...
5366         * io.c: ...to here.
5367         * Make-lang.in: Adjust.
5368         * MANIFEST: Ditto.
5369         * match.h: Ditto.
5370         * BUGS: Mention where to submit bugs.  Move old content...
5371         * TODO: ...to here.  New file.
5372
5373 2003-01-08  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5374         Fix most warnings, and suppress the ones we can't fix for now.
5375         * Make-lang.in: Suppress warnings about bad proto's in g95.h,
5376         these warnings just clutter the screen and there's not much
5377         we can do about them for now anyway.
5378         * check.c, iresolve.c: Mark unused function parameters.
5379         * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
5380         they should be resolved before they get here.
5381         * error.c: Remove unused FILE *status_out.
5382         * f95-lang.c (g95_init): Remove bogus cast.
5383         * Many files: Make things 'const' where required.
5384         * g95.h: Fix prototypes for all modified functions above.
5385         (g95_options): Remove 'object' member.
5386
5387 2003-01-07  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5388
5389         * Make-file.in: Cleanup bogus targets.  Add more comment.
5390         * lang-options.h: New option '-w'.
5391         * g95.h: add no_options field to struct g95_options.
5392         * options.c (g95_init_options): Default no_warnings to off.
5393         (g95_parse_arg): Recognise the '-w' switch and its alias,
5394         '-fno-warnings'.
5395         * error.c (g95_warning, g95_warning_now): Don't emit warning if
5396         no_warning option is set.
5397         * iresolve.c (g95_resolve_shape): Fix warning.
5398
5399 2003-01-07  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5400
5401         * primary.c (g95_next_string_char): Rename next_string_char, and
5402         make static.  Adjust callers accordingly.
5403         * resolve.c (resolve_generic_f0): Return try, not match.  Adjust
5404         callers accordingly.
5405         * g95.h: Split out all g95_match* functions to...
5406         * match.h: ...here. New file.
5407         * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
5408         matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
5409
5410 2003-01-07  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5411
5412         * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
5413         g95_merge_new_implicit): New functions.
5414         (g95_match_implicit_none, g95_match_implicit): Move from here...
5415         * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
5416         Modify to use the new functions in symbol.c.
5417         * g95.h: Add and move prototypes.
5418
5419 2003-01-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5420
5421         * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
5422         node compare function.
5423         (g95_insert_bbt): Likewise.
5424         (g95_insert_bbt_with_overlap): Likewise.
5425         (g95_delete_bbt): Likewise.
5426         (delete_treap): Likewise. Also fix a potential bug when calling it.
5427         * module.c (compare_pointers): Change proto to compare_fn.
5428         (compare_integers): Likewise.
5429         (compare_true_names): Likewise.
5430         (find_true_name): Adjust call to compare_true_names to match proto.
5431         (require_atom, write_atom, mio_name): Fix 'const' warnings.
5432         (init_pi_tree): Make compare a compare_fn instead of (int *).
5433         * resolve.c (compare_cases): Change proto to compare_fn.
5434         * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
5435         it static, and rename to compare_symtree.
5436         (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
5437         function.
5438         * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
5439         of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
5440
5441 2003-01-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5442         * Make-lang.in: Fix spaces/tabs issues from previous patch.
5443         * patch.options: Blow away Paul's checkin mistake :-)
5444         * io.c (terminate_io): Fix memory leak (Arnaud).
5445
5446 2003-01-06  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5447
5448         * Make-lang.in: Teach about building DVI, info manual.
5449         * g95.texi: New file.
5450
5451 2003-01-02  Paul Brook  <paul@nowt.org>
5452
5453         * trans-array.c (g95_reverse_ss): Make static and don't use.
5454         (g95_conv_ss_descriptor): Don't use g95_loopinfo
5455         (g95_conv_array_parameters): Modify for pointer assignments.
5456         (g95_walk_subexpr): New function.
5457         (g95_walk_expr*): Use it.
5458         * trans-array.h (g95_reverse_ss): Remove prototype.
5459         * trans-expr.c (g95_trans_pointer_assign): Implement.
5460         (Many): Set se.want_pointer before calling g95_conv_array_parameter.
5461         * trans-intrinsic.c: Sync with scalarizer changes.
5462         * trans-io.c: Ditto.
5463
5464 2002-12-29  Paul Brook  <paul@nowt.org>
5465
5466         * trans-array.c: Document calling convention for arrays.
5467
5468 2002-12-19  Paul Brook  <paul@nowt.org>
5469
5470         * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
5471         assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
5472         optional parameters for some intrinsics.
5473         (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
5474         * trans-expr.c (g95_conv_function_call): Pass NULL for absent
5475         optional parameters.
5476         * trans.h (g95_se): Add ignore_optional flag.
5477
5478 2002-12-15  Paul Brook  <paul@nowt.org>
5479
5480         * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
5481         * trans-decl.c (g95_generate_function_code): Use TDI_original.
5482
5483 2002-12-14  Paul Brook  <paul@nowt.org>
5484
5485         * trans-stmt.c (g95_trans_call): Use resolved symbol name.
5486
5487 2002-12-12  Paul Brook  <paul@nowt.org>
5488
5489         * trans-array.c (g95_trans_array_constructor_subarray): Fully
5490         initialize the scalarizer.
5491         (various): Update to new format of g95_expr->value.constructor.
5492
5493 2002-12-08  Paul Brook  <paul@nowt.org>
5494
5495         * trans-array.c (g95_put_offset_into_var): New function.
5496         (g95_trans_array_constructor_subarray): New function.
5497         (g95_trans_array_constructor_value): Use it.
5498         (g95_array_cons_size): Don't abort() on array components.
5499
5500 2002-12-08  Paul Brook  <paul@nowt.org>
5501
5502         * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
5503         * support.c: Update #includes.
5504         (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
5505         * trans-array.c: Update #includes.
5506         * trans.c: Ditto.
5507         * trans-const.c: Ditto.
5508         * trans-io.c: Ditto.
5509         * trans-types.c: Ditto.
5510         (g95_init_types): Set size_type_node.
5511         * trans-decl.c: Update #includes.
5512         (gfor_fndecl_adjust{l,r}): Declare and initialize.
5513         * trans-stmt.c: Update #includes.
5514         (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
5515         (g95_trans_select): Fix check for unbounded ranges.
5516         * trans-expr.c: Update #includes.
5517         (g95_conv_string_tmp): New function.
5518         (g95_conv_concat_op): Use it.
5519         * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
5520         * Trans-intrisic.c: Update #includes.
5521         (g95_conv_intrinsic_strcmp): New function.
5522         (g95_conv_intrinsic_adjust): Ditto.
5523         (g95_conv_intrinsic_function: Use them.
5524
5525 2002-11-30  Paul Brook  <paul@nowt.org>
5526
5527         * trans-array.c (g95_walk_function_expr): Handle non-array return by
5528         reference.
5529         * trans-dec.c (g95_build_function_decl): Handle character return
5530         parammeters.
5531         (g95_get_fake_result_decl): Ditto.
5532         (g95_trans_deferred_vars): Ditto.
5533         * trans-expr.c (g95_conv_function_call): Ditto.
5534         (g95_trans_arrayfunc_assign) Limit to array valued functions.
5535         * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
5536         (g95_conv_intrinsic_function): Use it.
5537         * trans-types.c (g95_sym_type): Handle functions returning strings.
5538         (g95_return_by_reference): Ditto.
5539         (g95_get_function_type): Ditto.
5540
5541 2002-11-18  Paul Brook  <paul@nowt.org>
5542
5543         * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
5544         requires a temporary.
5545         (g95_trans_select): Handle computed gotos.
5546         * trans-types.c (g95_build_array_type): Warn about non-functional
5547         assumed shape arrays.
5548         * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
5549         blocks.
5550         * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
5551         (g95_conv_intrinsic_int): New function.
5552         (g95_conv_intrinsic_mod): New function.
5553         (g95_conv_intrinsic_ichar): New function.
5554         (g95_conv_intrinsic_function): Use them.
5555         (g95_conv_intrinsic_dim): Use g95_evaluate_now.
5556
5557 2002-11-17  Toon Moene  <toon@moene.indiv.nluug.nl>
5558
5559         * trans-types.c (g95_build_array_type): Assumed
5560         sized arrays can have rank > 1.
5561         * trans.c (g95_trans_code): Remove erroneous
5562         warning about CONTINUE.
5563         * trans-expr.c (g95_conv_variable): Remove
5564         erroneous assert.
5565
5566 2002-11-15  Paul Brook  <paul@nowt.org>
5567
5568         * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
5569
5570 2002-10-31  Paul Brook  <paul@nowt.org>
5571
5572         * f95-tree.c: Remove tree copying stuff that's now in gimple.c
5573         * trans-expr.c (g95_conv_component_ref): Handle character string
5574         components.
5575         (g95_conv_string_parameter): Ditto.
5576         * trans-types.c (g95_get_derived_type): Add length decl to caracter
5577         string components.
5578
5579 2002-10-10  Paul Brook  <paul@nowt.org>
5580
5581         * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
5582         * trans-expr.c (g95_conv_function_call): Remove unreliable return value
5583         check.
5584         * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
5585         (g95_conv_intrinsic_function): Handle size and shape intrinsics.
5586         (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
5587         * trans-types.c (pvoid_type_node): Declare and initialize.
5588         * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
5589         (g95_array_allocate): Fix when base==data.
5590         (g95_conv_array_parameter): Correctly handle reduced rank sections.
5591         * trans-io.c (g95_trans_write): Correctly handle string modifiers.
5592
5593 2002-10-09  Paul Brook  <paul@nowt.org>
5594
5595         * (g95_conv_expr_reference): Handle character strings correctly.
5596
5597 2002-10-07  Paul Brook  <paul@nowt.org>
5598
5599         (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
5600         langhook.
5601         * trans-array.c (g95_build_array_initializer): Remove.
5602         (g95_conv_array_initializer): New Function.
5603         (g95_trans_auto_arry_allocation): Cleanup.
5604         (g95_trans_init_character_array): Remove.
5605         * g95spec.c: Link in libgforbegin.
5606         * trans.c (g95_generate_code): Rename main function to MAIN__.
5607         (g95_create_var): New function.
5608         (g95_create_var_np): New function.
5609         (g95_evaluate_now): New function.
5610         (g95_start_block): New function.
5611         (g95_finish_block): New function.
5612         (g95_add_expr_to_block): New function.
5613         (g95_add_block_to_block): New function.
5614         * trans-expr.c (g95_conv_componen_ref): New function.
5615         * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
5616         (F95_OBJS): Add dependency.o.
5617         * f95-lang.c (g95_is_simple_stmt): Remove.
5618         * f95-tree.c (mark_not_simple): New function.
5619         (unshare_all_trees): New function.
5620         (create_tmp_var, create_tmp_alias_var): Remove.
5621         * support.c (declare_tmp_vars, tree_last_decl): Remove.
5622         * trans*: Convert to new IR using GENERIC trees.  Don't bother about
5623         SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
5624
5625 2002-10-01  Paul Brook  <paul@nowt.org>
5626
5627         * trans-array.c: Add support for descriptorless arrays.
5628         (g95_conv_array_data): New function.
5629         (g95_conv_array_base): New function.
5630         * trans-array.h: Declare these here.
5631         * trans-decl.c(g95_create_mopdule_variable): Perform variable
5632         initialization and creation here.
5633         (g95_create_module_vars): Instead of here.
5634         * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
5635         * trans-intrinsic.c: Ditto.
5636         * trans-types.c (g95_is_nodesc_array): New function.
5637         (g95_get_nodesc_array_type): New function.
5638         (g95_sym_type, g95_get_derived_type): Use them.
5639         * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
5640
5641 2002-09-28  Paul Brook  <paul@nowt.org>
5642
5643         * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
5644         * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
5645         parameters.
5646
5647 2002-09-24  Paul Brook  <paul@nowt.org>
5648
5649         * f95-lang.c (listify): Remove declaration.
5650         (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
5651         (listify)
5652         * f95-tree.c (get_name): New function.
5653         * trans.c (module_namespace): Remove.
5654         * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
5655         * trans-types.c: Ditto.
5656
5657 2002-09-19  Paul Brook  <paul@nowt.org>
5658
5659         * trans-array.c (g95_get_array_cons_size): New Function.
5660         (g95_con_ss_startstride): Handle Array constructors.
5661         (g95_conv_loop_setup): Ditto.
5662         (g95_conv_array_parameter): Ditto.
5663         * tras-decl.c (g95_finish_var_decl): Make initializes variables
5664         static.
5665
5666 2002-09-19  Paul Brook  <paul@nowt.org>
5667
5668         * trans.c (g95_simple_fold_tmp): Detect variables inside
5669         NON_LVALUE_EXPR.
5670         * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
5671
5672 2002-09-18  Steven Bosscher <s.bosscher@student.tudelft.nl>
5673
5674         * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
5675
5676 2002-09-14  Paul Brook  <paul@nowt.org>
5677
5678         * trans.c (g95_create_module_variable): Move to trans-decl.c.
5679         * trans-const.c (g95_conv_string_init): New Function.
5680         * trans-const.h: Declare it.
5681         * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
5682         variables. Don't bail on intrinsic symbols.
5683         (get_extern_function_decl): Handle specific intrinsic functions.
5684         * trans-types.c (g95_sym_type): Dummy functions don't return
5685         reference types.
5686         * trans-array.c (g95_build_array_initializer): New Function.
5687         (g95_trans_auto_array_allocation): Build initializer for static decls.
5688         Don't use mpz_addmul, it's GMP4 only.
5689
5690 2002-09-12  Paul Brook  <paul@nowt.org>
5691
5692         * trans-decl.c (g95_generate_code): Fix thinko with return variable.
5693         (g95_get_extern_function_decl, g95_build_function_decl): Mangle
5694         assembler names for module procedures.
5695
5696 2002-09-11  Tobias Schlueter  <Tobias.Schlueter@physik.uni-muenchen.de>
5697
5698         * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
5699         dependency/
5700
5701 2002-09-10  Paul Brook  <paul@nowt.org>
5702
5703         * trans-array.c: Change format of G95_SS_TEMP strictures.
5704         (g95_check_fncall_dependancy): New function.
5705         (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
5706         offsets.
5707         * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
5708         result variables.
5709         (g95_build_function_decl): Don't assume result arrays are packed.
5710         (g95_trans-deferred-vars): Handle array result variables.
5711         (g95_generate_fuction_code): Clear saved_function_decls.
5712         * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
5713         reference.
5714         (g95_trans_arrayfunc_assign): New function.
5715         (g95_trans_assignment): Use it.
5716         * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
5717         (g95_se): Add direct_byref.
5718         * trans-types.c: Use sym->result rather than sym where appropriate.
5719         * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
5720         Update other functions to use this.
5721         (g95_is_intrinsic_libcall): New function.
5722         (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
5723         (g95_walk_intrinsic_function): Ditto.
5724
5725 2002-09-08  Paul Brook  <paul@nowt.org>
5726
5727         * trans-types.c: Change rank field to dtype field in array descriptor.
5728         * trans-array.c: Implement filling of dtype array descriptor field.
5729         * trans-intrinsic.c: Fix broken LEN intrinsic.
5730
5731 2002-09-07  Paul Brook  <paul@nowt.org>
5732
5733         * trans-intrinsic.c: Remove outdated todo intrinsic list.
5734         (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
5735         (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
5736
5737 2002-09-06  Paul Brook  <paul@nowt.org>
5738
5739         * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
5740         (gt-f95-trans-types.h): Add dependancy information.
5741         * config-lang.in (gtfiles): Add trans-types.c
5742         * f95-lang.c (g95_be_parse_file): Pass error and warning counts
5743         back to top-level code.
5744         * trans-array.c, trans-types.c: Change format of array descriptor.
5745         (g95_conv_descriptor_dimension): New function.
5746         * trans-types.h (g95_conv_descriptor_rank): define.
5747         * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
5748         intrinsics.
5749
5750 2002-09-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
5751
5752         * trans-array.c, trans-types.c: Add rank information to descriptor.
5753
5754 2002-09-06  Tobias Schlueter  <Tobias.Schlueter@physik.uni-muenchen.de>
5755
5756         * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
5757
5758 2002-09-04  Paul Brook  <paul@nowt.org>
5759
5760         * f95-lang.c (g95_create_decls): New function.
5761         (g95_init):  Move initialization of external decls to above, and call
5762         from g95_be_parse_file.
5763         * trans.c (g95_finish_stmt): Don't amputate the decl chain.
5764         * trans-types.c (g95_init_types): Always name integer and char types.
5765         (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
5766
5767 2002-09-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
5768
5769         * Make-lang.in: Add options.c to F95_PARSER_OBJS
5770
5771 2002-09-02  Paul Brook  <paul@nowt.org>
5772
5773         * g95_generate_code: Clear the attr for __fortran_main.
5774         * trans-types.c (g95_finish_type): New function.
5775         * g95_init_io_state_type: Use g95_finish_type.
5776         * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
5777
5778 2002-09-01  Paul Brook  <paul@nowt.org>
5779
5780         * README.backend: Warn about the dangers of extra config.h files.
5781         Remove obsolete libgfor stuff.
5782         * config-lang.in: Add target-libgfor dependancy.
5783         * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
5784
5785 2002-09-01  Toon Moene  <toon@moene.indiv.nluug.nl>
5786
5787         * g95_conv_mpz_to_tree: Free storage pointed to by q,
5788         not by buff.
5789
5790 2002-08-30  Paul Brook  <paul@nowt.org>
5791
5792         * trans-intrinsic.c (g95_conv_intrinsic_function,
5793         g95_walk_intrinsic_function): Added ANY and ALL.
5794         (g95_conv_intrinsic_anyall): New function.
5795         * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in
5796         mangled name