OSDN Git Service

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