Use gather loads for strided accesses
[official-gcc.git] / gcc / fortran / ChangeLog-2004
blobd5d66540627314776132173ac34c4d49cf6b0099
1 2004-12-29  Steven G. Kargl  <kargls@comcast.net>
3         * gfortran.h (gfc_case): fix typo in comment.
5 2004-12-27  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
7         * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Change to
8         logical shift.  Call fold.  Remove 0-bit shift shortcut.
9         (gfc_conv_intrinsic_ishftc): Convert first argument to at least
10         4 bytes bits.  Convert 2nd and 3rd argument to 4 bytes.  Convert
11         result if width(arg 1) < 4 bytes.  Call fold.
13         PR fortran/19032
14         * trans-intrinsic.c (gfc_conv_intrinsic_mod): Update comment
15         in front of function to match the standard.  Correct handling
16         of MODULO.
18 2004-12-27  Andrew Pinski  <pinskia@physics.uc.edu>
20         * trans-expr.c (gfc_conv_cst_int_power): Only check for
21         flag_unsafe_math_optimizations if we have a float type.
23 2004-12-23  Steven G. Kargl  <kargls@comcast.net>
25         * gfortran.texi: Fix typo.
27 2004-12-16  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
29         * trans-intrinsic.c (build_fixbound_expr): Clarify comment, fix
30         comment typo.
32 2004-12-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
34         PR fortran/18993
35         * match.c (gfc_match_if): Don't explicitly skip optional whitespace.
36         (gfc_match_nullify): Make sure that ')' is in front of the end of
37         statement.
39         * scanner.c (skip_fixed_comments): Fix typo in comment preceding
40         function.
42 2004-12-14  Richard Henderson  <rth@redhat.com>
44         * gfortran.h (gfc_expr.function.name): Make const.
45         (gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
46         (gfc_get_string): Update prototype.
47         * iresolve.c: Include tree.h.
48         (string_node, HASH_SIZE, string_head, hash): Remove.
49         (gfc_get_string): Use vsnprintf, get_identifier.
50         (free_strings, gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
51         * misc.c (gfc_init_1): Don't call gfc_iresolve_init_1.
52         (gfc_done_1): Don't call gfc_iresolve_done_1.
53         * module.c (mio_allocated_string): Take and return const char *,
54         instead of modifying char**.
55         (mio_expr): Update to match.
56         * resolve.c (pure_function): Constify name argument.
57         (resolve_function): Constify name.
58         * trans-intrinsic.c (gfc_conv_intrinsic_function): Likewise.
60 2004-12-12  Richard Henderson  <rth@redhat.com>
62         * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
63         gfc_resolve_cshift, gfc_resolve_dot_product, gfc_resolve_eoshift,
64         gfc_resolve_matmul, gfc_resolve_maxloc, gfc_resolve_maxval,
65         gfc_resolve_minloc, gfc_resolve_minval, gfc_resolve_pack,
66         gfc_resolve_product, gfc_resolve_reshape, gfc_resolve_shape,
67         gfc_resolve_spread, gfc_resolve_sum, gfc_resolve_transpose,
68         gfc_resolve_unpack: Use PREFIX.
70 2004-12-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
72         PR fortran/18869
73         * match.c (gfc_match_common): Skip whitespace.
75 2004-12-12  Steven G. Kargl  <kargls@comcast.net>
77         PR fortran/16581
78         * check.c (gfc_check_iand, gfc_check_ibclr, gfc_check_ibits,
79         gfc_check_ibset, gfc_check_ieor, gfc_check_ior): Remove default
80         integer kind check; Issue error for -std=f95 when needed.
81         * intrinsic.c (add_functions): Change ieor from GFC_STD_GNU to
82         GFC_STD_F95.
83         * iresolve.c (gfc_resolve_iand, gfc_resolve_ieor, gfc_resolve_ior):
84         Promote arguments to same kind.
86 2004-12-12  Steven G. Kargl  <kargls@comcast.net>
87         Paul Brook  <paul@codesourcery.com>
89         PR fortran/16222
90         * resolve.c (gfc_resolve_iterator_expr): New function.
91         (gfc_resolve_iterator): Use it.  Add real_ok argument.  Convert
92         start, end and stride to correct type.
93         (resolve_code): Pass extra argument.
94         * array.c (resolve_array_list): Pass extra argument.
95         * gfortran.h (gfc_resolve): Add prototype.
96         * trans-stmt.c (gfc_trans_do): Remove redundant type conversions.
97         Handle real type iterators.
99 2004-12-11  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
101         PR fortran/17175
102         * iresolve.c (gfc_resolve_scale): Convert 'I' argument if not of
103         same kind as C's 'int'.
104         (gfc_resolve_set_exponent): Convert 'I' argument if not of kind 4.
106 2004-12-08  Richard Henderson  <rth@redhat.com>
108         * intrinsic.c (gfc_convert_type_warn): Propagate the input shape
109         to the output expression.
110         * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift): Suppress
111         warning conversion.
112         (gfc_resolve_reshape): Force convert SHAPE and ORDER parameters
113         to index kind.
115 2004-12-08  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
117         PR fortran/18826
118         * resolve.c (resolve_code): Impose correct restrictions on
119         assigned variable.
121         * decl.c (gfc_match_end): Use locus of END when eos is an error.
123 2004-12-02  Steven G. Kargl  <kargls@comcast.net>
124         Paul Brook  <paul@codesourcery.com>
126         * check.c (gfc_check_flush, gfc_check_fnum): New functions.
127         (gfc_check_fstat, gfc_check_fstat_sub): New functions.
128         (gfc_check_stat, gfc_check_stat_sub): New functions.
129         * gfortran.h (GFC_ISYM_FNUM,GFC_ISYM_FSTAT,GFC_ISYM_STAT): New symbols
130         * intrinsic.c (add_functions,add_subroutines): Add flush, fnum,
131         fstat, and stat to intrinsics symbol tables.
132         * intrinsic.h (gfc_check_flush, gfc_resolve_stat_sub): Add prototypes.
133         (gfc_resolve_fstat_sub, gfc_resolve_stat): Ditto.
134         * iresolve.c (gfc_resolve_fnum, gfc_resolve_fstat): New functions.
135         (gfc_resolve_stat, gfc_resolve_flush): New functions.
136         (gfc_resolve_stat_sub,gfc_resolve_fstat_sub): New functions
137         * trans-intrinsic.c (gfc_conv_intrinsic_function): Add new intrinsics.
139 2004-12-02  Steven G. Kargl  <kargls@comcast.net>
141         * intrinsic.c: Fix and add comments, fix function declarations
142         (OPTIONAL,REQUIRED): New symbols
143         (add_functions,add_subroutines): Use symbols
144         (gmp.h): Remove unused include
146 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
148         * f95-lang.c, gfortranspec.c, trans-decl.c: Avoid ` as left quote
149         in diagnostics.
151 2004-11-24  Steven Bosscher  <stevenb@suse.de>
153         * options.c (gfc_post_options): Don't clear flag_inline_functions.
155 2004-11-20  Steven G. Kargl  <kargls@comcast.net>
157         * check.c (gfc_check_getcwd_sub): Fix seg fault.
159         * check.c (gfc_check_exit,gfc_check_umask,gfc_check_umask_sub,
160         gfc_check_unlink,gfc_check_unlink_sub): New functions
161         * gfortran.h (GFC_ISYM_UMASK,GFC_ISYM_UNLINK): New symbols
162         * intrinsic.c (add_functions,add_subroutines): Add umask, unlink,
163         exit to intrinsics symbol tables.
164         * intrinsic.h (gfc_check_umask,gfc_check_unlink,gfc_check_exit,
165         gfc_check_umask_sub,gfc_check_unlink_sub,gfc_resolve_umask,
166         gfc_resolve_unlink,gfc_resolve_exit,gfc_resolve_umask_sub,
167         gfc_resolve_unlink_sub): Add and sort prototypes.
168         * iresolve.c (gfc_resolve_umask,gfc_resolve_unlink,gfc_resolve_exit,
169         gfc_resolve_umask_sub,gfc_resolve_unlink_sub): New functions
170         * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbols
172 2004-11-16  Paul Brook  <paul@codesourcery.com>
174         PR fortran/13010
175         * trans-array.c (gfc_trans_allocate_temp_array): Use gfc_get_dtype.
176         (gfc_array_init_size, gfc_conv_expr_descriptor): Ditto.
177         * trans-types.c (gfc_get_dtype): Accept array type rather than element
178         type.
179         (gfc_get_nodesc_array_type): Don't set GFC_TYPE_ARRAY_DTYPE.
180         (gfc_get_array_type_bounds): Ditto.
181         (gfc_get_derived_type): Recurse into derived type pointers.
182         * trans-types.h (gfc_get_dtype): Add prototype.
183         * trans.h (GFC_TYPE_ARRAY_DTYPE): Add comment.
185 2004-11-15  Paul Brook  <paul@codesourcery.com>
187         * trans-types.c (gfc_get_dtype): Remove obsolete TODO.
189 2004-11-10  Paul Brook  <paul@codesourcery.com>
191         PR fortran/18375
192         * trans-expr.c (gfc_trans_subarray_assign): Free shape before ss.
193         * trans-io.c (transfer_array_component): Ditto.
195 2004-11-10  Paul Brook  <paul@codesourcery.com>
197         * invoke.texi: Fix typo.
199 2004-11-08  Kazu Hirata  <kazu@cs.umass.edu>
201         * arith.c, array.c, decl.c, expr.c, f95-lang.c, gfortran.h,
202         gfortranspec.c, interface.c, intrinsic.c, iresolve.c, match.c,
203         module.c, parse.c, parse.h, primary.c, resolve.c, scanner.c,
204         trans-array.c, trans-array.h, trans-expr.c, trans-intrinsic.c,
205         trans-io.c, trans-stmt.c, trans.h: Fix comment formatting.
207 2004-11-06  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
209         PR fortran/18023
210         * io.c (resolve_tag): Tighten up exception for assigned FORMAT.
212 2004-11-06  Kazu Hirata  <kazu@cs.umass.edu>
214         * gfortranspec.c: Replace GNU CC with GCC.
216 2004-11-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
218         * gfortranspec.c (lang_specific_driver): Change year to 2004.
220 2004-11-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
222         PR fortran/18111
223         *  trans-decl.c (create_function_arglist): Set DECL_ARTIFICIAL for
224         hidden parameters.
226 2004-11-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
228         PR fortran/15164
229         * trans-decl.c (gfc_finish_var_decl): Don't declare arguments to
230         module procedures as if they were module variables.
232 2004-11-03  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
234         PR fortran/17535
235         PR fortran/17583
236         PR fortran/17713
237         * module.c (write_symbol1): Set module_name for dummy arguments.
239 2004-11-02  Paul Brook  <paul@codesourcery.com>
241         * intrinsic.c (check_intrinsic_standard): Include error locus.
242         Remove VLA.
243         (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Pass
244         locus to check_intrinsic_standard.
246 2004-10-31  Janne Blomqvist  <jblomqvi@cc.hut.fi>
248         PR fortran/17590
249         * gfortran.h: Change GFC_STD_* flags to more appropriate
250         ones. (struct gfc_intrinsic_isym): Add field for standard. (struct
251         gfc_option_t): Add field for warning about use of nonstandard
252         intrinsics.
253         * intrinsic.c (add_sym): Add parameter for standard version, check
254         this against current standard.
255         (add_sym_0): Pass standard parameter to add_sym.
256         (add_sym_1, add_sym_0s, add_sym_1s, add_sym_1m, add_sym_2): Ditto.
257         (add_sym_2s, add_sym_3, add_sym_3ml, add_sym_3red, add_sym_3s): Ditto.
258         (add_sym_4, add_sym_4s, add_sym_5, add_sym_5s): Ditto.
259         (make_generic): Add parameter for standard, check this
260         against currently selected standard.
261         (add_functions, add_subroutines): Add parameter to tell which
262         standard an intrinsic belongs to.
263         (check_intrinsic_standard): New function.
264         (gfc_intrinsic_func_interface): Add call to check_intrinsic_standard.
265         (gfc_intrinsic_sub_interface): Ditto.
266         * lang.opt: Add Wnonstd-intrinsics option.
267         * options.c (gfc_init_options): Change to use new GFC_STD_* flags,
268         init new warning.
269         (set_Wall): Add warning about nonstd intrinsics.
270         (gfc_handle_option): Change to use new GFC_STD_* flags,
271         handle new warning.
272         * invoke.texi: Update manual to include -Wnonstd-intrinsics.
274 2004-10-30  Andrew Pinski  <pinskia@physics.uc.edu>
276         * f95-lang.c (lang_tree_node): Add chain_next to be the TREE_CHAIN.
278 2004-10-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
280         * simplify.c (twos_complement): Calculate mask in GMP arithmetic.
282 2004-10-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
284         * trans.c (gfc_trans_code): Set global locus after recursing. Fix
285         comment typo.
287 2004-10-30  Canqun Yang  <canqun@nudt.edu.cn>
289         * check.c (gfc_check_rand): Allow missing optional argument.
290         (gfc_check_irand): Ditto.
291         * intrinsic.c (add_functions): Set arg optional flag for {i,}rand.
293 2004-10-28  Scott Robert Ladd  <scott.ladd@coyotegulch.com>
295         PR fortran/13490, PR fortran/17912
296         * gcc/fortran/gfortran.h: Added pedantic_min_int to gfc_integer_info
297         * gcc/fortran/gfortran.h: Added ARITH_ASYMMETRIC to arith
298         * gcc/fortran/arith.c: Added support for an "asymmetric integer"
299         warning when compiling with pedantic.
300         * gcc/fortran/arith.c: Set minimum integer values to reflect
301         realities of two's complement signed integers. Added
302         pedantic minimum.
304 2004-10-17  Andrew Pinski  <pinskia@physics.uc.edu>
306         * Make-lang.in (F95_ADDITIONAL_OBJS): Kill.
307         (f951): Do not depend on F95_ADDITIONAL_OBJS and don't
308         link it in.
310 2004-10-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
312         * trans-decl.c (generate_local_decl): Simplify logic, fix comment
313         typo.
314         (gfc_generate_function_code): Fix formatting issue.
316 2004-10-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
318         * module.c: Fix formatting issues.
320 2004-10-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
322         * module.c (mio_interface_rest): Set where member of interface
323         while loading.
325 2004-10-08  Andrew Pinski  <pinskia@physics.uc.edu>
327         PR fortran/17901
328         * options.c (gfc_handle_option): Add break after handing the
329         J/M option.
331 2004-10-08  Tobias Schlueter  <tobias.shclueter@physik.uni-muenchen.de>
333         * arith.c: Fix formatting issues.
335 2004-10-07  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
337         PR fortran/17676
338         * resolve.c (resolve_operator): Use correct operator name in message.
340 2004-10-07  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
342         * primary.c (match_boz_constant): Allow kind parameter suffixes.
343         Move standard warning further to the front.
345 2004-10-07  Kazu Hirata  <kazu@cs.umass.edu>
347         * trans-stmt.c: Fix a comment typo.
349 2004-10-07  Paul Brook  <paul@codesourcery.com>
351         PR fortran/17678
352         * trans-array.c (gfc_trans_deferred_array): Leave use associated
353         variables alone.
355 2004-10-06  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
357         PR fortran/17568
358         * simplify.c (twos_complement): New function.
359         (gfc_simplify_ishft, gfc_simplify_ishftc): Revise.
361         * simplify.c (gfc_simplify_abs): Use mpfr_hypot for CABS.
363 2004-10-06  Paul Brook  <paul@codesourcery.com>
365         * trans-stmt.c (gfc_trans_simple_do): New function.
366         (gfc_trans_do): Use it.  Evaluate iteration bounds before entering
367         loop.  Update comments.
369 2004-10-04  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
371         PR fortran/17283
372         * iresolve.c (gfc_resolve_pack): Choose function depending if mask
373         is scalar.
375         PR fortran/17631
376         * intrinsic.c (add_sym_5): Remove.
377         (add_subroutines): Add resolution function for MVBITS.
378         * intrinsic.h (gfc_resolve_mvbits): Declare resolution function for
379         MVBITS
380         * iresolve.c (gfc_resolve_mvbits): New function.
381         (gfc_resolve_random_number): Remove empty line at end of function.
383         * trans-const.c (gfc_build_cstring_const): New function.
384         (gfc_init_cst): Use new function.
385         * trans-const.h (gfc_build_cstring_const): Add prototype.
386         * trans-io.c (set_string, set_error_locus): Use new function.
387         * trans-stmt.c (gfc_trans_goto): Use new function.
389         PR fortran/17708
390         * parse.c (accept_statement): Don't treat END DO like END IF and
391         END SELECT.
392         (parse_do_block): Generate possible END DO label inside END DO
393         block.
395         PR fortran/17776
396         * check.c (gfc_check_system_sub): New function.
397         * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SYSTEM.
398         * intrinsic.c (add_functions): Add 'system'.
399         (add_subroutines): Add 'system'.
400         * intrinsic.h (gfc_check_etime_sub, gfc_check_getcwd_sub):
401         Move prototypes to other suborutines.
402         (gfc_check_system_sub, gfc_resolve_system, gfc_resolve_system_sub):
403         Add prototype.
404         (gfc_resolve_system_clock): Fix formatting of prototype.
405         * iresolve.c (gfc_resolve_system, gfc_resolve_system_sub): New
406         functions.
407         * trans-intrinsic.c (gfc_conv_intrinsic_function): Deal with
408         GFC_ISYM_SYSTEM.
410 2004-10-04  Erik Schnetter  <schnetter@aei.mpg.de>
412         * scanner.c (preprocessor_line): Accept preprocessor lines without
413         file names.  Check file names for closing quotes.  Handle escaped
414         quotes in file names.
416 2004-10-04  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
417         Paul Brook  <paul@codesourcery.com>
419         * trans-array.c (gfc_conv_expr_descriptor): Check for substriungs.
420         Use gfc_get_expr_charlen.
421         * trans-expr.c (gfc_get_expr_charlen): New function.
422         * trans.h (gfc_get_expr_charlen): Add prototype.
424 2004-10-04  Kazu Hirata  <kazu@cs.umass.edu>
426         * trans-intrinsic.c: Fix a comment typo.
428 2004-10-03  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
430         * simplify.c (range_check): Remove blank line at beginning of function.
431         (gfc_simplify_dint): Same at end of function.
432         (gfc_simplify_exponent, gfc_simplify_fraction): Simplify calculations.
433         (gfc_simplify_bound): Fix indentation.
434         (gfc_simplify_log10): Simplify calculation.
435         (gfc_simplify_min, gfc_simplify_max): Remove blank line at beginning
436         of function.
437         (gfc_simplify_nearest): Same at end of function.
438         (gfc_simplify_nint, gfc_simplify_idnint): Same at beginning of
439         function.
440         (gfc_simplify_rrspacing, gfc_simplify_set_exponent,
441         gfc_simplify_spacing): Simplify calulations.
443 2004-10-03  Feng Wang  <fengwang@nudt.edu.cn>
445         * trans-intrinsic.c: Fix comments on spacing and rrspacing
446         (gfc_conv_intrinsic_rrspacing): Add fold on constant trees.
448 2004-10-01  Jan Hubicka  <jh@suse.cz>
450         * f95-lang.c (gfc_expand_function): Update call of
451         tree_rest_of_compilation.
452         * trans-decl.c (gfc_generate_constructors): Likewise.
454 2004-09-26  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
456         * trans-intrinsic.c: Comment fixes.
458 2004-09-25  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
460         * decl.c (add_init_expr_to_sym, variable_decl): Comment fixes.
462 2004-09-24  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
464         * trans-types.c (gfc_return_by_reference): Remove superfluous
465         assertion.
467         * intrinsic.h (gfc_resolve_getcwd): Update prototype.
468         * iresolve.c (gfc_resolve_getcwd): Add second argument to function.
470         PR fortran/17615
471         * trans-expr.c (gfc_trans_arrayfunc_assign): Look at resolved
472         function to determine return type.
474 2004-09-20  Jan Hubicka  <jh@suse.cz>
476         * trans-decl.c (build_entry_thunks): Finalize the function; do not lower
477         tree.
478         (gfc_generate_function_code): Likewise.
480 2004-09-20  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
482         PR fortran/15957
483         * simplify.c (gfc_simplify_reshape): Set shape of return value
484         correctly.
486 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
487             Zack Weinberg  <zack@codesourcery.com>
489         * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class
490         enumeration constants.
492 2004-09-17  Paul Brook  <paul@codesourcery.com>
494         * gfortran.h (struct gfc_linebuf): Don't use C99 empty arrays.
495         (gfc_linebuf_header_size): Define.
496         * scanner.c (load_file): Use it.
498 2004-09-16  Kazu Hirata  <kazu@cs.umass.edu>
500         * array.c, data.c, decl.c, dependency.c, error.c, f95-lang.c,
501         interface.c, intrinsic.c, io.c, misc.c, module.c, parse.h,
502         resolve.c, scanner.c, trans-array.c, trans-array.h,
503         trans-common.c, trans-const.h, trans-decl.c, trans-expr.c,
504         trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
505         trans.h: Fix comment typos.  Follow spelling conventions.
507 2004-09-16  Victor Leikehman  <lei@il.ibm.com>
509         PR/15364
510         * trans-io.c (transfer_array_component): New function.
511         (transfer_expr): For array fields, call transfer_array_component.
513 2004-09-16  Kazu Hirata  <kazu@cs.umass.edu>
515         * gfortran.texi: Fix a typo.
517 2004-09-15  Aaron W. LaFramboise  <aaronavay62@aaronwl.com>
519         * parse.c (eof_buf): Rename eof to eof_buf.
520         (unexpected_eof): Same.
521         (gfc_parse_file): Same.
523 2004-09-15  Steven G. Kargl  <kargls@comcast.net>
525         * check.c (gfc_check_getcwd_sub): New function.
526         * gfortran.h (GFC_ISYM_GETCWD): New symbol.
527         * intrinsic.c (add_functions): Add function definition;
528         Use symbol.
529         * intrinsic.c (add_subroutines): Add subroutine definitions.
530         * intrinsic.h: Add prototypes.
531         * iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub):
532         New functions.
533         * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol.
535 2004-09-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
537         PR fortran/16485
538         * module.c (write_symbol): Don't fill in module name here.
539         (write_symbol0): Fill in here instead.
541 2004-09-14  Kazu Hirata  <kazu@cs.umass.edu>
543         * data.c, decl.c, f95-lang.c, gfortran.h, match.c,
544         trans-array.c, trans-common.c, trans-expr.c,
545         trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.h: Fix
546         comment typos.  Follow spelling conventions.
548 2004-09-09  Paul Brook  <paul@codesourcery.com>
550         * scanner.c (get_file): Add ATTRIBUTE_UNUSED.
552 2004-09-08  Paul Brook  <paul@codesourcery.com>
554         * array.c: Don't include assert.h.
555         * data.c: Don't include assert.h.  Replace assert and abort with
556         gcc_assert and gcc_unreachable.
557         * dependency.c: Ditto.
558         * f95-lang.c: Ditto.
559         * iresolve.c: Ditto.
560         * resolve.c: Ditto.
561         * simplify.c: Ditto.
562         * symbol.c: Ditto.
563         * trans-array.c: Ditto.
564         * trans-common.c: Ditto.
565         * trans-const.c: Ditto.
566         * trans-decl.c: Ditto.
567         * trans-expr.c: Ditto.
568         * trans-intrinsic.c: Ditto.
569         * trans-io.c: Ditto.
570         * trans-stmt.c: Ditto.
571         * trans-types.c: Ditto.
572         * trans.c: Ditto.
574 2004-09-07  Per Bothner  <per@bothner.com>
575         Paul Brook  <paul@codesourcery.com>
577         * error.c (show_locus): Handle mapped locations.
578         * f95-lang.c (gfc_be_parse_file): Initialize mapped locations.
579         * gfortran.h: Include input.h.
580         (struct gfc_linebuf): Use source_location.
581         * scanner.c (get_file): Initialize linemap.
582         (preprocessor_line): Pass extra argument to get_file.
583         (load_file): Ditto.  Setup linemap.
584         (gfc_new_file): Handle mapped locations.
585         * trans-common.c (build_field, build_equiv_decl, build_common_decl):
586         Set decl source locations.
587         (gfc_trans_common): Set blank common block location.
588         * trans-decl.c (gfc_set_decl_location): New function.
589         (gfc_get_label_decl, gfc_get_symbol_decl): Use it.
590         (trans_function_start): Move call to gfc_set_backend_locus..
591         (build_function_decl): ... to here.
592         (build_entry_thunks): Set and restore the backend locus.
593         (gfc_generate_constructors): Remove excess arguments to
594         init_function_start.
595         (gfc_generate_block_data): Add comments.  Set the decl locus.
596         * trans-io.c (set_error_locus): Handle mapped locations.
597         * trans.c (gfc_get_backend_locus, gfc_get_backend_locus): Ditto.
598         (gfc_trans_code): Use SET_EXPR_LOCATION.
599         (gfc_generate_code): Override the location of the new symbol.
600         * trans.h (gfc_set_decl_location): Add prototype.
602 2004-08-31  Paul Brook  <paul@codesourcery.com>
604         * trans-types.c (gfc_type_for_mode): Return NULL for unknown modes.
606 2004-09-01  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
608         PR fortran/15327
609         * trans-intrinsic.c (gfc_conv_intrinsic_merge): Do the right thing for
610         strings.
612 2004-09-01  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
614         PR fortran/16400
615         PR fortran/16404
616         (port from g95)
617         * resolve.c (resolve_transfer): New function.
618         (resolve_code): Call resolve_transfer in case of EXEC_TRANSFER.
620 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
622         PR fortran/16579
623         * trans-types.c (gfc_init_types): Make gfc_character1_type_node an
624         unsigned char.
626 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
628         * CONTRIB, NEWS, README, TODO: Remove obsolete files.
630 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
632         PR fortran/17244
633         * trans-types.c (gfc_return_by_reference): Remove TODO error,
634         add comment pointing out possible issue WRT compatibility with g77.
636 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
638         * trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace
639         all occurences of 'gfc_strlen_type_node' by
640         'gfc_charlen_type_node'.
641         * trans-types.h: Same. Also update comment accordingly.
643 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
645         * primary.c: Update copyright boilerplate to say GCC.
646         * f95-lang.c: Change initial comment to say gfortran.
648 2004-08-31  Paul Brook  <paul@codesourcery.com>
650         * trans-types.h: Add comments.
651         (intmax_type_node, string_type_node, const_string_type_node): Remove.
653 2004-08-30  Richard Henderson  <rth@redhat.com>
655         * Make-lang.in (fortran/f95-lang.o): Update dependencies.
656         (fortran/trans-decl.o, fortran/trans-types.o): Likewise.
657         * gfortran.h (gfc_integer_info): Add c_char, c_short, c_int,
658         c_long, c_long_long.
659         (gfc_logical_info): Add c_bool.
660         (gfc_real_info): Add mode_precision, c_float, c_double, c_long_double.
661         * trans-array.c (gfc_array_allocate): Use TYPE_PRECISION
662         rather than gfc_int[48]_type_node for allocate choice.
663         * trans-decl.c (gfc_build_intrinsic_function_decls): Cache
664         local copies of some kind type nodes.
665         (gfc_build_builtin_function_decls): Likewise.
666         * trans-expr.c (gfc_conv_power_op): Likewise.
667         * trans-intrinsic.c (gfc_conv_intrinsic_index,
668         gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify,
669         gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Likewise.
670         * trans-stmt.c (gfc_trans_pause, gfc_trans_stop,
671         gfc_trans_character_select, gfc_trans_allocate): Likewise.
672         * trans-io.c (gfc_pint4_type_node): Move into ...
673         (gfc_build_io_library_fndecls): ... here.  Cache local copies of
674         some kind type nodes.
675         * trans-types.c (gfc_type_nodes): Remove.
676         (gfc_character1_type_node, gfc_strlen_type_node): New.
677         (gfc_integer_types, gfc_logical_types): New.
678         (gfc_real_types, gfc_complex_types): New.
679         (gfc_init_kinds): Fill in real mode_precision.
680         (gfc_build_int_type, gfc_build_real_type): New.
681         (gfc_build_complex_type, gfc_build_logical_type): New.
682         (c_size_t_size): New.
683         (gfc_init_types): Loop over kinds.
684         (gfc_get_int_type, gfc_get_real_type): Use gfc_validate_kind.
685         (gfc_get_complex_type, gfc_get_logical_type): Likewise.
686         (gfc_get_character_type_len): Likewise.
687         (gfc_type_for_size): Loop over kinds; use a reduced set of
688         unsigned type nodes.
689         (gfc_type_for_mode): Loop over kinds.
690         (gfc_signed_or_unsigned_type): Use gfc_type_for_size.
691         (gfc_unsigned_type, gfc_signed_type): Use gfc_signed_or_unsigned_type.
692         * trans-types.h (F95_INT1_TYPE, F95_INT2_TYPE, F95_INT4_TYPE,
693         F95_INT8_TYPE, F95_INT16_TYPE, F95_REAL4_TYPE, F95_REAL8_TYPE,
694         F95_REAl16_TYPE, F95_COMPLEX4_TYPE, F95_COMPLEX8_TYPE,
695         F95_COMPLEX16_TYPE, F95_LOGICAL1_TYPE, F95_LOGICAL2_TYPE,
696         F95_LOGICAL4_TYPE, F95_LOGICAL8_TYPE, F95_LOGICAL16_TYPE,
697         F95_CHARACTER1_TYPE, NUM_F95_TYPES, gfc_type_nodes,
698         gfc_int1_type_node, gfc_int2_type_node, gfc_int4_type_node,
699         gfc_int8_type_node, gfc_int16_type_node, gfc_real4_type_node,
700         gfc_real8_type_node, gfc_real16_type_node, gfc_complex4_type_node,
701         gfc_complex8_type_node, gfc_complex16_type_node,
702         gfc_logical1_type_node, gfc_logical2_type_node,
703         gfc_logical4_type_node, gfc_logical8_type_node,
704         gfc_logical16_type_node, gfc_strlen_kind): Remove.
705         (gfc_character1_type_node): Turn in to a variable.
706         (gfc_strlen_type_node): Likewise.
708 2004-08-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
710         * gfortran.h (gfc_namespace): Add new field is_block_data.
711         * parse.c (accept_statement): Remove special handling for BLOCK DATA.
712         (parse_block_data): Record BLOCK DATA name, set is_block_data field.
713         * trans.c (gfc_generate_code): Handle BLOCK DATA units.
714         * trans.h (gfc_generate_block_data): Add prototype.
715         * trans-decl.c (gfc_generate_block_data): New function.
717 2004-08-29  Richard Henderson  <rth@redhat.com>
719         * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_export.
720         * trans-types.c (gfc_init_kinds): Reject integer kinds larger
721         than two HOST_WIDE_INT.
723 2004-08-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
725         PR fortran/13910
726         * decl.c (free_variable, free_value, gfc_free_data, var_list,
727         var_element, top_var_list, match_data_constant, top_val_list,
728         gfc_match_data): Move here from match.c.
729         (match_old_style_init): New function.
730         (variable_decl): Match old-style initialization.
731         * expr.c (gfc_get_variable_expr): New function.
732         * gfortran.h (gfc_get_variable_expr): Add prototype.
733         * gfortran.texi: Start documentation for supported extensions.
734         * match.c: Remove the functions moved to decl.c.
735         * match.h (gfc_match_data): Move prototype to under decl.c.
736         * symbol.c (gfc_find_sym_tree, gfc_find_symbol): Add/correct
737         comments.
739 2004-08-29  Steven G. Kargl  <kargls@comcast.net>
740         Paul Brook  <paul@codesourcery.com>
742         * check.c (gfc_check_besn, gfc_check_g77_math1): New functions.
743         * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Define.
744         (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
745         (build_builtin_fntypes): New function.
746         (gfc_init_builtin_functions): Use it.
747         * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_{J,Y}{0,1,N}
748         and GFC_ISYM_ERF{,C}.
749         (gfc_c_int_kind): Declare.
750         * intrinsic.c (add_functions): Add [d]bes* and [d]erf*.
751         * intrinsic.h (gfc_check_besn, gfc_check_g77_math1, gfc_resolve_besn,
752         gfc_resolve_g77_math1): Add prototypes.
753         * resolve.c (gfc_resolve_besn, gfc_resolve_g77_math1): New functions.
754         * mathbuiltins.def: Add comment.  Change third argument.  Use
755         DEFINE_MATH_BUILTIN_C.  Add bessel and error functions.
756         * trans-intrinsic.c (BUILT_IN_FUNCTION): Define.
757         (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
758         * trans-types.c (gfc_c_int_kind): Declare.
759         (gfc_init_kinds): Set it.
761 2004-08-29  Steven G. Kargl  <kargls@comcast.net>
762         Paul Brook  <paul@codesourcery.com>
764         * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
765         (gfc_check_f, gfc_simplify_f): Add f0.
766         * intrinsic.c (do_check): Call f0.  Flatten.
767         (add_sym_0): Fix prototype.  Set f0.
768         (add_functions): Add getgid, getgid and getuid.
769         (resolve_intrinsic): Remove obsolete comment.
770         (do_simplify): Call f0.
771         * intrinsic.h (gfc_resolve_getgid, gfc_resolve_getpid,
772         gfc_resolve_getuid): Add prototypes.
773         * iresolve.c (gfc_resolve_getgid, gfc_resolve_getpid,
774         gfc_resolve_getuid): New functions.
775         * trans-intrinsic.c (gfc_conv_intrinsic_function): Handle
776         GFC_ISYM_GET?ID.
778 2004-08-28  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
780         * error.c (gfc_error_init_1): Remove blank line in front of
781         function body. Add missing blank.
782         (gfc_buffer_error, error_char, error_string): Remove blank line in
783         front of function body.
784         (show_locus): Add comma in comment.
785         (gfc_clear_warning, gfc_warning_check, gfc_clear_error,
786         gfc_push_error, gfc_pop_error): Remove blank line in front of
787         function body.
788         (gfc_get_errors): Typo fix in comment in front of function. Remove
789         blank line in front of function body.
791 2004-08-27  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
793         * gfortran.h (gfc_default_*_kind): Remove prototypes, add extern
794         variable declaration of same name.
795         * arith.c, check.c, decl.c, dump_parse_tree.c, expr.c,
796         intrinsic.c, io.c, iresolve.c, match.c, options.c, primary.c,
797         resolve.c, simplify.c, symbol.c, trans-const.c, trans-io.c:
798         Replace all calls to gfc_default_*_kind with variable accesses.
799         * trans-types.c: Same as above.
800         (gfc_default_*_kind_1): Rename to gfc_default_*_kind, remove
801         static qualifier. Replace all occurences.
802         (gfc_default_*_kind): Remove functions.
804 2004-08-26  Richard Henderson  <rth@redhat.com>
806         * arith.c: Include system.h, not real system headers.
807         (MPZ_NULL, MPF_NULL, DEF_GFC_INTEGER_KIND, DEF_GFC_LOGICAL_KIND,
808         DEF_GFC_REAL_KIND, GFC_SP_KIND, GFC_SP_PREC, GFC_SP_EMIN, GFC_SP_EMAX,
809         GFC_DP_KIND, GFC_DP_PREC, GFC_DP_EMIN, GFC_DP_EMAX, GFC_QP_KIND,
810         GFC_QP_PREC, GFC_QP_EMIN, GFC_QP_EMAX): Remove.
811         (gfc_integer_kinds, gfc_logical_kinds, gfc_real_kinds,
812         gfc_index_integer_kind, gfc_default_integer_kind,
813         gfc_default_real_kind,gfc_default_double_kind,
814         gfc_default_character_kind, gfc_default_logical_kind,
815         gfc_default_complex_kind, validate_integer, validate_real,
816         validate_logical, validate_character,
817         gfc_validate_kind): Move to trans-types.c.
818         (gfc_set_model_kind): Use gfc_validate_kind.
819         (gfc_set_model): Just copy the current precision to default.
820         (gfc_arith_init_1): Use mpfr precision 128 for integer setup.
821         * f95-lang.c (gfc_init_decl_processing): Invoke gfc_init_kinds.
822         * gfortran.h: Update file commentary.
823         * trans-types.c (MAX_INT_KINDS, MAX_REAL_KINDS): New.
824         (gfc_default_integer_kind_1, gfc_default_real_kind_1,
825         gfc_default_double_kind_1, gfc_default_character_kind_1,
826         gfc_default_logical_kind_1, gfc_default_complex_kind_1): New.
827         (gfc_init_kinds): New.
828         (gfc_init_types): Don't set gfc_index_integer_kind here.
829         * trans-types.h (gfc_init_kinds): Declare.
830         * doc/invoke.texi: Clarify DOUBLE PRECISION behaviour wrt -r8.
832 2004-08-26  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
834         * check.c (gfc_check_atan2): New function.
835         * intrinsic.c (add_functions): Use gfc_check_atan2 for ATAN2
836         * intrinsic.h (gfc_check_atan2): Add prototype.
838 2004-08-25  Richard Henderson  <rth@redhat.com>
840         * arith.c (gfc_validate_kind): Add may_fail argument; abort if
841         false and we don't validate the kind.
842         (gfc_check_integer_range, gfc_check_real_range): Update to match.
843         * check.c (kind_check): Likewise.
844         * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Likewise.
845         (match_char_spec, match_logical_spec): Likewise.
846         * gfortran.h (gfc_validate_kind): Likewise.
847         * options.c (gfc_handle_option): Likewise.
848         * primary.c (match_integer_constant, match_real_constant,
849         match_string_constant, match_logical_constant,
850         match_const_complex_part): Likewise.
851         * simplify.c (get_kind, gfc_simplify_bit_size, gfc_simplify_digits,
852         gfc_simplify_epsilon, gfc_simplify_huge, gfc_simplify_ibclr,
853         gfc_simplify_ibset, gfc_simplify_ishft, gfc_simplify_ishftc,
854         gfc_simplify_maxexponent, gfc_simplify_minexponent,
855         gfc_simplify_nearest, gfc_simplify_not, gfc_simplify_precision,
856         gfc_simplify_radix, gfc_simplify_range, gfc_simplify_rrspacing,
857         gfc_simplify_scale, gfc_simplify_spacing, gfc_simplify_tan,
858         gfc_simplify_tiny): Likewise.
859         * trans-intrinsic.c (gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod,
860         gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
861         prepare_arg_info): Likewise.
863 2004-08-25  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
865         * expr.c (gfc_check_assign): Add comment. Add new warning.
866         * trans-expr.c (gfc_conv_function_call): Correctly dereference
867         result of pointer valued function when not in pointer assignment.
869 2004-08-25  Paul Brook  <paul@codesourcery.com>
871         * config-lang.in: Remove dead commented line.
872         * module.c: Replace g95 with gfortran in comment.
874 2004-08-25  Paul Brook  <paul@codesourcery.com>
876         PR fortran/17190
877         * arith.c (gfc_mpfr_to_mpz): Workaround mpfr bug.
879 2004-08-25  Paul Brook  <paul@codesourcery.com>
881         PR fortran/17144
882         * trans-array.c (gfc_trans_allocate_temp_array): Remove
883         string_length argument.
884         (gfc_trans_array_ctor_element): New function.
885         (gfc_trans_array_constructor_subarray): Use it.
886         (gfc_trans_array_constructor_value): Ditto.  Handle constant
887         character arrays.
888         (get_array_ctor_var_strlen, get_array_ctor_strlen): New functions.
889         (gfc_trans_array_constructor): Use them.
890         (gfc_add_loop_ss_code): Update to new gfc_ss layout.
891         (gfc_conv_ss_descriptor): Remember section string length.
892         (gfc_conv_scalarized_array_ref): Ditto.  Remove dead code.
893         (gfc_conv_resolve_dependencies): Update to new gfc_ss layout.
894         (gfc_conv_expr_descriptor): Ditto.
895         (gfc_conv_loop_setup): Ditto.  Spelling fixes.
896         * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
897         * trans-const.c (gfc_conv_constant):  Update to new gfc_ss layout.
898         * trans-expr.c (gfc_conv_component_ref): Turn error into ICE.
899         (gfc_conv_variable): Set string_length from section.
900         (gfc_conv_function_call): Remove extra argument.
901         (gfc_conv_expr, gfc_conv_expr_reference): Update to new gfc_ss layout.
902         * trans-types.c (gfc_get_character_type_len): New function.
903         (gfc_get_character_type): Use it.
904         (gfc_get_dtype): Return zero for internal types.
905         * trans-types.h (gfc_get_character_type_len): Add prototype.
906         * trans.h (struct gfc_ss): Move string_length out of union.
908 2004-08-25  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
910         * trans.h (build2_v, build3_v): New macros.
911         (build_v): Remove.
912         * f95-lang.c (gfc_truthvalue_conversion): Use build2 instead of
913         build.
914         * trans-array.c (gfc_conv_descriptor_data,
915         gfc_conv_descriptor_offset, gfc_conv_descriptor_dimension,
916         gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
917         gfc_conv_descriptor_ubound, gfc_trans_allocate_array_storage,
918         gfc_trans_allocate_temp_array,
919         gfc_trans_array_constructor_subarray,
920         gfc_trans_array_constructor_value, gfc_conv_array_index_ref,
921         gfc_trans_array_bound_check, gfc_conv_array_index_offset,
922         gfc_conv_scalarized_array_ref, gfc_conv_array_ref,
923         gfc_conv_array_ref, gfc_trans_preloop_setup,
924         gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
925         gfc_conv_loop_setup, gfc_array_init_size,
926         gfc_conv_array_initializer, gfc_trans_array_bounds,
927         gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
928         gfc_conv_expr_descriptor, gfc_conv_array_parameter,
929         gfc_trans_deferred_array): Use buildN and buildN_v macros instead
930         of build and build_v as appropriate.
931         * trans-common.c (create_common): Same.
932         * trans-decl.c (gfc_trans_auto_character_variable,
933         gfc_trans_entry_master_switch, gfc_generate_function_code): Same.
934         * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
935         gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
936         gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
937         gfc_conv_expr_op, gfc_conv_function_call,
938         gfc_trans_structure_assign): Same.
939         * trans-intrinsic.c (build_fixbound_expr, build_round_expr,
940         gfc_conv_intrinsic_aint, gfc_conv_intrinsic_bound,
941         gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
942         gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
943         gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_minmax,
944         gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
945         gfc_conv_intrinsic_arith, gfc_conv_intrinsic_minmaxloc,
946         gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
947         gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_singlebitop,
948         gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
949         gfc_conv_intrinsic_merge, gfc_conv_intrinsic_strcmp,
950         gfc_conv_allocated, gfc_conv_associated, prepare_arg_info,
951         gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
952         gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat,
953         gfc_conv_intrinsic_iargc): Same.
954         * trans-io.c (set_parameter_value, set_parameter_ref, set_string,
955         set_flag, add_case, io_result, transfer_namelist_element,
956         transfer_expr): Same.
957         * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_if_1,
958         gfc_trans_arithmetic_if, gfc_trans_do, gfc_trans_do_while,
959         gfc_trans_integer_select, gfc_trans_logical_select,
960         gfc_trans_character_select, gfc_trans_forall_loop,
961         gfc_trans_nested_forall_loop, gfc_do_allocate,
962         generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
963         compute_inner_temp_size, compute_overall_iter_number,
964         allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
965         gfc_trans_forall_1, gfc_evaluate_where_mask,
966         gfc_trans_where_assign, gfc_trans_allocate): Same.
967         * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Same.
968         * trans.c (gfc_add_modify_expr, gfc_finish_block,
969         gfc_build_array_ref, gfc_build_function_call,
970         gfc_trans_runtime_check): Same.
972 2004-08-25  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
974         * trans-const.c (gfc_conv_mpz_to_tree): Change call to
975         build_int_cst to build_int_cst_wide in accordance to Nathan's
976         previous patch.
978 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
980         * trans-array.c (gfc_trans_array_constructor_value): Adjust
981         build_int_cst calls.
982         * trans-const.c (gfc_build_string_const, gfc_init_constants,
983         gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise.
984         * trans-decl.c (gfc_get_symbol_decl, build_entry_thunks,
985         gfc_trans_entry_master_switch): Likewise.
986         * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
987         gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
988         * trans-io.c (add_case, set_error_locus,
989         transfer_namelist_element, transfer_expr): Likewise.
990         * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
991         gfc_trans_stop, gfc_trans_character_select): Likewise.
992         * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
993         * trans.c (gfc_trans_runtime_check): Likewise.
995 2004-08-24  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
997         * trans-decl.c, trans-types.c: Add and remove blank lines as
998         required.
1000 2004-08-24  Richard Henderson  <rth@redhat.com>
1002         * trans-const.c (gfc_conv_mpz_to_tree): Fix 64-bit shift warning.
1004 2004-08-24  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1006         * resolve.c (merge_argument_lists): Revert unintentionally
1007         committed change.
1009 2004-08-24  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1011         * trans-decl.c (build_function_decl): Fix spelling in comment.
1012         (build_entry_thunks): Remove code with no function.
1013         (gfc_build_intrinsic_function_decls): Remove empty line.
1015         * resolve.c (resolve_entries): Fix a bunch of comment typos.
1017 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
1019         * f95-lang.c (gfc_init_decl_processing): Adjust
1020         build_common_tree_nodes call.
1022 2004-08-24  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1024         * trans-types.c: Spelling and formatting fixes.
1026 2004-08-23  Richard Henderson  <rth@redhat.com>
1028         * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_getlimbn instead
1029         of going through an intermediate string.  Fix 32/64 int/long bug.
1031 2004-08-23  Eric Christopher  <echristo@redhat.com>
1033         * trans-types.c (gfc_type_for_mode): Remove VECTOR_TYPE_SUPPORTED_P
1034         usage. Use build_vector_type_for_mode for vector types.
1036 2004-08-22  Richard Henderson  <rth@redhat.com>
1038         PR 13465
1039         * data.c (find_con_by_offset): Search ordered list; handle
1040         elements with repeat counts.
1041         (gfc_assign_data_value_range): New.
1042         * gfortran.h (struct gfc_data_value): Make repeat unsigned.
1043         (gfc_assign_data_value_range): Declare.
1044         * match.c (top_val_list): Extract repeat count into a temporary.
1045         * resolve.c (values): Make left unsigned.
1046         (next_data_value): Don't decrement left.
1047         (check_data_variable): Use gfc_assign_data_value_range.
1049 2004-08-22  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1051         * trans-const.c, trans-decl.c, trans-expr.c: Spelling fixes.
1053 2004-08-22  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1055         * check.c (gfc_check_reduction): Rename to ...
1056         (check_reduction): ... this. Make static. Don't check type of
1057         first argument.
1058         (gfc_check_minval_maxval, gfc_check_prodcut_sum): New functions.
1059         * intrinsic.c (add_functions): Change MAXVAL, MINVAL, PRODUCT and
1060         SUM to use new check functions.
1061         (check_specific): Change logic to call new functions.
1062         * intrinsic.h (gfc_check_minval_maxval, gfc_check_product_sum):
1063         Add prototypes.
1064         (gfc_check_reduction): Remove prototype.
1066 2004-08-20  Paul Brook  <paul@codesourcery.com>
1067         Canqun Yang  <canqun@nudt.edu.cn>
1069         PR fortran/17077
1070         * trans-array.c (gfc_conv_array_parameter): Pass correct pointer
1071         for automatic arrays.
1072         * trans-types.c (gfc_get_nodesc_array_type): Add comment.
1074 2004-08-19  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1075         (Port from g95)
1077         PR fortran/17074
1078         * match.c (match_simple_forall, match_simple_where): Forward-declare.
1079         (gfc_match_if): Order statement list alphabetically, add WHERE and
1080         FORALL, remove double PAUSE.
1081         (gfc_match_simple_where, match_forall_header,
1082         gfc_match_simple_forall): New functions.
1083         (gfc_match_forall): Use match_forall_header.
1085 2004-08-19  Paul Brook  <paul@codesourcery.com>
1087         PR fortran/17091
1088         * gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0.
1089         * symbol.c (gfc_clear_attr): Use memset.
1091 2004-08-19  Paul Brook  <paul@codesourcery.com>
1093         PR fortran/14976
1094         PR fortran/16228
1095         * data.c (assign_substring_data_value): Remove.
1096         (create_character_intializer): New function.
1097         (gfc_assign_data_value): Track the typespec for the current
1098         subobject.  Use create_character_intializer.
1100 2004-08-19  Erik Schnetter  <schnetter@aei.mpg.de>
1102         PR fortran/16946
1103         * check.c (gfc_check_reduction): New function.
1104         (gfc_check_minval_maxval): Removed.
1105         (gfc_check_product): Removed.
1106         (gfc_check_sum): Removed.
1107         * intrinsic.h: Add/remove declarations for these.
1108         * gfortran.h: Add field f3red to union gfc_check_f.
1109         * intrinsic.c (add_sym_3red): New function.
1110         (add_functions): Register maxval, minval, product, and sum intrinsics
1111         through add_sym_3red.
1112         (check_specific): Handle f3red union field.
1113         * iresolve.c: Whitespace change.
1115 2004-08-18  Paul Brook  <paul@codesourcery.com>
1117         * trans-types.c (gfc_sym_type): Use pointer types for optional args.
1119 2004-08-18  Victor Leikehman  <lei@il.ibm.com>
1121         PR fortran/13278
1122         * trans-io.c (transfer_namelist_element): New. Recursively handle
1123         derived-type variables.  Pass string lengths.
1124         (build_dt): Code moved to build_namelist, with some
1125         changes and additions.
1126         (gfc_build_io_library_fndecls): Declare the fifth
1127         argument in st_set_nml_var_char -- string_length.
1129 2004-08-17  Paul Brook  <paul@codesourcery.com>
1130         Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1132         PR fortran/13082
1133         * decl.c (get_proc_name): Update mystery comment.
1134         (gfc_match_entry): Check for errors earlier.  Add entry point to list.
1135         * dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes.
1136         * gfortran.h (symbol_attribute): Add entry_master.  Document entry.
1137         (struct gfc_entry_list): Define.
1138         (gfc_get_entry_list): Define.
1139         (struct gfc_namespace): Add refs and entries.
1140         (enum gfc_exec_op): Add EXEC_ENTRY.
1141         (struct gfc_code): Add ext.entry.
1142         * module.c (ab_attribute, attr_bits): Remove AB_ENTRY.
1143         (mio_symbol_attribute): Don't save/reture addr->entry.
1144         (mio_namespace_ref): Refcount namespaces.
1145         * parse.c (accept_statement): Handle ST_ENTRY.
1146         (gfc_fixup_sibling_symbols): Mark symbol as referenced.
1147         (parse_contained): Fixup sibling references to entry points
1148         after parsing the procedure body.
1149         * resolve.c (resolve_contained_fntype): New function.
1150         (merge_argument_lists, resolve_entries): New functions.
1151         (resolve_contained_functions): Use them.
1152         (resolve_code): Handle EXEC_ENTRY.
1153         (gfc_resolve): Call resolve_entries.
1154         * st.c (gfc_free_statement): Handle EXEC_ENTRY.
1155         * symbol.c (gfc_get_namespace): Refcount namespaces.
1156         (gfc_free_namespace): Ditto.
1157         * trans-array.c (gfc_trans_dummy_array_bias): Treat all args as
1158         optional when multiple entry points are present.
1159         * trans-decl.c (gfc_get_symbol_decl): Remove incorrect check.
1160         (gfc_get_extern_function_decl): Add assertion.  Fix coment.
1161         (create_function_arglist, trans_function_start, build_entry_thunks):
1162         New functions.
1163         (gfc_build_function_decl): Rename ...
1164         (build_function_decl): ... to this.
1165         (gfc_create_function_decl): New function.
1166         (gfc_generate_contained_functions): Use it.
1167         (gfc_trans_entry_master_switch): New function.
1168         (gfc_generate_function_code): Use new functions.
1169         * trans-stmt.c (gfc_trans_entry): New function.
1170         * trans-stmt.h (gfc_trans_entry): Add prototype.
1171         * trans-types.c (gfc_get_function_type): Add entry point argument.
1172         * trans.c (gfc_trans_code): Handle EXEC_ENTRY.
1173         (gfc_generate_module_code): Call gfc_create_function_decl.
1174         * trans.h (gfc_build_function_decl): Remove.
1175         (gfc_create_function_decl): Add prototype.
1177 2004-08-15  Andrew Pinski  <apinski@apple.com>
1179         PR fortran/17030
1180         * f95-lang.c (gfc_init_builtin_functions): Initialize the builtins
1181         for cabs{,f} and copysign{,f}.
1182         * trans-decl.c (gfor_fndecl_math_cabsf): Delete.
1183         (gfor_fndecl_math_cabs): Delete.
1184         (gfor_fndecl_math_sign4): Delete.
1185         (gfor_fndecl_math_sign8): Delete.
1186         (gfc_build_intrinsic_function_decls): Remove the
1187         initializing of cabs{,f} and copysign{,f} functions.
1188         * trans-intrinsic.c (gfc_conv_intrinsic_abs): Use the builtins
1189         instead of the functions definitions.
1190         (gfc_conv_intrinsic_sign): Likewise.
1191         * trans.h (gfor_fndecl_math_cabsf): Delete.
1192         (gfor_fndecl_math_cabs): Delete.
1193         (gfor_fndecl_math_sign4): Delete.
1194         (gfor_fndecl_math_sign8): Delete.
1196 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
1198         * trans-array.c (gfc_trans_array_constructor_value): Use
1199         build_int_cst.
1200         * trans-const.c (gfc_build_string_const,
1201         gfc_init_constants, gfc_conv_mpz_to_tree,
1202         gfc_conv_constant_to_tree): Likewise.
1203         * trans-decl.c (gfc_get_symbol_decl): Likewise.
1204         * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
1205         gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
1206         * trans-io.c (add_case, set_error_locus, build_dt,
1207         transfer_expr): Likewise.
1208         * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
1209         gfc_trans_stop, gfc_trans_character_select): Likewise.
1210         * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
1211         * trans.c (gfc_trans_runtime_check): Likewise.
1213 2004-08-14  Paul Brook  <paul@codesourcery.com>
1215         * trans-decl.c (gfc_build_function_decl): Remove dead code.
1217 2004-08-14  Paul Brook  <paul@codesourcery.com>
1219         * trans-arry.c (gfc_trans_auto_array_allocation): Remove unused var.
1221 2004-08-13  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1223         * gfortran.h: Add comments.
1224         * parse.c (parse_contained): Fix comment typo.
1225         * resolve.c (was_declared): Ditto.
1226         * symbol.c: Ditto.
1228 2004-08-11  Paul Brook  <paul@codeourcery.com>
1230         PR fortran/16917
1231         * intrinsic.c (add_functions): Add dfloat as an alias for dble.
1233 2004-08-10  Richard Henderson  <rth@redhat.com>
1235         * f95-lang.c (gfc_init_builtin_functions): Remove
1236          __builtin_stack_alloc, add __builtin_alloca.
1237         * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR.
1238         * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
1240 2004-08-10  Paul Brook  <paul@codesourcery.com>
1242         * trans-io.c (transfer_expr): Handle pointters.
1244 2004-08-10  Paul Brook  <paul@codesourcery.com>
1246         PR fortran/16919
1247         * trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT.
1248         (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta.
1249         (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary):
1250         Handle GFC_SS_COMPONENT.
1251         (gfc_conv_ss_startstride): Ditto.  Set ss->shape.
1252         (gfc_conv_loop_setup): Tweak commends. Remove dead code.
1253         Use ss->shape.
1254         (gfc_conv_array_initializer): Call specific initializer routines.
1255         * trans-expr.c (gfc_trans_structure_assign): New function.
1256         (gfc_trans_subarray_assign): New function.
1257         (gfc_trans_subcomponent_assign): New fucntion
1258         (gfc_conv_structure): Use them.
1259         * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT.
1260         (gfc_ss): Add shape.
1262 2004-08-08  Victor Leikehman  <lei@il.ibm.com>
1264         * simplify.c (gfc_simplify_shape): Bugfix.
1265         * expr.c (gfc_copy_shape_excluding): New function.
1266         * gfortran.h (gfc_get_shape): Bugfix.
1267         (gfc_copy_shape_excluding): Added declaration.
1268         * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
1269         gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound,
1270         gfc_resolve_ubound, gfc_resolve_transpose): Added compile
1271         time resolution of shape.
1273 2004-08-06  Janne Blomqvist  <jblomqvi@cc.hut.fi>
1275         * intrinsic.c (add_subroutines): Add getenv and
1276         get_environment_variable. (add_sym_5s): New function.
1277         * intrinsic.h (gfc_resolve_get_environment_variable): Add
1278         prototype.
1279         * iresolve.c (gfc_resolve_get_environment_variable): New
1280         function.
1282 2004-08-06  Feng Wang  <fengwang@nudt.edu.cn>
1284         * f95-lang.c (gfc_init_builtin_functions): Fix the number of
1285         __builtin_pow[f] arguments.
1287 2004-08-06  Steven G. Kargl  <kargls@comcast.net>
1289         * arith.c: Add #define for model numbers.  Remove global GMP variables.
1290         (natural_logarithm,common_logarithm,exponential,sine,
1291         cosine,arctangent,hypercos,hypersine ): Remove.
1292         (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions.
1293         (arctangent2,gfc_arith_init_1,gfc_arith_done_1
1294         gfc_check_real_range, gfc_constant_result, gfc_range_check,
1295         gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times,
1296         gfc_arith_divide,complex_reciprocal,complex_pow_ui,
1297         gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real,
1298         gfc_convert_complex,gfc_int2real,gfc_int2complex,
1299         gfc_real2int,gfc_real2real,gfc_real2complex,
1300         gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP
1301         to MPFR, use new functions.
1302         * arith.h: Remove extern global variables.
1303         (natural_logarithm,common_logarithm,exponential, sine, cosine,
1304         arctangent,hypercos,hypersine): Remove prototypes.
1305         (arctangent2): Update prototype from GMP to MPFR.
1306         (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes.
1307         * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR.
1308         * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR.
1309         * gfortran.h (GFC_REAL_BITS): Remove.
1310         (arith): Add ARITH_NAN.
1311         Include mpfr.h.  Define GFC_RND_MODE.
1312         Rename GCC_GFORTRAN_H GFC_GFC_H.
1313         (gfc_expr): Convert GMP to MPFR.
1314         * module.c: Add arith.h, correct type in comment.
1315         (mio_gmp_real): Convert GMP to MPFR.
1316         (mio_expr):  Use gfc_set_model_kind().
1317         * primary.c:  Update copyright date with 2004.
1318         (match_real_constant,match_const_complex_part): Convert GMP to MPFR.
1319         * simplify.c: Remove global GMP variables
1320         (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag,
1321         gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint,
1322         gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan,
1323         gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx,
1324         gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh,
1325         gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon,
1326         gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor,
1327         gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int,
1328         gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log,
1329         gfc_simplify_log10,simplify_min_max,gfc_simplify_mod,
1330         gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint,
1331         gfc_simplify_rrspacing,gfc_simplify_scale,
1332         gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin,
1333         gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt,
1334         gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny,
1335         gfc_simplify_init_1,gfc_simplify_done_1):  Convert GMP to MPFR.
1336         Use new functions.
1337         * trans-const.c (gfc_conv_mpfr_to_tree): Rename from
1338         gfc_conv_mpf_to_tree.  Convert it to use MPFR
1339         (gfc_conv_constant_to_tree): Use it.
1340         * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree().
1341         * trans-intrinsic.c: Add arith.h, remove gmp.h
1342         (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR.
1344 2004-08-06  Victor Leikehman  <lei@il.ibm.com>
1345         Paul Brook  <paul@codesourcery.com>
1347         * trans-array.c (gfc_trans_allocate_array_storage,
1348         gfc_trans_allocate_temp_array, gfc_add_loop_ss_code,
1349         gfc_conv_loop_setup): For functions, if the shape of the result
1350         is not known in compile-time, generate an empty array descriptor for
1351         the result and let the callee to allocate the memory.
1352         (gfc_trans_dummy_array_bias): Do nothing for pointers.
1353         (gfc_conv_expr_descriptor): Use function return values directly.
1354         * trans-expr.c (gfc_conv_function_call): Always add byref call
1355         insn to pre chain.
1356         (gfc_trans_pointer_assignment): Add comments.
1357         (gfc_trans_arrayfunc_assign): Don't chain on expression.
1359 2004-08-01  Roger Sayle  <roger@eyesopen.com>
1361         * options.c (gfc_init_options): Don't warn about the use GNU
1362         extensions by default.
1363         (gfc_post_options): Warn about GNU extensions with -pedantic.
1364         (gfc_handle_option): Don't warn about GNU extensions with -std=gnu.
1366 2004-07-30  Richard Henderson  <rth@redhat.com>
1368         * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL
1369         for TREE_CONSTANTs.
1371 2004-07-25  Richard Henderson  <rth@redhat.com>
1373         * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL
1374         and DECL_IGNORED_P on RESULT_DECL.
1375         (gfc_generate_constructors): Likewise.
1377 2004-07-18  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1379         PR fortran/16465
1380         * lang.opt (ffixed-line-length-none, ffixed-line-length-): New
1381         options.
1382         (ffixed-line-length-80, ffixed-line-length-132): Remove.
1383         * options.c (gfc_handle_options): Deal with changed options.
1384         * scanner.c (load_line): Change second arg to 'char **',
1385         allocate if pointing to NULL. Keep track of buffer's length.
1386         Adapt buffer size to overlong lines. Pad lines to full length
1387         in fixed form.
1388         (load_file): Adapt to new interface of load_line.
1390 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
1392         * trans.h (builtin_function): Declare.
1394 2004-07-16  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1396         PR fortran/16404
1397         (parts ported from g95)
1398         * parse.h (gfc_state_data): New field do_variable.
1399         (gfc_check_do_variable): Add prototype.
1400         * parse.c (push_state): Initialize field 'do_variable'.
1401         (gfc_check_do_variable): New function.
1402         (parse_do_block): Remember do iterator variable.
1403         (parse_file): Initialize field 'do_variable'.
1404         * match.c (gfc_match_assignment, gfc_match_do,
1405         gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate):
1406         Add previously missing checks.
1407         (gfc_match_return): Reformat error message.
1408         * io.c (match_out_tag): New function.
1409         (match_open_element, match_close_element,
1410         match_file_element, match_dt_element): Call match_out_tag
1411         instead of match_vtag where appropriate.
1412         (match_io_iterator, match_io_element): Add missing check.
1413         (match_io): Reformat error message.
1414         (match_inquire_element): Call match_out_tag where appropriate.
1416         * parse.c (gfc_check_do_variable): Fix error locus.
1418 2004-07-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1420         PR fortran/15129
1421         * trans-decl.c (gfc_build_function_decl): Create a new chardecl
1422         for every assumed length character dummy argument.
1424         PR fortran/15140
1425         * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion.
1427         PR fortran/13792
1428         * simplify.c (gfc_simplify_bound): Copy the bound expression.
1430 2004-07-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1432         PR fortran/15324
1433         * trans-array.c gfc_trans_g77_array,
1434         gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init
1435         for assumed length characters.
1436         (gfc_conv_expr_descriptor): Set se->string_length if dealing
1437         with a character expression.
1438         (gfc_cvonv_array_parameter): Pass string length when passing
1439         character array according to g77 conventions.
1441 2004-07-12  Paul Brook  <paul@codesourcery.com>
1443         * expr.c (gfc_check_assign_symbol): Handle pointer assignments.
1444         * trans-array.c (gfc_trans_auto_array_allocation): Remove
1445         initialization code.
1446         * trans-common.c (create_common): Use gfc_conv_initializer.
1447         * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer.
1448         * trans-expr.c (gfc_conv_initializer): New function.
1449         (gfc_conv_structure): Use it.
1450         * trans.h (gfc_conv_initializer): Add prototype.
1452 2004-07-11  Paul Brook  <paul@codesourcery.com>
1454         PR fortran/15986
1455         * parse.c (gfc_fixup_sibling_symbols): Also look for untyped
1456         variables.
1457         (parse_contained): Mark contained symbols as referenced.
1459 2004-07-11  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1461         PR fortran/16455
1462         * module.c (gfc_dump_module, gfc_use_module): Print locus
1463         when opening of module file fails.
1465         PR fortran/16404
1466         * io.c (match_io): Flag 'WRITE(...), ...' as extension.
1468         PR fortran/16404
1469         * match.c (gfc_match_program): A program name is obligatory.
1470         (gfc_match_return): RETURN in main program is an extension.
1471         (gfc_match_block_data): A space is required before a block data
1472         name.
1474         PR fortran/16433
1475         * primary.c (match_boz_constant): Call gfc_notify_std only if
1476         we actually have a non-standard boz-literal-constant.
1478         PR fortran/15754
1479         * expr.c (gfc_check_assign): Print ranks if incompatible. Issue
1480         warning if assigning NULL().
1482 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
1484         * f95-lang.c (set_block): Remove.
1485         (gfc_clear_binding_stack): New.
1486         (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
1487         (struct binding_level): Remove block_created_by_back_end.
1488         (clear_binding_level): Likewise.
1489         (poplevel): Don't handle block_created_by_back_end.
1491 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1493         * trans-decl.c (gfc_create_module_variable): Nothing to do if
1494         symbol is in common, because we ...
1495         (gfc_generate_module_vars): Call gfc_trans_common.
1497 2004-07-10  Paul Brook  <paul@codesourcery.com>
1499         * trans-array.c (gfc_build_null_descriptor): New function.
1500         (gfc_trans_static_array_pointer): Use it.
1501         * trans-array.h (gfc_build_null_descriptor): Add prototype.
1502         * trans-expr.c (gfc_conv_structure): Handle array pointers.
1504 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1506         PR fortran/16336
1507         * decl.c (gfc_match_save): Use-associated common block
1508         doesn't collide.
1509         * gfortran.h (gfc_common_head): Add new field 'name'.
1510         Fix typo in comment after #endif.
1511         * match.c (gfc_get_common): Add new argument from_common,
1512         mangle name if flag is set, fill in new field in structure
1513         gfc_common_head.
1514         (match_common): Set new arg in call to gfc_get_common,
1515         use-associated common block doesn't collide.
1516         * match.h (gfc_get_common): Adapt prototype.
1517         * module.c (load_commons): Set new arg in call to
1518         gfc_get_common.
1519         * symbol.c (free_common_tree): New function.
1520         (gfc_free_namespace): Call new function.
1521         * trans-common.c (several functions): Remove argument
1522         'name', use name from gfc_common_head instead.
1524 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1526         * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
1527         and RHS match. Return early if the RHS is NULL().
1529         PR fortran/16336
1530         * match.c (match_common): Fix error reporting for used common.
1532         PR fortran/15969
1533         * trans-expr.c (gfc_conv_structure): Handle initialization
1534         of scalar pointer components.
1536         * parse.c (decode_statement): Fix matching of BLOCK DATA.
1538         * trans-decl.c (generate_local_decl): Remove workaround obsoleted
1539         by fix for PR 15481.
1541 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1543         * trans-common.c: Fix whitespace issues, make variable names
1544         more readable.
1545         (create_common): Additionally, make loop logic more obvious.
1547 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1548         Paul Brook  <paul@codesourcery.com>
1550         PR fortran/13415
1551         * trans-common.c (calculate_length): Remove ...
1552         (get_segment_info): Merge into here.  Save field type.
1553         (build_field): Use saved type.
1554         (create_common, new_condition, new_segment, finish_equivalences):
1555         Use new get_segment_info.
1556         * trans-types.c: Update comment.
1558 2004-07-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1560         PR fortran/14077
1561         * moduele.c (mio_symbol): Don't I/O initial values unless
1562         symbol is a parameter.
1564 2004-07-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1566         PR fortran/13201
1567         * resolve.c (resolve_symbol): Verify that the shape of a
1568         parameter array is not only explicit, but also constant.
1569         * array.c (gfc_is_compile_time_shape): New function.
1570         * gfortran.h (gfc_is_compile_time_shape): Add prototype.
1572 2004-07-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1574         PR fortran/15481
1575         PR fortran/13372
1576         PR fortran/13575
1577         PR fortran/15978
1578         * module.c (write_symbol, write_symtree): Remove workaround.
1579         * primary.c (match_actual_arglist): Enhance comment.
1580         (gfc_match_rvalue): Handle function call with first argument
1581         a keyword argument correctly.
1582         * resolve.c (resolve_symbol): Change call to
1583         gfc_set_default_type to issue error if no implicit type
1584         can be found.
1585         * trans-decl.c (gfc_create_module_variable): Remove workaround.
1587 2004-07-08  Paul Brook  <paul@codesourcery.com>
1589         * intrinsic.c (add_sym_4s): New function.
1590         (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
1592 2004-07-04  Janne Blomqvist  <jblomqvi@cc.hut.fi>
1593         Paul Brook  <paul@codesourcery.com>
1595         PR fortran/15280
1596         PR fortran/15665
1597         * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
1598         GFC_ISYM_COMMAND_ARGUMENT_COUNT.
1599         * intrinsic.c (add_functions):  Identify iargc.  Add
1600         command_argument_count.
1601         (add_subroutines): Resolve getarg.  Add get_command and
1602         get_command_argument.
1603         * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
1604         gfc_resolve_get_command_argument): Add prototypes.
1605         * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
1606         gfc_resolve_get_command_argument): New functions.
1607         * trans-decl.c (gfor_fndecl_iargc): New variable.
1608         (gfc_build_intrinsic_function_decls): Set it.
1609         * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
1610         (gfc_conv_intrinsic_function): Use it.
1611         * trans.h (gfor_fndecl_iargc): Declare.
1613 2004-07-04  Matthias Klose  <doko@debian.org>
1615         * Make-lang.in: Generate and install gfortran man page.
1616         * invoke.texi: Remove extra '@c man end'.
1618 2004-07-04  Richard Henderson  <rth@redhat.com>
1620         * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
1622 2004-07-04  Paul Brook  <paul@codesourcery.com>
1624         * decl.c (gfc_match_implicit_range): Don't use typespec.
1625         (gfc_match_implicit): Handle character selectors.
1626         * gfortran.h (gfc_set_implicit): Remove prototype.
1627         (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
1628         * parse.c (accept_statement): Don't call gfc_set_implicit.
1629         * symbol.c (new_ts): Remove.
1630         (gfc_set_implicit_none): Use same loop bounds as other functions.
1631         (gfc_set_implicit): Remove.
1632         (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
1633         (gfc_merge_new_implicit): Combine with gfc_set_implicit.
1635 2004-06-30  Richard Henderson  <rth@redhat.com>
1637         * match.c (var_element): Remove unused variable.
1639         * trans-decl.c (gfc_generate_function_code): Don't set
1640         x_whole_function_mode_p.
1641         (gfc_generate_constructors): Likewise.
1643 2004-06-30  Richard Henderson  <rth@redhat.com>
1645         * trans-decl.c (gfc_generate_function_code): Don't set
1646         immediate_size_expand.
1647         (gfc_generate_constructors): Likewise.
1649 2004-06-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1651         PR fortran/16161
1652         * decl.c (gfc_match_type_spec): Rename second argument to
1653         'implicit_flag', reverse meaning. Don't match_char_spec if
1654         'implicit_flag' is set. Rename to ...
1655         (match_type_spec): ... this.
1656         (gfc_match_implicit_none, match_implicit_range): Move here
1657         from match.c.
1658         (gfc_match_implicit): Move here from match.c, try to
1659         match_char_len if match_implicit_range doesn't succeed for
1660         CHARACTER implicits. Call renamed fucntion match_type_spec.
1661         (gfc_match_data_decl, match_prefix): Call renamed function
1662         match_type_spec.
1663         * match.c (gfc_match_implicit_none, match_implicit_range,
1664         gfc_match_implicit): Move to decl.c.
1665         * match.h (gfc_match_implicit_none, gfc_match_implicit):
1666         Move protoypes to section 'decl.c'.
1667         (gfc_match_type_spec): Remove prototype.
1669 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1671         * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
1672         copyright years.
1674 2004-06-29  Steven Bosscher  <stevenb@suse.de>
1676         Make sure types in assignments are compatible.  Mostly mechanical.
1677         * trans-const.h (gfc_index_one_node): New define.
1678         * trans-array.c (gfc_trans_allocate_array_storage,
1679         gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
1680         gfc_trans_array_constructor_value, gfc_trans_array_constructor,
1681         gfc_conv_array_ubound, gfc_conv_array_ref,
1682         gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
1683         gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
1684         gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
1685         gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
1686         types in assignments, conversions and conditionals for expressions.
1687         * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
1688         gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
1689         gfc_conv_function_call, gfc_trans_pointer_assignment,
1690         gfc_trans_scalar_assign): Likewise.
1691         * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
1692         gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
1693         gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
1694         gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
1695         gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
1696         gfc_conv_allocated, gfc_conv_associated,
1697         gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
1698         * trans-io.c (set_string): Likewise.
1699         * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
1700         gfc_do_allocate, generate_loop_for_temp_to_lhs,
1701         generate_loop_for_rhs_to_temp, compute_inner_temp_size,
1702         compute_overall_iter_number, gfc_trans_assign_need_temp,
1703         gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
1704         gfc_evaluate_where_mask, gfc_trans_where_assign,
1705         gfc_trans_where_2): Likewise.
1706         * trans-types.c (gfc_get_character_type, gfc_build_array_type,
1707         gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
1709         * trans.c (gfc_add_modify_expr): Add sanity check that types
1710         for the lhs and rhs are the same for scalar assignments.
1712 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1714         * dump-parse-tree.c (show_common): New function.
1715         (gfc_show_namespace): Show commons.
1717 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1718         Andrew Vaught  <andyv@firstinter.net>
1720         PR fortran/13249
1721         PR fortran/15481
1722         * decl.c (gfc_match_save): Adapt to new common structures,
1723         don't allow saving USE-associated common.
1724         * dump-parse-tree (gfc_show_attr): (saved_)common are not
1725         symbol attributes any longer.
1726         (gfc_show_symbol): Don't show old-style commons any longer.
1727         (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
1728         interface.
1729         * gfortran.h (symbol_attribute): Remove common and saved_common
1730         attributes.
1731         (gfc_symbol): Remove common_head element.
1732         (gfc_common_head): New struct.
1733         (gfc_get_common_head): New macro.
1734         (gfc_symtree): Add field 'common' to union.
1735         (gfc_namespace): Add field 'common_root'; change type of field
1736         'blank_common' to blank_common.
1737         (gfc_add_data): New prototype.
1738         (gfc_traverse_symtree): Expect a symtree as first argument
1739         instead of namespace.
1740         * match.c (gfc_get_common): New function.
1741         (match_common_name): Change to take char * as argument, adapt,
1742         fix bug with empty name.
1743         (gfc_match_common): Adapt to new data structures. Disallow
1744         redeclaration of USE-associated COMMON-block. Fix bug with
1745         empty common.
1746         (var_element): Adapt to new common structures.
1747         * match.h (gfc_get_common): Declare.
1748         * module.c: Add 2004 to copyright years, add commons to module
1749         file layout description.
1750         (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
1751         for removed attributes.
1752         (mio_symbol): Adapt to new way of storing common relations.
1753         (load_commons): New function.
1754         (read_module): Skip common list on first pass, load_commons at
1755         second.
1756         (write_commons): New function.
1757         (write_module): Call write_commons().
1758         * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
1759         functions related to removed attributes.
1760         (gfc_add_data): New function.
1761         (gfc_clear_attr): Don't set removed attributes.
1762         (gfc_copy_attr): Don't copy removed attributes.
1763         (traverse_symtree): Remove.
1764         (gfc_traverse_symtree): Don't traverse symbol
1765         tree of the passed namespace, but require a symtree to be passed
1766         instead. Unify with traverse_symtree.
1767         (gfc_traverse_ns): Call gfc_traverse_symtree according to new
1768         interface.
1769         (save_symbol): Remove setting of removed attribute.
1770         * trans-common.c (gfc_sym_mangled_common_id): Change to
1771         take 'char *' argument instead of 'gfc_symbol'.
1772         (build_common_decl, new_segment, translate_common): Adapt to new
1773         data structures, add new
1774         argument name.
1775         (create_common): Adapt to new data structures, add new
1776         argument name. Fix typo in intialization of derived types.
1777         (finish_equivalences): Add second argument in call to
1778         create_common.
1779         (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
1780         (gfc_trans_common): Adapt to new data structures.
1781         * trans-decl.c (gfc_create_module_variables): Remove test for
1782         removed attribute.
1784 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1786         * io.c: Add 2004 to copyright years.
1788 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1789         Andrew Vaught  <andyv@firstinter.net>
1791         * gfortran.h (gfc_gsymbol): New typedef.
1792         (gfc_gsym_root): New variable.
1793         (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
1794         * parse.c (global_used): New function.
1795         (parse_block_data): Check for double empty BLOCK DATA,
1796         use global symbol table.
1797         (parse_module): Use global symbol table.
1798         (add_global_procedure, add_global_program): New functions.
1799         (gfc_parse_file): Use global symbol table.
1800         * symbol.c (gfc_gsym_root): New variable.
1801         (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
1802         functions.
1804 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1806         * module.c (mio_gmp_real): Correct writing of negative numbers.
1808 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1810         PR fortran/15963
1811         * expr.c (check_intrinsic_op): Allow comparison of characters.
1812         Make logic easier.
1814 2004-06-26  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1815         Andrew Vaught  <andyv@firstinter.net>
1817         * decl.c (contained_procedure): New function.
1818         (match_end): Verify correctness of END STATEMENT in
1819         all cases.
1821 2004-06-26  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1822         Andrew Vaught  <andyv@firstinter.net>
1824         PR fortran/15190
1825         * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
1826         (decode_statement): Enforce required space in free-form.
1828 2004-06-22  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1830         * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
1831         * trans-array.c (gfc_conv_descriptor_data): Add operand
1832         for COMPONENT_REF.
1833         (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
1834         (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
1835         (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
1836         * trans-common.c (create_common): Likewise.
1837         * trans-expr.c (gfc_conv_component_ref): Likewise.
1838         * trans-io.c (set_parameter_value): Likewise.
1839         (set_parameter_ref, set_string, set_flag, io_result): Likewise.
1840         (transfer_expr): Likewise.
1841         * trans-decl.c (gfc_trans_auto_character_variable):
1842         Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
1843         (gfc_gimplify_function): New function.
1844         (gfc_generate_function-code): Properly handle nested functions.
1845         * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
1847 2004-06-22  Janne Blomqvist  <jblomqvi@cc.hut.fi>
1849         PR fortran/15750
1850         * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
1851         (gfc_resolve_inquire): Resolve the iolength tag.  Return
1852         SUCCESS at end of function if no failure has occured.
1853         * resolve.c (resolve_code): Resolve if iolength is encountered.
1854         * trans-io.c: (ioparm_iolength, iocall_iolength,
1855         iocall_iolength_done): New variables.
1856         (last_dt): Add IOLENGTH.
1857         (gfc_build_io_library_fndecls ): Set iolength related variables.
1858         (gfc_trans_iolength): Implement.
1859         (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
1861 2004-06-21  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de
1863         PR fortran/15511
1864         * scanner.c (load_line): Don't truncate preprocessor lines.
1865         Reformat error message.
1866         (preprocessor_line): Issue warning in case of malformed
1867         preprocessor line.
1869 2004-06-21  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1871         * resolve.c (resolve_symbol): Add comment in function body.
1872         (check_data_variable): Change type of mark to ar_type, adapt code
1873         accordingly.
1875 2004-06-21  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1877         * array.c (gfc_insert_constructor): Avoid redundant call to
1878         mpz_comp. Add 2004 to copyright years.
1880 2004-06-21  Joseph S. Myers  <jsm@polyomino.org.uk>
1882         * trans.h (stmtblock_t): Change has_scope to unsigned int.
1884 2004-06-20  Steven G. Kargl  <kargls@comcast.net>
1886         * arith.c (gfc_range_check): correct complex underflow.
1888 2004-06-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1890         PR fortran/15962
1891         * match.c (match_case_selector): Call gfc_match_init_expr
1892         instead of gfc_match_expr.
1893         * resolve.c (validate_case_label_expr): No need to check for
1894         constant, since it wouldn't have been matched with the fix to
1895         match.c.
1897 2004-06-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1899         PR fortran/15211
1900         * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
1901         of strings.
1903 2004-06-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1905         PR fortran/15510
1906         * trans-deecl.c (generate_local_decl): Do not issue warning for
1907         unused variables if they're use associated.
1909 2004-06-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1910         Andrew Vaught  <andyv@firstinter.net>
1912         PR fortran/14928
1913         * gfortran.h (gfc_check_f): Add new field f3ml.
1914         * check.c (gfc_check_minloc_maxloc): Take argument list instead
1915         of individual arguments, reorder if necessary.
1916         * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
1917         * intrinsic.c (add_sym_3ml): New function.
1918         (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
1919         (check_specific): Catch special case MINLOC, MAXLOC.
1921 2004-06-14  Paul Brook  <paul@codesourcery.com>
1923         * intrinsic.c (add_sym_2s): Use correct function types.
1925 2004-06-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1927         * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize.  Move data.c
1928         * data.c (gfc_get_section_index):  Remove dependency on trans.h.
1930 2004-06-12  Steven G. Kargl  <kargls@comcast.net>
1932         * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
1933         gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
1934         * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
1935         GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
1936         * trans-intrinsic.c:  Use symbols.
1937         * intrinsic.c (add_sym_2s): New function.
1938         * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
1939         * intrinsic.h: Function prototypes.
1940         * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
1941         gfc_resolve_srand):  New functions.
1943 2004-06-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1945         PR fortran/14957
1946         * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
1947         contained procedure.
1949 2004-06-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1951         PR fortran/12841
1952         * interface.c (compare_parameter, compare_actual_formal): Don't
1953         check types and array shapes for NULL()
1954         * trans-expr.c (conv_function_call): No double indirection for
1955         NULL()
1957 2004-06-09  Toon Moene  <toon@moene.indiv.nluug.nl>
1959         * trans-expr.c (gfc_conv_cst_int_power): Compute
1960         x**(-n) by converting it to (1/x)**n instead of
1961         1/x**n.
1963 2004-06-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1965         PR fortran/13372
1966         * module.c (write_symbol, write_symtree): Don't write symbols
1967         wrongly added to namespace.
1968         * trans-decl.c (gfc_create_module_variable): Don't create a
1969         backend decl for a symbol incorrectly added to namespace.
1971 2004-06-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1973         PR fortran/13201
1974         * resolve.c (resolve_symbol): Verify that parameter array has an
1975         explicit shape. Fix typos and coding style issues in surrounding
1976         lines.
1978 2004-06-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1980         PR fortran/15478
1981         * gfortran.texi: The documentation doesn't contain infomration on
1982         how to report bugs, and shouldn't, so remove the line which
1983         says it does.
1985 2004-06-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1987         * intrinsic.c (sort_actual): Keep track of type of missing
1988         arguments. (Missing from previous commit.)
1990 2004-06-03  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1992         * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
1993         * interface.c (compare_actual_formal): Keep type of omitted
1994         optional arguments.
1995         * trans-expr.c (gfc_conv_function_call): Add string length
1996         argument for omitted string argument.
1998 2004-06-03  Paul Brook  <paul@codesourcery.com>
2000         * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
2001         lists instead of compound expr chains.
2002         (gfc_trans_code): Annotate statement lists.
2004 2004-06-03  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2006         * trans-array.c: Fix spelling in comments.
2008 2004-06-02  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2010         PR fortran/15557
2011         * data.c (assign_substring_data_value): New function.
2012         (gfc_assign_data_value): Call the new function if we're dealing
2013         with a substring LHS.
2015 2004-06-01  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2017         PR fortran/15477
2018         * gfortran.h (GFC_VERSION): Remove.
2019         * gfortran.texi (version-gfortran): Remove, replace by version-GCC
2020         where used.
2022 2004-05-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2024         * trans-types.c: Fix spelling & layout in comments.
2026 2004-05-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2028         PR fortran/14067
2029         * trans-const.c (gfc_conv_string_init): Allow variable string
2030         length lower than initialization string length.
2032 2004-05-30  Paul Brook  <paul@codesourcery.com>
2034         PR fortran/15620
2035         * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
2036         * trans-expr.c (gfc_trans_string_copy): New function.
2037         (gfc_conv_statement_function): Use them.  Create temp vars.  Enforce
2038         character lengths.
2039         (gfc_conv_string_parameter): Use gfc_trans_string_copy.
2040         * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
2041         * trans.h (struct gfc_saved_var): Define.
2042         (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
2044 2004-05-30  Steven G. Kargl  <kargls@comcast.net>
2046         * iresolve.c (gfc_resolve_random_number): Clean up conditional.
2048 2004-05-29  Steven G. Kargl  <kargls@comcast.net>
2050         * simplify.c (gfc_simplify_log): Remove useless line of code.
2052 2004-05-29  Paul Brook  <paul@codesourcery.com>
2054         * trans-common.c (find_equivalence): Find multiple rules.
2056 2004-05-27  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2058         * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
2059         (gfc_current_locus): Declare new global variable.
2060         * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
2061         (gfc_current_locus1): Rename ...
2062         (gfc_current_locus): ... to this.
2063         (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
2064         skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
2065         gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
2066         gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
2067         and gfc_current_locus(), respectively.
2068         * array.c (match_subscript, gfc_match_array_ref, match_array_list,
2069         match_array_cons_element, gfc_match_array_constructor):
2070         Read/modify gfc_current_locus instead of calling gfc_set_locus()
2071         and gfc_current_locus().
2072         * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
2073         match_attr_spec, gfc_match_function_decl, gfc_match_end,
2074         attr_decl1, gfc_match_save): Likewise.
2075         * error.c (error_print, gfc_internal_error): Likewise.
2076         * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
2077         * interface.c (gfc_add_interface): Likewise.
2078         * io.c (gfc_match_format, match_dt_format, match_dt_element,
2079         match_io_iterator, match_io): Likewise.
2080         * match.c (gfc_match_space, gfc_match_eos,
2081         gfc_match_small_literal_int, gfc_match_st_label,
2082         gfc_match_strings, gfc_match_name, gfc_match_iterator,
2083         gfc_match_char, gfc_match, gfc_match_assignment,
2084         gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
2085         gfc_match_nullify, gfc_match_call, match_implicit_range,
2086         gfc_match_implicit, gfc_match_data, match_case_selector,
2087         gfc_match_case, match_forall_iterator): Likewise.
2088         * matchexp.c (gfc_match_defined_op_name, next_operator,
2089         match_level_1, match_mult_operand, match_ext_mult_operand,
2090         match_add_operand, match_ext_add_operand, match_level_2,
2091         match_level_3, match_level_4, match_and_operand, match_or_operand,
2092         match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
2093         * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
2094         * parse.c (match_word, decode_statement, next_free, next_fixed,
2095         add_statement, verify_st_order, parse_if_block, gfc_parse_file):
2096         Likewise.
2097         * primary.c (match_digits, match_integer_constant,
2098         match_boz_constant, match_real_constant, match_substring,
2099         next_string_char, match_charkind_name, match_string_constant,
2100         match_logical_constant, match_const_complex_part,
2101         match_complex_constant, match_actual_arg, match_keyword_arg,
2102         gfc_match_actual_arglist, gfc_match_structure_constructor,
2103         gfc_match_rvalue, gfc_match_variable): Likewise.
2104         * st.c (gfc_get_code): Likewise.
2105         * symbol.c (check_conflict, check_used, check_done,
2106         duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
2107         gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
2108         gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
2110 2004-05-26  Roger Sayle  <roger@eyesopen.com>
2112         * io.c (format_asterisk): Silence compiler warnings by correcting
2113         the number of elements of a "locus" initializer.
2115 2004-05-25  Roger Sayle  <roger@eyesopen.com>
2117         PR fortran/13912
2118         * matchexp.c: Allow unary operators after arithmetic operators
2119         as a GNU extension.
2120         (match_ext_mult_operand, match_ext_add_operand): New functions.
2121         (match_mult_operand): Tweak to call match_ext_mult_operand.
2122         (match_add_operand): Tweak to call match_ext_mult_operand.
2123         (match_level_2): Rearrange to call match_ext_add_operand.
2125 2004-05-25  Paul Brook  <paul@codesourcery.com>
2127         * expr.c (check_inquiry): Remove bogus tests.
2129 2004-05-23  Paul Brook  <paul@codesourcery.com>
2131         PR fortran/13773
2132         * expr.c (restricted_args): Remove redundant checks/argument.
2133         (external_spec_function): Update to match.
2134         (restricted_intrinsic): Rewrite.
2136 2004-05-23  Paul Brook  <paul@codesourcery.com>
2137         Victor Leikehman  <lei@haifasphere.co.il>
2139         * gfortran.h (struct gfc_symbol): Add equiv_built.
2140         * trans-common.c: Change int to HOST_WIDE_INT.  Capitalize error
2141         messages.
2142         (current_length): Remove.
2143         (add_segments): New function.
2144         (build_equiv_decl): Create initialized common blocks.
2145         (build_common_decl): Always add decl to bindings.
2146         (create_common): Create initializers.
2147         (find_segment_info): Reformat to match coding conventions.
2148         (new_condition): Use add_segments.
2149         (add_condition, find_equivalence, add_equivalences): Move iteration
2150         inside functions.  Only process each segment once.
2151         (new_segment, finish_equivalences, translate_common): Simplify.
2153 2004-05-23  Steven G. Kargl  <kargls@comcast.net>
2155         * check.c (gfc_check_random_seed): Issue for too many arguments.
2157 2004-05-22  Steven G. Kargl  <kargls@comcast.net>
2159         * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
2161 2004-05-22  Paul Brook  <paul@codesourcery.com>
2163         * dump-parse-tree.c (gfc_show_equiv): New function.
2164         (gfc_show_namespace): Use it.
2166 2004-05-22  Victor Leikehman  <lei@haifasphere.co.il>
2168         PR fortran/13249
2169         * symbol.c (gfc_add_common): Disable checks to work around other more
2170         fundamental inadequacies.
2172 2004-05-22  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
2174         * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
2175         only for functions.
2176         (gfc_build_function_decl): Likewise.
2178 2004-05-22  Steven G. Kargl  <kargls@comcast.net>
2180         * check.c (gfc_check_system_clock): New function.
2181         * intrinsic.c (add_sym_3s): New function.
2182         (add_subroutines): Use it.
2183         * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
2184         Add prototypes.
2185         * iresolve.c (gfc_resolve_system_clock): New function.
2187 2004-05-22  Steven G. Kargl  <kargls@comcast.net>
2189         * invoke.texi: Document -Wunderflow and spell check.
2190         * lang.opt: Add Wunderflow.
2191         * gfortran.h (gfc_option_t): Add warn_underflow option.
2192         * options.c (gfc_init_options, set_Wall): Use it.
2193         * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
2194         * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
2195         gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
2196         gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
2197         * arith.c (common_logarithm): Fix typo in comment.
2199 2004-05-21  Roger Sayle  <roger@eyesopen.com>
2201         * io.c (check_format): As a GNU extension, allow the comma after a
2202         string literal to be optional in a format.  Use gfc_notify_std to
2203         issue an error/warning as appropriate.
2205 2004-05-21  Roger Sayle  <roger@eyesopen.com>
2207         * io.c (check_format): Use gfc_notify_std to determine whether to
2208         issue an error/warning for omitting the digits from the X format.
2210 2004-05-20  Roger Sayle  <roger@eyesopen.com>
2212         * io.c (check_format): Allow the number before the X format to
2213         be optional when not -pedantic.
2215 2004-05-18  Feng Wang  <fengwang@nudt.edu.cn>
2216         Paul Brook  <paul@codesourcery.com>
2218         * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
2219         Create decls for __builtin_pow{,f}.
2220         * gfortran.h (PREFIX_LEN): Define.
2221         * trans-decl.c (gfor_fndecl_math_powi): Add.
2222         (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
2223         (gfc_build_intrinsic_function_decls): Create decls for powi.
2224         * trans-expr.c (powi_table): Add.
2225         (gfc_conv_integer_power): Remove.
2226         (gfc_conv_powi): New function.
2227         (gfc_conv_cst_int_power): New function.
2228         (gfc_conv_power_op): Use new powi routines.
2229         * trans.h (struct gfc_powdecl_list): Add.
2230         (gfor_fndecl_math_powi): Add.
2231         (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
2233 2004-05-18  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2235         * trans.c, trans-decl.c: Fix comment typos.
2237 2004-05-18  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2239         * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
2241 2004-05-18  Steve Kargl  <kargls@comcast.net>
2243         * arith.c (gfc_int2complex): Fix incorrect range checking.
2245 2004-05-18  Paul Brook  <paul@codesourcery.com>
2247         PR fortran/13930
2248         * decl.c (add_init_expr_to_sym): Remove incorrect check.
2249         (default_initializer): Move to expr.c.
2250         (variable_decl): Don't assign default initializer to variables.
2251         * expr.c (gfc_default_initializer): Move to here.
2252         * gfortran.h (gfc_default_initializer): Add prototype.
2253         * resolve.c (resolve_symbol): Check for illegal initializers.
2254         Assign default initializer.
2256 2004-05-17  Steve Kargl  <kargls@comcast.net>
2258         * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
2260 2004-05-17  Steve Kargl  <kargls@comcast.net>
2262         * arith.c (gfc_real2complex): Range checking wrong part of complex
2263         number.
2265 2004-05-16  Paul Brook  <paul@codesourcery.com>
2267         * options.c (gfc_handle_module_path_options): Fix buffer overrun.
2269 2004-05-16  Paul Brook  <paul@codesourcery.com>
2271         * arith.c (gfc_range_check): Fix logic error.
2273 2004-05-16  Steve Kargl  <sgk@troutmask.apl.washington.edu>
2275         * arith.c: Fix comment typos.
2277 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2279         PR fortran/13742
2280         * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
2281         not initialized in a disallowed fashion.
2282         * match.c (gfc_match_common): Likewise.
2283         (var_element): Verify that variable is not in the blank COMMON,
2284         if it is in a common.
2286 2004-05-15  Joseph S. Myers  <jsm@polyomino.org.uk>
2288         * Make-lang.in (f95.generated-manpages): Remove.
2289         (f95.srcextra): New.
2290         (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
2291         f95.maintainer-clean): Generate info and dvi files in objdir/doc.
2292         (f95.dvi): Remove.
2293         (dvi): New.
2294         (f95.install-info): Remove.
2295         (install-info): New.
2297 2004-05-15  Victor Leikehman  <lei@haifasphere.co.il>
2299         * decl.c (add_init_expr_to_sym): Check for variable size arrays.
2301 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2303         * primary.c (match_boz_constant): Use gfc_notify_std() for
2304         issuing a warning or an error.
2306 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2308         PR fortran/13826
2309         * primary.c (match_structure_constructor): Rename ...
2310         (gfc_match_structure_constructor): ... to this. Make non-static.
2311         (gfc_match_rvalue): Call renamed function.
2312         * match.h (gfc_match_structure_constructor): Declare.
2313         * match.c (gfc_match_data_constant): Handle structure
2314         constructor.
2316 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2318         PR fortran/13702
2319         (Port from g95)
2320         * gfortran.h (gfc_linebuf): New typedef.
2321         (linebuf): Remove.
2322         (gfc_file): Revamped, use new gfc_linebuf.
2323         (locus): Revamped, use new types.
2324         (gfc_current_file): Remove.
2325         (gfc_current_form, gfc_source_file): New global variables.
2326         * match.c (gfc_match_space, gfc_match_strings): Use
2327         gfc_current_form to find source form.
2328         * module.c (gfc_dump_module): Use gfc_source_file when printing
2329         module header.
2330         * error.c (show_locus, show_loci) Use new data structures to print
2331         locus.
2332         * scanner.c (first_file, first_duplicated_file, gfc_current_file):
2333         Remove.
2334         (file_head, current_file, gfc_current_form, line_head, line_tail,
2335         gfc_current_locus1, gfc_source_file): New global variables.
2336         (gfc_scanner_init1): Set new global variables.
2337         (gfc_scanner_done1): Free new data structures.
2338         (gfc_current_locus): Return pointer to gfc_current_locus1.
2339         (gfc_set_locus): Set gfc_current_locus1.
2340         (gfc_at_eof): Set new variables.
2341         (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
2342         to new locus structure.
2343         (gfc_check_include): Remove.
2344         (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
2345         (gfc_skip_comments): Use gfc_current_form, find locus with
2346         gfc_current_locus1.
2347         (gfc_next_char): Use gfc_current_form.
2348         (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
2349         (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
2350         comment formatting.
2351         (get_file): New function.
2352         (preprocessor_line, include_line): New functions.
2353         (load_file): Move down, rewrite to match new data structures.
2354         (gfc_new_file): Rewrite to match new data structures.
2355         * parse.c (next_statement): Remove code which is now useless. Use
2356         gfc_source_form and gfc_source_file where appropriate.
2357         * trans-decl.c (gfc_get_label_decl): adapt to new data structures
2358         when determining locus of frontend code.
2359         * trans-io.c (set_error_locus): Same.
2360         * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
2361         * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
2362         preprocessor flags.
2363         (all): Add missing initializers.
2365 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2367         * Make-lang.in (trans-common.o): Remove redundant dependency.
2368         (data.c): Replace object file name ...
2369         (data.o): ... by the correct one.
2371 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2373         * dump-parse-tree.c (gfc_show_array_ref): Print colon only
2374         for ranges when dumping array references.
2376 2004-05-14  Victor Leikehman  <lei@haifasphere.co.il>
2378         * decl.c (variable_decl): Always apply default initializer.
2380 2004-05-08  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
2382         PR fortran/15206
2383         * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
2384         handle zero correctly.
2386 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2388         * match.c (gfc_match): Eliminate dead code.
2390 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2392         * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
2393         Detect bad continuation line in fixed form sources.
2395 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2397         PR fortran/15205
2398         * iresolve.c (gfc_resolve_nearest): Add new function.
2399         * intrinsic.h: ... declare it here.
2400         * intrinsic.c (add_functions): ... add it as resolving function
2401         for NEAREST.
2403 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2405         PR fortran/14066
2406         * match.c (gfc_match_do): Allow infinite loops with
2407         label-do-stmt. Do not enforce space after comma.
2409 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2411         PR fortran/15051
2412         * parse.c (parse_interface): Allow empty INTERFACE, remove
2413         seen_body.
2415 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2417         * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
2418         decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
2419         expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
2420         intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
2421         matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
2422         primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
2423         trans-array.c, trans-array.h, trans-common.c, trans-const.c,
2424         trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
2425         trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
2426         trans-types.h, trans.c, trans.h: Update copyright years and
2427         boilerplate.
2428         * data.c: Likewise, also removed two whitespace-only lines.
2429         * gfortranspec.c, lang.opt: Update copyright years.
2431 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2433         PR fortran/14568
2434         * trans-decl.c (generate_local_decl): Don't warn for unused
2435         variables which are in common blocks.
2437 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
2439         * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
2440         trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
2441         trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
2443 2004-05-13  Victor Leikehman  <lei@haifasphere.co.il>
2445         PR fortran/15314
2446         * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
2448 2004-05-13  Joseph S. Myers  <jsm@polyomino.org.uk>
2450         * gfortran.texi: Use @table @emph instead of @itemize @emph.
2451         Remove "set DEVELOPMENT".
2452         (Compiling GFORTRAN): Remove.
2454 2004-05-09  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
2456         * array.c (match_subscript, match_array_ref): Add comments
2457         explaining argument 'init'.
2458         * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
2459         trans-expr.c, trans.c: Fix some typos in comments.
2460         * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
2461         * primary.c (match_digits, match_integer_constant): Add comment
2462         explaining signflag.
2464 2004-05-01  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
2466         PR fortran/13940
2467         * primary.c: Include system.h and flags.h, needed for pedantic.
2468         (match_boz_constant): Allow "x" for hexadecimal constants, warn if
2469         pedantic is set.
2471 2004-05-01  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
2473         PR fortran/13940
2474         * match.c (match_data_constant): Handle case where
2475         gfc_find_symbol sets sym to NULL
2477 2004-04-28  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
2479         * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
2480         dependency on mathbuiltins.def
2482 2004-04-24  Victor Leikehman  <lei@il.ibm.com>
2484         * trans-io.c (transfer_expr): Implemented recursive printing
2485         of derived types.
2487 2004-04-24  Andrew Pinski  <pinskia@physics.uc.edu>
2489         * gfortranspec.c: Do not include multilib.h.
2491 2004-04-24  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
2493         * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
2494         2004 to copyright years.
2495         * trans-expr.c, trans-decl.c: Comment update, we now generate
2496         GENERIC, not SIMPLE. Add 2004 to copyright years.
2498 2004-04-24  Paul Brook  <paul@codesourcery.com>
2500         * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
2502 2004-04-24  Feng Wang  <fengwang@nudt.edu.cn>
2504         PR 14817
2505         * arith.c (gfc_arith_divide): Fix complex divide.
2507 2004-04-23  Andrew Pinski  <pinskia@physics.uc.edu>
2509         * gfortranspec.c: Include the target headers.
2511 2004-04-18  Feng Wang  <fengwang@nudt.edu.cn>
2513         PR fortran/14921
2514         PR fortran/14540
2515         * arith.c (arctangent2): New function.
2516         * arith.h (arctangent2): Add function prototype.
2517         * simplify.c (gfc_simplify_atan2): Use it.
2518         (gfc_simplify_log): Use it.
2520 2004-04-12  Diego Novillo  <dnovillo@redhat.com>
2522         * fortran/f95-lang.c (gfc_expand_stmt): Remove.
2523         (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
2525 2004-04-11  Bud Davis  <bdavis9659@comcast.net>
2527         PR fortran/14872
2528         * trans-io.c (build_dt): Change REC to value.
2530 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
2532         PR 14394
2533         * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
2534         the real value when converting mpf to string.
2536 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
2538         PR 14395
2539         * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
2540         the result.
2542 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
2544         PR fortran/14377
2545         * simplify.c (simplify_min_max): Convert the type of the result.
2547 2004-04-11  Paul Brook  <paul@codesourcery.com>
2549         * gfortran.texi: Use full target triplet.
2551 2004-04-11  Paul Brook  <paul@codesourcery.com>
2553         * Make-lang.in (GFORTRAN_TEXI): Set it.
2554         (fortran/dfortran.dvi): Use it.  Add fortran to include paths.
2555         (fortran/gfortran.info): Ditto.
2556         * gfortran.texi: Major update.
2557         * invoke.texi: New file.
2559 2004-04-10  Paul Brook  <paul@codesourcery.com>
2561         * trans-array.c (gfc_trans_allocate_temp_array,
2562         gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
2563         * trans-decl.c (gfc_build_dummy_array_decl,
2564         gfc_get_symbol_decl, gfc_build_function_decl,
2565         gfc_create_module_variable): Ditto.
2566         * trans-expr.c (gfc_conv_variable): Ditto.
2567         * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
2568         * trans.h (GFC_DECL_STRING): Remove.
2569         (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
2570         GFC_DECL_ASSIGN): Renumber flags.
2572 2004-04-05  Paul Brook  <paul@codesourcery.com>
2574         PR 13252
2575         PR 14081
2576         * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
2577         and stack_restore.
2578         * gfortran.h (struct gfc_charlen): Add backend_decl.
2579         * trans-array.c (gfc_trans_allocate_temp_array,
2580         gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
2581         (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
2582         Remove old, broken string handling.
2583         (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
2584         gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
2585         gfc_trans_deferred_array): Handle character arrays.
2586         * trans-const.c (gfc_conv_const_charlen): New function.
2587         * trans-const.h (gfc_conv_const_charlen): Add prototype.
2588         * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
2589         as static.
2590         (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
2591         (gfc_create_string_length): New function.
2592         (gfc_get_symbol_decl): Create lengths for character variables.
2593         (gfc_get_fake_result_decl): Ditto.
2594         (gfc_build_function_decl): Only set length for assumed length
2595         character arguments.
2596         (gfc_trans_dummy_character): New function.
2597         (gfc_trans_auto_character_variable): Rewrite.
2598         (gfc_trans_deferred_vars): Handle more types of character variable.
2599         (gfc_create_module_variable): String lengths have moved.
2600         (gfc_generate_function_code): Initialize deferred var chain earlier.
2601         * trans-expr.c (gfc_conv_init_string_length): Rename ...
2602         (gfc_trans_init_string_length):  ... to this.
2603         (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
2604         gfc_conv_function_call): Update to new format for character variables.
2605         (gfc_conv_string_length): Remove.
2606         (gfc_conv_string_parameter): Update assertion.
2607         * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
2608         * trans-io.c (set_string): Use new macro names.
2609         * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
2610         * trans-types.c (gfc_get_character_type): Use existing length expr.
2611         (gfc_is_nodesc_array): Make public.
2612         (gfc_get_dtype_cst): Rename ...
2613         (gfc_get_dtype): ... to this.  Handle unknown size arrays.
2614         (gfc_get_nodesc_array_type): Use new name.
2615         (gfc_sym_type): New character variable code.
2616         (gfc_get_derived_type): Ditto.
2617         (gfc_get_function_type): Evaluate character variable lengths.
2618         * trans-types.h (gfc_strlen_kind): Define.
2619         (gfc_is_nodesc_array): Add prototype.
2620         * trans.h: Update prototypes.
2621         (struct lang_type): Update comments.
2622         (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
2623         (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
2625 2004-04-04  Paul Brook  <paul@codesourcery.com>
2627         * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
2628         * options.c (gfc_init.options, gfc_handle_option): Ditto.
2629         * trans-expr.c (gfc_conv_function_call): Ditto.
2630         * trans-types.c (gfc_is_nodesc_array): Ditto
2631         * lang.opt (fg77-calls): Remove.
2633 2004-04-04  Paul Brook  <paul@codesourcery.com>
2635         * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
2636         (gfc_conv_descriptor_base): Rename ...
2637         (gfc_conv_descriptor_offset): ... to this.
2638         (gfc_trans_allocate_array_storage): Set offset to zero.
2639         (gfc_conv_array_base): Rename ...
2640         (gfc_conv_array_offset): ... to this.
2641         (gfc_conv_array_index_ref): Add offset parameter.
2642         (gfc_conv_array_ref): Include offset.
2643         (gfc_trans_preloop_setup): Use existing offset.
2644         (gfc_trans_allocate_temp_array,  gfc_array_allocate,
2645         gfc_trans_auto_array_allocation, gfc_trans_g77_array,
2646         gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
2647         gfc_conf_ss_descriptor): Set offset.
2648         * trans-array.h: Rename prototypes.
2649         * trans-const.h (gfc_index_zero_node): Define.
2650         * trans-decl.c (gfc_build_qualified_array): Change base to offset.
2651         * trans-types.c (gfc_get_array_type_bounds): Ditto.
2652         (gfc_get_nodesc_array_type): Calculate offset before upper bound.
2654 2004-03-25  Diego Novillo  <dnovillo@redhat.com>
2656         * convert.c (convert): Don't handle WITH_RECORD_EXPR.
2658 2004-03-24  Bud Davis  <bdavis9659@comcast.net>
2660         PR 14055
2661         * arith.c (gfc_convert_integer,gfc_convert_real):  Removed leading '+'
2662         before conversion by gmp library call.
2664 2004-03-24  Bud Davis  <bdavis9659@comcast.net>
2666         PR 12921
2667         * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
2669 2004-02-24  Richard Henderson  <rth@redhat.com>
2671         * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
2673 2004-02-19  Loren J. Rittle  <ljrittle@acm.org>
2675         * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
2676         (fortran/gfortran.info): ... to here.
2677         (f95.srcinfo): New.
2679 2004-02-16  Richard Henderson  <rth@redhat.com>
2681         * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
2682         * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
2683         (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
2684         (gfc_expand_function): Rename from expand_function_body, make static,
2685         don't do anything except invoke tree_rest_of_compilation.
2686         (gfc_be_parse_file): Invoke cgraph.
2687         (gfc_expand_decl): Remove.
2688         (gfc_init_builtin_functions): Add __builtin_init_trampoline and
2689         __builtin_adjust_trampoline.
2690         * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
2691         (gfc_finalize): New.
2692         (gfc_generate_function_code): Use it.  Lower nested functions.
2693         * trans-expr.c (gfc_conv_function_call): Add static chain operand
2694         to call_expr.
2695         * trans.c (gfc_build_function_call): Likewise.
2696         * trans.h (expand_function_body): Remove.
2698 2004-02-15  Victor Leikehman  <lei@il.ibm.com>
2700         PR gfortran/13433
2701         * trans-decl.c (gfc_build_function_decl) For functions
2702         returning CHARACTER pass an extra length argument,
2703         following g77 calling conventions.
2704         * trans-types.c (gfc_get_function_type) Ditto.
2705         * trans-expr.c (gfc_conv_function_call) Ditto.
2707 2004-02-14  Paul Brook  <paul@codesourcery.com>
2709         * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
2711 2004-02-12  Paul Brook  <paul@nowt.org>
2713         * BUGS: Remove.
2715 2004-02-08  Steve Kargl  <sgk@troutmask.apl.washington.edu>
2717         * gfortran.texi: Fix typos.
2719 2004-02-07  Bud Davis  <bdavis9659@comcast.net>
2721         PR gfortran/13909
2722         * intrinsic.c (add_conversions) Use logical conversion instead
2723         of real.
2724         * trans-types.c (gfc_get_logical_type) implemented logical*1
2725         and logical*2.
2727 2004-01-17  Paul Brook  <paul@codesourcery.com>
2729         * lang-specs.h: Remove %<fixed-form.
2731 2004-01-15  Toon Moene  <toon@moene.indiv.nluug.nl>
2733         * lang-specs.h: Enable preprocessing of source files
2734         ending in .F, .fpp, .FPP, .F90 and .F95.
2736 2004-01-13  Toon Moene  <toon@moene.indiv.nluug.nl>
2738         PR fortran/12912
2739         * lang-specs.h: Enable compilation of files ending
2740         in .f, .for and .FOR.
2742 2004-01-11  Paul Brook  <paul@codesourcery.com>
2744         * trans-stmt.c (gfc_trans_if_1): New function.
2745         (gfc_trans_if): Use it.
2747 2004-01-11  Erik Schnetter  <schnetter@uni-tuebingen.de>
2749         * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
2750         (gfc_option_t): Add max_identifier_length.
2751         * lang.opt: Add fmax-identifier-length.
2752         * match.c (parse_name): Use limit.
2753         * options.c (gfc_init_options): Set max_identifier_length.
2754         (gfc_handle_option): Ditto.
2756 2004-01-11  Feng Wang  <fengwang@nudt.edu.cn>
2758         * intrinsic.c (add_functions): Add resolve function to dcmplx.
2759         * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
2760         * iresolve.c (gfc_resolve_dcmplx): New function.
2762 2004-01-10  Paul Brook  <paul@codesourcery.com>
2764         * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
2765         * trans-types.c (gfc_sym_type): Handle external dummy procedures.
2766         (gfc_return_by_reference): Correct condition.
2767         (gfc_get_function_type): Ditto.
2769 2004-01-10  Paul Brook  <paul@codesourcery.com>
2771         * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
2772         types.
2774 2004-01-10  Huang Chun  <chunhuang73@hotmail.com>
2776         * iresolve.c: Use correct kind.
2778 2004-01-10  Huang Chun  <chunhuang73@hotmail.com>
2780         PR fortran/13467
2781         * trans-decl.c (gfc_create_module_variable):  Output array valued
2782         parameters.
2784 2004-01-10  Paul Brook  <paul@codesourcery.com>
2786         * resolve.c (resolve_branch): Get error message right way round.
2788 2004-01-10  Canqun Yang  <canqun@nudt.edu.cn>
2790         * trans-array (gfc_conv_loop_setup): Adjust comment to track
2791         reality.
2792         (gfc_array_allocate): Don't count size of element twice.
2794 2004-01-04  Paul Brook  <paul@codesourcery.com>
2796         * lang.opt (i8, r8, std=*): Remove RejectNegative.
2798 2004-01-04  Paul Brook  <paul@codesourcery.com>
2800         * error.c (gfc_notify_std): New function.
2801         * gfortran.h (gfc_notify_std): Declare.
2802         (GFC_STD_*): Define.
2803         (gfc_option_t): Add warn_std and allow_std.
2804         * intrinsic.c (gfc_init_expr_extensions): Fix logic.
2805         (gfc_intrinsic_func_interface): Use gfc_notify_std.
2806         * check.c (check_rest): Use gfc_notify_std.
2807         * match.c (gfc_match_pause): Ditto.
2808         (gfc_match_assign): Ditto.
2809         (gfc_match_goto): Ditto.
2810         * resolve.c (resolve_branch): Ditto.
2811         * lang.opt: Add std=<foo> and w.
2812         * options.c (gfc_init_options): Set allow_std and warn_std.
2813         (gfc_handle_option): Handle OPT_std_* and OPT_w.
2815 2004-01-01  Paul Brook  <paul@codesourcery.com>
2817         * array.c (gfc_append_constructor): Take constructor, not expression.
2818         * data.c (struct gfc_expr_stack): Remove.
2819         (expr_stack): Remove.
2820         (find_con_by_offset): Rename from find_expr_in_con.
2821         (find_con_by_component): Rename from find_component_in_con.
2822         (gfc_get_expr_stack): Remove.
2823         (gfc_assign_data_value): Rewrite.
2824         (gfc_expr_push): Remove.
2825         (gfc_expr_pop): Remove.
2826         (gfc_advance_section): Rename from
2827         gfc_modify_index_and_calculate_offset.  Handle unbounded sections.
2828         (gfc_get_section_index): Handle unbounded sections.
2829         * gfortran.h: Update prototypes.
2830         * resolve.c (check_data_variable): Array section maight not be the
2831         last ref.
2833 2004-01-01  Paul Brook  <paul@codesourcery.com>
2835         PR fortran/13432
2836         * resolve.c (resolve_symbol): Allow assumed length function results.
2838 2004-01-01  Steve Kargl  <sgk@troutmask.apl.washington.edu>
2840         * match.c (gfc_match_pause): Fix spelling.
2842 2004-01-01  Steven Bosscher  <stevenb@suse.de>
2844         PR fortran/13251
2845         * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
2846         reference from the expression.
2849 Copyright (C) 2004 Free Software Foundation, Inc.
2851 Copying and distribution of this file, with or without modification,
2852 are permitted in any medium without royalty provided the copyright
2853 notice and this notice are preserved.