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