OSDN Git Service

PR fortran/17678
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
1 2004-10-07  Paul Brook  <paul@codesourcery.com>
2
3         PR fortran/17678
4         * trans-array.c (gfc_trans_deferred_array): Leave use associated
5         variables alone.
6
7 2004-10-06  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
8
9         PR fortran/17568
10         * simplify.c (twos_complement): New function.
11         (gfc_simplify_ishft, gfc_simplify_ishftc): Revise.
12
13         * simplify.c (gfc_simplify_abs): Use mpfr_hypot for CABS.
14
15 2004-10-06  Paul Brook  <paul@codesourcery.com>
16
17         * trans-stmt.c (gfc_trans_simple_do): New function.
18         (gfc_trans_do): Use it.  Evaluate iteration bounds before entering
19         loop.  Update comments.
20
21 2004-10-04  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
22
23         PR fortran/17283
24         * iresolve.c (gfc_resolve_pack): Choose function depending if mask
25         is scalar.
26
27         PR fortran/17631
28         * intrinsic.c (add_sym_5): Remove.
29         (add_subroutines): Add resolution function for MVBITS.
30         * intrinsic.h (gfc_resolve_mvbits): Declare resolution function for
31         MVBITS
32         * iresolve.c (gfc_resolve_mvbits): New function.
33         (gfc_resolve_random_number): Remove empty line at end of function.
34
35         * trans-const.c (gfc_build_cstring_const): New function.
36         (gfc_init_cst): Use new function.
37         * trans-const.h (gfc_build_cstring_const): Add prototype.
38         * trans-io.c (set_string, set_error_locus): Use new function.
39         * trans-stmt.c (gfc_trans_goto): Use new function.
40         
41         PR fortran/17708
42         * parse.c (accept_statement): Don't treat END DO like END IF and
43         END SELECT.
44         (parse_do_block): Generate possible END DO label inside END DO
45         block.
46
47         PR fortran/17776
48         * check.c (gfc_check_system_sub): New function.
49         * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SYSTEM.
50         * intrinsic.c (add_functions): Add 'system'.
51         (add_subroutines): Add 'system'.
52         * intrinsic.h (gfc_check_etime_sub, gfc_check_getcwd_sub):
53         Move prototypes to other suborutines.
54         (gfc_check_system_sub, gfc_resolve_system, gfc_resolve_system_sub):
55         Add prototype.
56         (gfc_resolve_system_clock): Fix formatting of prototype.
57         * iresolve.c (gfc_resolve_system, gfc_resolve_system_sub): New
58         functions.
59         * trans-intrinsic.c (gfc_conv_intrinsic_function): Deal with
60         GFC_ISYM_SYSTEM.
61
62 2004-10-04  Erik Schnetter  <schnetter@aei.mpg.de>
63
64         * scanner.c (preprocessor_line): Accept preprocessor lines without
65         file names.  Check file names for closing quotes.  Handle escaped
66         quotes in file names.
67
68 2004-10-04  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
69         Paul Brook  <paul@codesourcery.com>
70
71         * trans-array.c (gfc_conv_expr_descriptor): Check for substriungs.
72         Use gfc_get_expr_charlen.
73         * trans-expr.c (gfc_get_expr_charlen): New function.
74         * trans.h (gfc_get_expr_charlen): Add prototype.
75
76 2004-10-04  Kazu Hirata  <kazu@cs.umass.edu>
77
78         * trans-intrinsic.c: Fix a comment typo.
79
80 2004-10-03  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
81
82         * simplify.c (range_check): Remove blank line at beginning of function.
83         (gfc_simplify_dint): Same at end of function.
84         (gfc_simplify_exponent, gfc_simplify_fraction): Simplify calculations.
85         (gfc_simplify_bound): Fix indentation.
86         (gfc_simplify_log10): Simplify calculation.
87         (gfc_simplify_min, gfc_simplify_max): Remove blank line at beginning
88         of function.
89         (gfc_simplify_nearest): Same at end of function.
90         (gfc_simplify_nint, gfc_simplify_idnint): Same at beginning of
91         function.
92         (gfc_simplify_rrspacing, gfc_simplify_set_exponent,
93         gfc_simplify_spacing): Simplify calulations.
94
95 2004-10-03  Feng Wang  <fengwang@nudt.edu.cn>
96
97         * trans-intrinsic.c: Fix comments on spacing and rrspacing
98         (gfc_conv_intrinsic_rrspacing): Add fold on constant trees.
99
100 2004-10-01  Jan Hubicka  <jh@suse.cz>
101
102         * f95-lang.c (gfc_expand_function): Update call of
103         tree_rest_of_compilation.
104         * trans-decl.c (gfc_generate_constructors): Likewise.
105
106 2004-09-26  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
107
108         * trans-intrinsic.c: Comment fixes.
109
110 2004-09-25  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
111
112         * decl.c (add_init_expr_to_sym, variable_decl): Comment fixes.
113
114 2004-09-24  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
115
116         * trans-types.c (gfc_return_by_reference): Remove superfluous
117         assertion.
118
119         * intrinsic.h (gfc_resolve_getcwd): Update prototype.
120         * iresolve.c (gfc_resolve_getcwd): Add second argument to function.
121
122         PR fortran/17615
123         * trans-expr.c (gfc_trans_arrayfunc_assign): Look at resolved
124         function to determine return type.
125         
126 2004-09-20  Jan Hubicka  <jh@suse.cz>
127
128         * trans-decl.c (build_entry_thunks): Finalize the function; do not lower
129         tree.
130         (gfc_generate_function_code): Likewise.
131
132 2004-09-20  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
133
134         PR fortran/15957
135         * simplify.c (gfc_simplify_reshape): Set shape of return value
136         correctly.
137
138 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
139             Zack Weinberg  <zack@codesourcery.com>
140
141         * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class
142         enumeration constants.
143
144 2004-09-17  Paul Brook  <paul@codesourcery.com>
145
146         * gfortran.h (struct gfc_linebuf): Don't use C99 empty arrays.
147         (gfc_linebuf_header_size): Define.
148         * scanner.c (load_file): Use it.
149
150 2004-09-16  Kazu Hirata  <kazu@cs.umass.edu>
151
152         * array.c, data.c, decl.c, dependency.c, error.c, f95-lang.c,
153         interface.c, intrinsic.c, io.c, misc.c, module.c, parse.h,
154         resolve.c, scanner.c, trans-array.c, trans-array.h,
155         trans-common.c, trans-const.h, trans-decl.c, trans-expr.c,
156         trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
157         trans.h: Fix comment typos.  Follow spelling conventions.
158
159 2004-09-16  Victor Leikehman  <lei@il.ibm.com>
160
161         PR/15364
162         * trans-io.c (transfer_array_component): New function.
163         (transfer_expr): For array fields, call transfer_array_component.
164
165 2004-09-16  Kazu Hirata  <kazu@cs.umass.edu>
166
167         * gfortran.texi: Fix a typo.
168
169 2004-09-15  Aaron W. LaFramboise <aaronavay62@aaronwl.com>
170
171         * parse.c (eof_buf): Rename eof to eof_buf.
172         (unexpected_eof): Same.
173         (gfc_parse_file): Same.
174
175 2004-09-15  Steven G. Kargl  <kargls@comcast.net>
176
177         * check.c (gfc_check_getcwd_sub): New function.
178         * gfortran.h (GFC_ISYM_GETCWD): New symbol.
179         * intrinsic.c (add_functions): Add function definition;
180         Use symbol.
181         * intrinsic.c (add_subroutines): Add subroutine definitions.
182         * intrinsic.h: Add prototypes.
183         * iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub):
184         New functions.
185         * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol.
186
187 2004-09-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
188
189         PR fortran/16485
190         * module.c (write_symbol): Don't fill in module name here.
191         (write_symbol0): Fill in here instead.
192
193 2004-09-14  Kazu Hirata  <kazu@cs.umass.edu>
194
195         * data.c, decl.c, f95-lang.c, gfortran.h, match.c,
196         trans-array.c, trans-common.c, trans-expr.c,
197         trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.h: Fix
198         comment typos.  Follow spelling conventions.
199
200 2004-09-09  Paul Brook  <paul@codesourcery.com>
201
202         * scanner.c (get_file): Add ATTRIBUTE_UNUSED.
203
204 2004-09-08  Paul Brook  <paul@codesourcery.com>
205
206         * array.c: Don't include assert.h.
207         * data.c: Don't include assert.h.  Replace assert and abort with
208         gcc_assert and gcc_unreachable.
209         * dependency.c: Ditto.
210         * f95-lang.c: Ditto.
211         * iresolve.c: Ditto.
212         * resolve.c: Ditto.
213         * simplify.c: Ditto.
214         * symbol.c: Ditto.
215         * trans-array.c: Ditto.
216         * trans-common.c: Ditto.
217         * trans-const.c: Ditto.
218         * trans-decl.c: Ditto.
219         * trans-expr.c: Ditto.
220         * trans-intrinsic.c: Ditto.
221         * trans-io.c: Ditto.
222         * trans-stmt.c: Ditto.
223         * trans-types.c: Ditto.
224         * trans.c: Ditto.
225
226 2004-09-07  Per Bothner  <per@bothner.com>
227         Paul Brook  <paul@codesourcery.com>
228
229         * error.c (show_locus): Handle mapped locations.
230         * f95-lang.c (gfc_be_parse_file): Initialize mapped locations.
231         * gfortran.h: Include input.h.
232         (struct gfc_linebuf): Use source_location.
233         * scanner.c (get_file): Initialize linemap.
234         (preprocessor_line): Pass extra argument to get_file.
235         (load_file): Ditto.  Setup linemap.
236         (gfc_new_file): Handle mapped locations.
237         * trans-common.c (build_field, build_equiv_decl, build_common_decl):
238         Set decl source locations.
239         (gfc_trans_common): Set blank common block location.
240         * trans-decl.c (gfc_set_decl_location): New function.
241         (gfc_get_label_decl, gfc_get_symbol_decl): Use it.
242         (trans_function_start): Move call to gfc_set_backend_locus..
243         (build_function_decl): ... to here.
244         (build_entry_thunks): Set and restore the backend locus.
245         (gfc_generate_constructors): Remove excess arguments to
246         init_function_start.
247         (gfc_generate_block_data): Add comments.  Set the decl locus.
248         * trans-io.c (set_error_locus): Handle mapped locations.
249         * trans.c (gfc_get_backend_locus, gfc_get_backend_locus): Ditto.
250         (gfc_trans_code): Use SET_EXPR_LOCATION.
251         (gfc_generate_code): Override the location of the new symbol.
252         * trans.h (gfc_set_decl_location): Add prototype.
253
254 2004-08-31  Paul Brook  <paul@codesourcery.com>
255
256         * trans-types.c (gfc_type_for_mode): Return NULL for unknown modes.
257
258 2004-09-01  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
259
260         PR fortran/15327
261         * trans-intrinsic.c (gfc_conv_intrinsic_merge): Do the right thing for
262         strings.
263
264 2004-09-01  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
265
266         PR fortran/16400
267         PR fortran/16404
268         (port from g95)
269         * resolve.c (resolve_transfer): New function.
270         (resolve_code): Call resolve_transfer in case of EXEC_TRANSFER.
271
272 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
273
274         PR fortran/16579
275         * trans-types.c (gfc_init_types): Make gfc_character1_type_node an
276         unsigned char.
277
278 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
279
280         * CONTRIB, NEWS, README, TODO: Remove obsolete files.
281
282 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
283
284         PR fortran/17244
285         * trans-types.c (gfc_return_by_reference): Remove TODO error,
286         add comment pointing out possible issue WRT compatibility with g77.
287
288 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
289
290         * trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace
291         all occurences of 'gfc_strlen_type_node' by
292         'gfc_charlen_type_node'.
293         * trans-types.h: Same. Also update comment accordingly.
294
295 2004-08-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
296
297         * primary.c: Update copyright boilerplate to say GCC.
298         * f95-lang.c: Change initial comment to say gfortran.
299
300 2004-08-31  Paul Brook  <paul@codesourcery.com>
301
302         * trans-types.h: Add comments.
303         (intmax_type_node, string_type_node, const_string_type_node): Remove.
304
305 2004-08-30  Richard Henderson  <rth@redhat.com>
306
307         * Make-lang.in (fortran/f95-lang.o): Update dependencies.
308         (fortran/trans-decl.o, fortran/trans-types.o): Likewise.
309         * gfortran.h (gfc_integer_info): Add c_char, c_short, c_int,
310         c_long, c_long_long.
311         (gfc_logical_info): Add c_bool.
312         (gfc_real_info): Add mode_precision, c_float, c_double, c_long_double.
313         * trans-array.c (gfc_array_allocate): Use TYPE_PRECISION
314         rather than gfc_int[48]_type_node for allocate choice.
315         * trans-decl.c (gfc_build_intrinsic_function_decls): Cache
316         local copies of some kind type nodes.
317         (gfc_build_builtin_function_decls): Likewise.
318         * trans-expr.c (gfc_conv_power_op): Likewise.
319         * trans-intrinsic.c (gfc_conv_intrinsic_index,
320         gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify,
321         gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Likewise.
322         * trans-stmt.c (gfc_trans_pause, gfc_trans_stop,
323         gfc_trans_character_select, gfc_trans_allocate): Likewise.
324         * trans-io.c (gfc_pint4_type_node): Move into ...
325         (gfc_build_io_library_fndecls): ... here.  Cache local copies of
326         some kind type nodes.
327         * trans-types.c (gfc_type_nodes): Remove.
328         (gfc_character1_type_node, gfc_strlen_type_node): New.
329         (gfc_integer_types, gfc_logical_types): New.
330         (gfc_real_types, gfc_complex_types): New.
331         (gfc_init_kinds): Fill in real mode_precision.
332         (gfc_build_int_type, gfc_build_real_type): New.
333         (gfc_build_complex_type, gfc_build_logical_type): New.
334         (c_size_t_size): New.
335         (gfc_init_types): Loop over kinds.
336         (gfc_get_int_type, gfc_get_real_type): Use gfc_validate_kind.
337         (gfc_get_complex_type, gfc_get_logical_type): Likewise.
338         (gfc_get_character_type_len): Likewise.
339         (gfc_type_for_size): Loop over kinds; use a reduced set of
340         unsigned type nodes.
341         (gfc_type_for_mode): Loop over kinds.
342         (gfc_signed_or_unsigned_type): Use gfc_type_for_size.
343         (gfc_unsigned_type, gfc_signed_type): Use gfc_signed_or_unsigned_type.
344         * trans-types.h (F95_INT1_TYPE, F95_INT2_TYPE, F95_INT4_TYPE,
345         F95_INT8_TYPE, F95_INT16_TYPE, F95_REAL4_TYPE, F95_REAL8_TYPE,
346         F95_REAl16_TYPE, F95_COMPLEX4_TYPE, F95_COMPLEX8_TYPE,
347         F95_COMPLEX16_TYPE, F95_LOGICAL1_TYPE, F95_LOGICAL2_TYPE,
348         F95_LOGICAL4_TYPE, F95_LOGICAL8_TYPE, F95_LOGICAL16_TYPE,
349         F95_CHARACTER1_TYPE, NUM_F95_TYPES, gfc_type_nodes,
350         gfc_int1_type_node, gfc_int2_type_node, gfc_int4_type_node,
351         gfc_int8_type_node, gfc_int16_type_node, gfc_real4_type_node,
352         gfc_real8_type_node, gfc_real16_type_node, gfc_complex4_type_node,
353         gfc_complex8_type_node, gfc_complex16_type_node,
354         gfc_logical1_type_node, gfc_logical2_type_node,
355         gfc_logical4_type_node, gfc_logical8_type_node,
356         gfc_logical16_type_node, gfc_strlen_kind): Remove.
357         (gfc_character1_type_node): Turn in to a variable.
358         (gfc_strlen_type_node): Likewise.
359
360 2004-08-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
361
362         * gfortran.h (gfc_namespace): Add new field is_block_data.
363         * parse.c (accept_statement): Remove special handling for BLOCK DATA.
364         (parse_block_data): Record BLOCK DATA name, set is_block_data field.
365         * trans.c (gfc_generate_code): Handle BLOCK DATA units.
366         * trans.h (gfc_generate_block_data): Add prototype.
367         * trans-decl.c (gfc_generate_block_data): New function.
368
369 2004-08-29  Richard Henderson  <rth@redhat.com>
370
371         * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_export.
372         * trans-types.c (gfc_init_kinds): Reject integer kinds larger
373         than two HOST_WIDE_INT.
374
375 2004-08-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
376
377         PR fortran/13910
378         * decl.c (free_variable, free_value, gfc_free_data, var_list,
379         var_element, top_var_list, match_data_constant, top_val_list,
380         gfc_match_data): Move here from match.c.
381         (match_old_style_init): New function.
382         (variable_decl): Match old-style initialization.
383         * expr.c (gfc_get_variable_expr): New function.
384         * gfortran.h (gfc_get_variable_expr): Add prototype.
385         * gfortran.texi: Start documentation for supported extensions.
386         * match.c: Remove the functions moved to decl.c.
387         * match.h (gfc_match_data): Move prototype to under decl.c.
388         * symbol.c (gfc_find_sym_tree, gfc_find_symbol): Add/correct
389         comments.
390
391 2004-08-29  Steven G. Kargl  <kargls@comcast.net>
392         Paul Brook  <paul@codesourcery.com>
393
394         * check.c (gfc_check_besn, gfc_check_g77_math1): New functions.
395         * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Define.
396         (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
397         (build_builtin_fntypes): New function.
398         (gfc_init_builtin_functions): Use it.
399         * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_{J,Y}{0,1,N}
400         and GFC_ISYM_ERF{,C}.
401         (gfc_c_int_kind): Declare.
402         * intrinsic.c (add_functions): Add [d]bes* and [d]erf*.
403         * intrinsic.h (gfc_check_besn, gfc_check_g77_math1, gfc_resolve_besn,
404         gfc_resolve_g77_math1): Add prototypes.
405         * resolve.c (gfc_resolve_besn, gfc_resolve_g77_math1): New functions.
406         * mathbuiltins.def: Add comment.  Change third argument.  Use
407         DEFINE_MATH_BUILTIN_C.  Add bessel and error functions.
408         * trans-intrinsic.c (BUILT_IN_FUNCTION): Define.
409         (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
410         * trans-types.c (gfc_c_int_kind): Declare.
411         (gfc_init_kinds): Set it.
412
413 2004-08-29  Steven G. Kargl  <kargls@comcast.net>
414         Paul Brook  <paul@codesourcery.com>
415
416         * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
417         (gfc_check_f, gfc_simplify_f): Add f0.
418         * intrinsic.c (do_check): Call f0.  Flatten.
419         (add_sym_0): Fix prototype.  Set f0.
420         (add_functions): Add getgid, getgid and getuid.
421         (resolve_intrinsic): Remove obsolete comment.
422         (do_simplify): Call f0.
423         * intrinsic.h (gfc_resolve_getgid, gfc_resolve_getpid,
424         gfc_resolve_getuid): Add prototypes.
425         * iresolve.c (gfc_resolve_getgid, gfc_resolve_getpid,
426         gfc_resolve_getuid): New functions.
427         * trans-intrinsic.c (gfc_conv_intrinsic_function): Handle
428         GFC_ISYM_GET?ID.
429
430 2004-08-28  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
431
432         * error.c (gfc_error_init_1): Remove blank line in front of
433         function body. Add missing blank.
434         (gfc_buffer_error, error_char, error_string): Remove blank line in
435         front of function body.
436         (show_locus): Add comma in comment.
437         (gfc_clear_warning, gfc_warning_check, gfc_clear_error,
438         gfc_push_error, gfc_pop_error): Remove blank line in front of
439         function body.
440         (gfc_get_errors): Typo fix in comment in front of function. Remove
441         blank line in front of function body.
442
443 2004-08-27  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
444
445         * gfortran.h (gfc_default_*_kind): Remove prototypes, add extern
446         variable declaration of same name.
447         * arith.c, check.c, decl.c, dump_parse_tree.c, expr.c,
448         intrinsic.c, io.c, iresolve.c, match.c, options.c, primary.c,
449         resolve.c, simplify.c, symbol.c, trans-const.c, trans-io.c:
450         Replace all calls to gfc_default_*_kind with variable accesses.
451         * trans-types.c: Same as above.
452         (gfc_default_*_kind_1): Rename to gfc_default_*_kind, remove
453         static qualifier. Replace all occurences.
454         (gfc_default_*_kind): Remove functions.
455
456 2004-08-26  Richard Henderson  <rth@redhat.com>
457
458         * arith.c: Include system.h, not real system headers.
459         (MPZ_NULL, MPF_NULL, DEF_GFC_INTEGER_KIND, DEF_GFC_LOGICAL_KIND,
460         DEF_GFC_REAL_KIND, GFC_SP_KIND, GFC_SP_PREC, GFC_SP_EMIN, GFC_SP_EMAX,
461         GFC_DP_KIND, GFC_DP_PREC, GFC_DP_EMIN, GFC_DP_EMAX, GFC_QP_KIND,
462         GFC_QP_PREC, GFC_QP_EMIN, GFC_QP_EMAX): Remove.
463         (gfc_integer_kinds, gfc_logical_kinds, gfc_real_kinds,
464         gfc_index_integer_kind, gfc_default_integer_kind,
465         gfc_default_real_kind,gfc_default_double_kind,
466         gfc_default_character_kind, gfc_default_logical_kind,
467         gfc_default_complex_kind, validate_integer, validate_real,
468         validate_logical, validate_character,
469         gfc_validate_kind): Move to trans-types.c.
470         (gfc_set_model_kind): Use gfc_validate_kind.
471         (gfc_set_model): Just copy the current precision to default.
472         (gfc_arith_init_1): Use mpfr precision 128 for integer setup.
473         * f95-lang.c (gfc_init_decl_processing): Invoke gfc_init_kinds.
474         * gfortran.h: Update file commentary.
475         * trans-types.c (MAX_INT_KINDS, MAX_REAL_KINDS): New.
476         (gfc_default_integer_kind_1, gfc_default_real_kind_1,
477         gfc_default_double_kind_1, gfc_default_character_kind_1,
478         gfc_default_logical_kind_1, gfc_default_complex_kind_1): New.
479         (gfc_init_kinds): New.
480         (gfc_init_types): Don't set gfc_index_integer_kind here.
481         * trans-types.h (gfc_init_kinds): Declare.
482         * doc/invoke.texi: Clarify DOUBLE PRECISION behaviour wrt -r8.
483
484 2004-08-26  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
485
486         * check.c (gfc_check_atan2): New function.
487         * intrinsic.c (add_functions): Use gfc_check_atan2 for ATAN2
488         * intrinsic.h (gfc_check_atan2): Add prototype.
489
490 2004-08-25  Richard Henderson  <rth@redhat.com>
491
492         * arith.c (gfc_validate_kind): Add may_fail argument; abort if
493         false and we don't validate the kind.
494         (gfc_check_integer_range, gfc_check_real_range): Update to match.
495         * check.c (kind_check): Likewise.
496         * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Likewise.
497         (match_char_spec, match_logical_spec): Likewise.
498         * gfortran.h (gfc_validate_kind): Likewise.
499         * options.c (gfc_handle_option): Likewise.
500         * primary.c (match_integer_constant, match_real_constant,
501         match_string_constant, match_logical_constant,
502         match_const_complex_part): Likewise.
503         * simplify.c (get_kind, gfc_simplify_bit_size, gfc_simplify_digits,
504         gfc_simplify_epsilon, gfc_simplify_huge, gfc_simplify_ibclr,
505         gfc_simplify_ibset, gfc_simplify_ishft, gfc_simplify_ishftc,
506         gfc_simplify_maxexponent, gfc_simplify_minexponent,
507         gfc_simplify_nearest, gfc_simplify_not, gfc_simplify_precision,
508         gfc_simplify_radix, gfc_simplify_range, gfc_simplify_rrspacing,
509         gfc_simplify_scale, gfc_simplify_spacing, gfc_simplify_tan,
510         gfc_simplify_tiny): Likewise.
511         * trans-intrinsic.c (gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod,
512         gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
513         prepare_arg_info): Likewise.
514
515 2004-08-25  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
516
517         * expr.c (gfc_check_assign): Add comment. Add new warning.
518         * trans-expr.c (gfc_conv_function_call): Correctly dereference
519         result of pointer valued function when not in pointer assignment.
520
521 2004-08-25  Paul Brook  <paul@codesourcery.com>
522
523         * config-lang.in: Remove dead commented line.
524         * module.c: Replace g95 with gfortran in comment.
525
526 2004-08-25  Paul Brook  <paul@codesourcery.com>
527
528         PR fortran/17190
529         * arith.c (gfc_mpfr_to_mpz): Workaround mpfr bug.
530
531 2004-08-25  Paul Brook  <paul@codesourcery.com>
532
533         PR fortran/17144
534         * trans-array.c (gfc_trans_allocate_temp_array): Remove
535         string_length argument.
536         (gfc_trans_array_ctor_element): New function.
537         (gfc_trans_array_constructor_subarray): Use it.
538         (gfc_trans_array_constructor_value): Ditto.  Handle constant
539         character arrays.
540         (get_array_ctor_var_strlen, get_array_ctor_strlen): New functions.
541         (gfc_trans_array_constructor): Use them.
542         (gfc_add_loop_ss_code): Update to new gfc_ss layout.
543         (gfc_conv_ss_descriptor): Remember section string length.
544         (gfc_conv_scalarized_array_ref): Ditto.  Remove dead code.
545         (gfc_conv_resolve_dependencies): Update to new gfc_ss layout.
546         (gfc_conv_expr_descriptor): Ditto.
547         (gfc_conv_loop_setup): Ditto.  Spelling fixes.
548         * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
549         * trans-const.c (gfc_conv_constant):  Update to new gfc_ss layout.
550         * trans-expr.c (gfc_conv_component_ref): Turn error into ICE.
551         (gfc_conv_variable): Set string_length from section.
552         (gfc_conv_function_call): Remove extra argument.
553         (gfc_conv_expr, gfc_conv_expr_reference): Update to new gfc_ss layout.
554         * trans-types.c (gfc_get_character_type_len): New function.
555         (gfc_get_character_type): Use it.
556         (gfc_get_dtype): Return zero for internal types.
557         * trans-types.h (gfc_get_character_type_len): Add prototype.
558         * trans.h (struct gfc_ss): Move string_length out of union.
559
560 2004-08-25  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
561
562         * trans.h (build2_v, build3_v): New macros.
563         (build_v): Remove.
564         * f95-lang.c (gfc_truthvalue_conversion): Use build2 instead of
565         build.
566         * trans-array.c (gfc_conv_descriptor_data,
567         gfc_conv_descriptor_offset, gfc_conv_descriptor_dimension,
568         gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
569         gfc_conv_descriptor_ubound, gfc_trans_allocate_array_storage,
570         gfc_trans_allocate_temp_array,
571         gfc_trans_array_constructor_subarray,
572         gfc_trans_array_constructor_value, gfc_conv_array_index_ref,
573         gfc_trans_array_bound_check, gfc_conv_array_index_offset,
574         gfc_conv_scalarized_array_ref, gfc_conv_array_ref,
575         gfc_conv_array_ref, gfc_trans_preloop_setup,
576         gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
577         gfc_conv_loop_setup, gfc_array_init_size,
578         gfc_conv_array_initializer, gfc_trans_array_bounds,
579         gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
580         gfc_conv_expr_descriptor, gfc_conv_array_parameter,
581         gfc_trans_deferred_array): Use buildN and buildN_v macros instead
582         of build and build_v as appropriate.
583         * trans-common.c (create_common): Same.
584         * trans-decl.c (gfc_trans_auto_character_variable,
585         gfc_trans_entry_master_switch, gfc_generate_function_code): Same.
586         * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
587         gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
588         gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
589         gfc_conv_expr_op, gfc_conv_function_call,
590         gfc_trans_structure_assign): Same.
591         * trans-intrinsic.c (build_fixbound_expr, build_round_expr,
592         gfc_conv_intrinsic_aint, gfc_conv_intrinsic_bound,
593         gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
594         gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
595         gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_minmax,
596         gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
597         gfc_conv_intrinsic_arith, gfc_conv_intrinsic_minmaxloc,
598         gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
599         gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_singlebitop,
600         gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
601         gfc_conv_intrinsic_merge, gfc_conv_intrinsic_strcmp,
602         gfc_conv_allocated, gfc_conv_associated, prepare_arg_info,
603         gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
604         gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat,
605         gfc_conv_intrinsic_iargc): Same.
606         * trans-io.c (set_parameter_value, set_parameter_ref, set_string,
607         set_flag, add_case, io_result, transfer_namelist_element,
608         transfer_expr): Same.
609         * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_if_1,
610         gfc_trans_arithmetic_if, gfc_trans_do, gfc_trans_do_while,
611         gfc_trans_integer_select, gfc_trans_logical_select,
612         gfc_trans_character_select, gfc_trans_forall_loop,
613         gfc_trans_nested_forall_loop, gfc_do_allocate,
614         generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
615         compute_inner_temp_size, compute_overall_iter_number,
616         allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
617         gfc_trans_forall_1, gfc_evaluate_where_mask,
618         gfc_trans_where_assign, gfc_trans_allocate): Same.
619         * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Same.
620         * trans.c (gfc_add_modify_expr, gfc_finish_block,
621         gfc_build_array_ref, gfc_build_function_call,
622         gfc_trans_runtime_check): Same.
623
624 2004-08-25  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
625
626         * trans-const.c (gfc_conv_mpz_to_tree): Change call to
627         build_int_cst to build_int_cst_wide in accordance to Nathan's
628         previous patch.
629
630 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
631
632         * trans-array.c (gfc_trans_array_constructor_value): Adjust
633         build_int_cst calls.
634         * trans-const.c (gfc_build_string_const, gfc_init_constants,
635         gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise.
636         * trans-decl.c (gfc_get_symbol_decl, build_entry_thunks,
637         gfc_trans_entry_master_switch): Likewise.
638         * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
639         gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
640         * trans-io.c (add_case, set_error_locus,
641         transfer_namelist_element, transfer_expr): Likewise.
642         * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
643         gfc_trans_stop, gfc_trans_character_select): Likewise.
644         * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
645         * trans.c (gfc_trans_runtime_check): Likewise.
646
647 2004-08-24  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
648
649         * trans-decl.c, trans-types.c: Add and remove blank lines as
650         required.
651
652 2004-08-24  Richard Henderson  <rth@redhat.com>
653
654         * trans-const.c (gfc_conv_mpz_to_tree): Fix 64-bit shift warning.
655
656 2004-08-24  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
657
658         * resolve.c (merge_argument_lists): Revert unintentionally
659         committed change.
660
661 2004-08-24  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
662
663         * trans-decl.c (build_function_decl): Fix spelling in comment.
664         (build_entry_thunks): Remove code with no function.
665         (gfc_build_intrinsic_function_decls): Remove empty line.
666
667         * resolve.c (resolve_entries): Fix a bunch of comment typos.
668
669 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
670
671         * f95-lang.c (gfc_init_decl_processing): Adjust
672         build_common_tree_nodes call.
673
674 2004-08-24  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
675
676         * trans-types.c: Spelling and formatting fixes.
677
678 2004-08-23  Richard Henderson  <rth@redhat.com>
679
680         * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_getlimbn instead
681         of going through an intermediate string.  Fix 32/64 int/long bug.
682
683 2004-08-23  Eric Christopher  <echristo@redhat.com>
684
685         * trans-types.c (gfc_type_for_mode): Remove VECTOR_TYPE_SUPPORTED_P
686         usage. Use build_vector_type_for_mode for vector types.
687
688 2004-08-22  Richard Henderson  <rth@redhat.com>
689
690         PR 13465
691         * data.c (find_con_by_offset): Search ordered list; handle
692         elements with repeat counts.
693         (gfc_assign_data_value_range): New.
694         * gfortran.h (struct gfc_data_value): Make repeat unsigned.
695         (gfc_assign_data_value_range): Declare.
696         * match.c (top_val_list): Extract repeat count into a temporary.
697         * resolve.c (values): Make left unsigned.
698         (next_data_value): Don't decrement left.
699         (check_data_variable): Use gfc_assign_data_value_range.
700
701 2004-08-22  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
702
703         * trans-const.c, trans-decl.c, trans-expr.c: Spelling fixes.
704
705 2004-08-22  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
706
707         * check.c (gfc_check_reduction): Rename to ...
708         (check_reduction): ... this. Make static. Don't check type of
709         first argument.
710         (gfc_check_minval_maxval, gfc_check_prodcut_sum): New functions.
711         * intrinsic.c (add_functions): Change MAXVAL, MINVAL, PRODUCT and
712         SUM to use new check functions.
713         (check_specific): Change logic to call new functions.
714         * intrinsic.h (gfc_check_minval_maxval, gfc_check_product_sum):
715         Add prototypes.
716         (gfc_check_reduction): Remove prototype.
717
718 2004-08-20  Paul Brook  <paul@codesourcery.com>
719         Canqun Yang  <canqun@nudt.edu.cn>
720
721         PR fortran/17077
722         * trans-array.c (gfc_conv_array_parameter): Pass correct pointer
723         for automatic arrays.
724         * trans-types.c (gfc_get_nodesc_array_type): Add comment.
725
726 2004-08-19  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
727         (Port from g95)
728
729         PR fortran/17074
730         * match.c (match_simple_forall, match_simple_where): Forward-declare.
731         (gfc_match_if): Order statement list alphabetically, add WHERE and
732         FORALL, remove double PAUSE.
733         (gfc_match_simple_where, match_forall_header,
734         gfc_match_simple_forall): New functions.
735         (gfc_match_forall): Use match_forall_header.
736
737 2004-08-19  Paul Brook  <paul@codesourcery.com>
738
739         PR fortran/17091
740         * gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0.
741         * symbol.c (gfc_clear_attr): Use memset.
742
743 2004-08-19  Paul Brook  <paul@codesourcery.com>
744
745         PR fortran/14976
746         PR fortran/16228
747         * data.c (assign_substring_data_value): Remove.
748         (create_character_intializer): New function.
749         (gfc_assign_data_value): Track the typespec for the current
750         subobject.  Use create_character_intializer.
751
752 2004-08-19  Erik Schnetter  <schnetter@aei.mpg.de>
753
754         PR fortran/16946
755         * check.c (gfc_check_reduction): New function.
756         (gfc_check_minval_maxval): Removed.
757         (gfc_check_product): Removed.
758         (gfc_check_sum): Removed.
759         * intrinsic.h: Add/remove declarations for these.
760         * gfortran.h: Add field f3red to union gfc_check_f.
761         * intrinsic.c (add_sym_3red): New function.
762         (add_functions): Register maxval, minval, product, and sum intrinsics
763         through add_sym_3red.
764         (check_specific): Handle f3red union field.
765         * iresolve.c: Whitespace change.
766
767 2004-08-18  Paul Brook  <paul@codesourcery.com>
768
769         * trans-types.c (gfc_sym_type): Use pointer types for optional args.
770
771 2004-08-18  Victor Leikehman  <lei@il.ibm.com>
772
773         PR fortran/13278
774         * trans-io.c (transfer_namelist_element): New. Recursively handle
775         derived-type variables.  Pass string lengths.
776         (build_dt): Code moved to build_namelist, with some
777         changes and additions.
778         (gfc_build_io_library_fndecls): Declare the fifth
779         argument in st_set_nml_var_char -- string_length.
780
781 2004-08-17  Paul Brook  <paul@codesourcery.com>
782         Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
783
784         PR fortran/13082
785         * decl.c (get_proc_name): Update mystery comment.
786         (gfc_match_entry): Check for errors earlier.  Add entry point to list.
787         * dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes.
788         * gfortran.h (symbol_attribute): Add entry_master.  Document entry.
789         (struct gfc_entry_list): Define.
790         (gfc_get_entry_list): Define.
791         (struct gfc_namespace): Add refs and entries.
792         (enum gfc_exec_op): Add EXEC_ENTRY.
793         (struct gfc_code): Add ext.entry.
794         * module.c (ab_attribute, attr_bits): Remove AB_ENTRY.
795         (mio_symbol_attribute): Don't save/reture addr->entry.
796         (mio_namespace_ref): Refcount namespaces.
797         * parse.c (accept_statement): Handle ST_ENTRY.
798         (gfc_fixup_sibling_symbols): Mark symbol as referenced.
799         (parse_contained): Fixup sibling references to entry points
800         after parsing the procedure body.
801         * resolve.c (resolve_contained_fntype): New function.
802         (merge_argument_lists, resolve_entries): New functions.
803         (resolve_contained_functions): Use them.
804         (resolve_code): Handle EXEC_ENTRY.
805         (gfc_resolve): Call resolve_entries.
806         * st.c (gfc_free_statement): Handle EXEC_ENTRY.
807         * symbol.c (gfc_get_namespace): Refcount namespaces.
808         (gfc_free_namespace): Ditto.
809         * trans-array.c (gfc_trans_dummy_array_bias): Treat all args as
810         optional when multiple entry points are present.
811         * trans-decl.c (gfc_get_symbol_decl): Remove incorrect check.
812         (gfc_get_extern_function_decl): Add assertion.  Fix coment.
813         (create_function_arglist, trans_function_start, build_entry_thunks):
814         New functions.
815         (gfc_build_function_decl): Rename ...
816         (build_function_decl): ... to this.
817         (gfc_create_function_decl): New function.
818         (gfc_generate_contained_functions): Use it.
819         (gfc_trans_entry_master_switch): New function.
820         (gfc_generate_function_code): Use new functions.
821         * trans-stmt.c (gfc_trans_entry): New function.
822         * trans-stmt.h (gfc_trans_entry): Add prototype.
823         * trans-types.c (gfc_get_function_type): Add entry point argument.
824         * trans.c (gfc_trans_code): Handle EXEC_ENTRY.
825         (gfc_generate_module_code): Call gfc_create_function_decl.
826         * trans.h (gfc_build_function_decl): Remove.
827         (gfc_create_function_decl): Add prototype.
828
829 2004-08-15  Andrew Pinski  <apinski@apple.com>
830
831         PR fortran/17030
832         * f95-lang.c (gfc_init_builtin_functions): Initialize the builtins
833         for cabs{,f} and copysign{,f}.
834         * trans-decl.c (gfor_fndecl_math_cabsf): Delete.
835         (gfor_fndecl_math_cabs): Delete.
836         (gfor_fndecl_math_sign4): Delete.
837         (gfor_fndecl_math_sign8): Delete.
838         (gfc_build_intrinsic_function_decls): Remove the
839         initializing of cabs{,f} and copysign{,f} functions.
840         * trans-intrinsic.c (gfc_conv_intrinsic_abs): Use the builtins
841         instead of the functions definitions.
842         (gfc_conv_intrinsic_sign): Likewise.
843         * trans.h (gfor_fndecl_math_cabsf): Delete.
844         (gfor_fndecl_math_cabs): Delete.
845         (gfor_fndecl_math_sign4): Delete.
846         (gfor_fndecl_math_sign8): Delete.
847
848 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
849
850         * trans-array.c (gfc_trans_array_constructor_value): Use
851         build_int_cst.
852         * trans-const.c (gfc_build_string_const,
853         gfc_init_constants, gfc_conv_mpz_to_tree,
854         gfc_conv_constant_to_tree): Likewise.
855         * trans-decl.c (gfc_get_symbol_decl): Likewise.
856         * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
857         gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
858         * trans-io.c (add_case, set_error_locus, build_dt,
859         transfer_expr): Likewise.
860         * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
861         gfc_trans_stop, gfc_trans_character_select): Likewise.
862         * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
863         * trans.c (gfc_trans_runtime_check): Likewise.
864
865 2004-08-14  Paul Brook  <paul@codesourcery.com>
866
867         * trans-decl.c (gfc_build_function_decl): Remove dead code.
868
869 2004-08-14  Paul Brook  <paul@codesourcery.com>
870
871         * trans-arry.c (gfc_trans_auto_array_allocation): Remove unused var.
872
873 2004-08-13  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
874
875         * gfortran.h: Add comments.
876         * parse.c (parse_contained): Fix comment typo.
877         * resolve.c (was_declared): Ditto.
878         * symbol.c: Ditto.
879
880 2004-08-11  Paul Brook  <paul@codeourcery.com>
881
882         PR fortran/16917
883         * intrinsic.c (add_functions): Add dfloat as an alias for dble.
884
885 2004-08-10  Richard Henderson  <rth@redhat.com>
886
887         * f95-lang.c (gfc_init_builtin_functions): Remove
888          __builtin_stack_alloc, add __builtin_alloca.
889         * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR.
890         * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
891
892 2004-08-10  Paul Brook  <paul@codesourcery.com>
893
894         * trans-io.c (transfer_expr): Handle pointters.
895
896 2004-08-10  Paul Brook  <paul@codesourcery.com>
897
898         PR fortran/16919
899         * trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT.
900         (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta.
901         (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary):
902         Handle GFC_SS_COMPONENT.
903         (gfc_conv_ss_startstride): Ditto.  Set ss->shape.
904         (gfc_conv_loop_setup): Tweak commends. Remove dead code.
905         Use ss->shape.
906         (gfc_conv_array_initializer): Call specific initializer routines.
907         * trans-expr.c (gfc_trans_structure_assign): New function.
908         (gfc_trans_subarray_assign): New function.
909         (gfc_trans_subcomponent_assign): New fucntion
910         (gfc_conv_structure): Use them.
911         * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT.
912         (gfc_ss): Add shape.
913
914 2004-08-08  Victor Leikehman  <lei@il.ibm.com>
915
916         * simplify.c (gfc_simplify_shape): Bugfix.
917         * expr.c (gfc_copy_shape_excluding): New function.
918         * gfortran.h (gfc_get_shape): Bugfix.
919         (gfc_copy_shape_excluding): Added declaration.
920         * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
921         gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound,
922         gfc_resolve_ubound, gfc_resolve_transpose): Added compile
923         time resolution of shape.
924
925 2004-08-06  Janne Blomqvist  <jblomqvi@cc.hut.fi>
926
927         * intrinsic.c (add_subroutines): Add getenv and
928         get_environment_variable. (add_sym_5s): New function.
929         * intrinsic.h (gfc_resolve_get_environment_variable): Add
930         prototype.
931         * iresolve.c (gfc_resolve_get_environment_variable): New
932         function.
933
934 2004-08-06  Feng Wang  <fengwang@nudt.edu.cn>
935
936         * f95-lang.c (gfc_init_builtin_functions): Fix the number of
937         __builtin_pow[f] arguments.
938
939 2004-08-06  Steven G. Kargl  <kargls@comcast.net>
940
941         * arith.c: Add #define for model numbers.  Remove global GMP variables.
942         (natural_logarithm,common_logarithm,exponential,sine,
943         cosine,arctangent,hypercos,hypersine ): Remove.
944         (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions.
945         (arctangent2,gfc_arith_init_1,gfc_arith_done_1
946         gfc_check_real_range, gfc_constant_result, gfc_range_check,
947         gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times,
948         gfc_arith_divide,complex_reciprocal,complex_pow_ui,
949         gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real,
950         gfc_convert_complex,gfc_int2real,gfc_int2complex,
951         gfc_real2int,gfc_real2real,gfc_real2complex,
952         gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP
953         to MPFR, use new functions.
954         * arith.h: Remove extern global variables.
955         (natural_logarithm,common_logarithm,exponential, sine, cosine,
956         arctangent,hypercos,hypersine): Remove prototypes.
957         (arctangent2): Update prototype from GMP to MPFR.
958         (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes.
959         * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR.
960         * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR.
961         * gfortran.h (GFC_REAL_BITS): Remove.
962         (arith): Add ARITH_NAN.
963         Include mpfr.h.  Define GFC_RND_MODE.
964         Rename GCC_GFORTRAN_H GFC_GFC_H.
965         (gfc_expr): Convert GMP to MPFR.
966         * module.c: Add arith.h, correct type in comment.
967         (mio_gmp_real): Convert GMP to MPFR.
968         (mio_expr):  Use gfc_set_model_kind().
969         * primary.c:  Update copyright date with 2004.
970         (match_real_constant,match_const_complex_part): Convert GMP to MPFR.
971         * simplify.c: Remove global GMP variables
972         (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag,
973         gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint,
974         gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan,
975         gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx,
976         gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh,
977         gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon,
978         gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor,
979         gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int,
980         gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log,
981         gfc_simplify_log10,simplify_min_max,gfc_simplify_mod,
982         gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint,
983         gfc_simplify_rrspacing,gfc_simplify_scale,
984         gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin,
985         gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt,
986         gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny,
987         gfc_simplify_init_1,gfc_simplify_done_1):  Convert GMP to MPFR.
988         Use new functions.
989         * trans-const.c (gfc_conv_mpfr_to_tree): Rename from
990         gfc_conv_mpf_to_tree.  Convert it to use MPFR
991         (gfc_conv_constant_to_tree): Use it.
992         * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree().
993         * trans-intrinsic.c: Add arith.h, remove gmp.h
994         (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR.
995
996 2004-08-06  Victor Leikehman  <lei@il.ibm.com>
997         Paul Brook  <paul@codesourcery.com>
998
999         * trans-array.c (gfc_trans_allocate_array_storage,
1000         gfc_trans_allocate_temp_array, gfc_add_loop_ss_code,
1001         gfc_conv_loop_setup): For functions, if the shape of the result
1002         is not known in compile-time, generate an empty array descriptor for
1003         the result and let the callee to allocate the memory.
1004         (gfc_trans_dummy_array_bias): Do nothing for pointers.
1005         (gfc_conv_expr_descriptor): Use function return values directly.
1006         * trans-expr.c (gfc_conv_function_call): Always add byref call
1007         insn to pre chain.
1008         (gfc_trans_pointer_assignment): Add comments.
1009         (gfc_trans_arrayfunc_assign): Don't chain on expression.
1010
1011 2004-08-01  Roger Sayle  <roger@eyesopen.com>
1012
1013         * options.c (gfc_init_options): Don't warn about the use GNU
1014         extensions by default.
1015         (gfc_post_options): Warn about GNU extensions with -pedantic.
1016         (gfc_handle_option): Don't warn about GNU extensions with -std=gnu.
1017
1018 2004-07-30  Richard Henderson  <rth@redhat.com>
1019
1020         * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL
1021         for TREE_CONSTANTs.
1022
1023 2004-07-25  Richard Henderson  <rth@redhat.com>
1024
1025         * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL
1026         and DECL_IGNORED_P on RESULT_DECL.
1027         (gfc_generate_constructors): Likewise.
1028
1029 2004-07-18  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1030
1031         PR fortran/16465
1032         * lang.opt (ffixed-line-length-none, ffixed-line-length-): New
1033         options.
1034         (ffixed-line-length-80, ffixed-line-length-132): Remove.
1035         * options.c (gfc_handle_options): Deal with changed options.
1036         * scanner.c (load_line): Change second arg to 'char **',
1037         allocate if pointing to NULL. Keep track of buffer's length.
1038         Adapt buffer size to overlong lines. Pad lines to full length
1039         in fixed form.
1040         (load_file): Adapt to new interface of load_line.
1041
1042 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
1043
1044         * trans.h (builtin_function): Declare.
1045
1046 2004-07-16  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1047
1048         PR fortran/16404
1049         (parts ported from g95)
1050         * parse.h (gfc_state_data): New field do_variable.
1051         (gfc_check_do_variable): Add prototype.
1052         * parse.c (push_state): Initialize field 'do_variable'.
1053         (gfc_check_do_variable): New function.
1054         (parse_do_block): Remember do iterator variable.
1055         (parse_file): Initialize field 'do_variable'.
1056         * match.c (gfc_match_assignment, gfc_match_do,
1057         gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate):
1058         Add previously missing checks.
1059         (gfc_match_return): Reformat error message.
1060         * io.c (match_out_tag): New function.
1061         (match_open_element, match_close_element,
1062         match_file_element, match_dt_element): Call match_out_tag
1063         instead of match_vtag where appropriate.
1064         (match_io_iterator, match_io_element): Add missing check.
1065         (match_io): Reformat error message.
1066         (match_inquire_element): Call match_out_tag where appropriate.
1067
1068         * parse.c (gfc_check_do_variable): Fix error locus.
1069
1070 2004-07-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1071
1072         PR fortran/15129
1073         * trans-decl.c (gfc_build_function_decl): Create a new chardecl
1074         for every assumed length character dummy argument.
1075
1076         PR fortran/15140
1077         * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion.
1078
1079         PR fortran/13792
1080         * simplify.c (gfc_simplify_bound): Copy the bound expression.
1081
1082 2004-07-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1083
1084         PR fortran/15324
1085         * trans-array.c gfc_trans_g77_array,
1086         gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init
1087         for assumed length characters.
1088         (gfc_conv_expr_descriptor): Set se->string_length if dealing
1089         with a character expression.
1090         (gfc_cvonv_array_parameter): Pass string length when passing
1091         character array according to g77 conventions.
1092
1093 2004-07-12  Paul Brook  <paul@codesourcery.com>
1094
1095         * expr.c (gfc_check_assign_symbol): Handle pointer assignments.
1096         * trans-array.c (gfc_trans_auto_array_allocation): Remove
1097         initialization code.
1098         * trans-common.c (create_common): Use gfc_conv_initializer.
1099         * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer.
1100         * trans-expr.c (gfc_conv_initializer): New function.
1101         (gfc_conv_structure): Use it.
1102         * trans.h (gfc_conv_initializer): Add prototype.
1103
1104 2004-07-11  Paul Brook  <paul@codesourcery.com>
1105
1106         PR fortran/15986
1107         * parse.c (gfc_fixup_sibling_symbols): Also look for untyped
1108         variables.
1109         (parse_contained): Mark contained symbols as referenced.
1110
1111 2004-07-11  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1112
1113         PR fortran/16455
1114         * module.c (gfc_dump_module, gfc_use_module): Print locus
1115         when opening of module file fails.
1116
1117         PR fortran/16404
1118         * io.c (match_io): Flag 'WRITE(...), ...' as extension.
1119
1120         PR fortran/16404
1121         * match.c (gfc_match_program): A program name is obligatory.
1122         (gfc_match_return): RETURN in main program is an extension.
1123         (gfc_match_block_data): A space is required before a block data
1124         name.
1125
1126         PR fortran/16433
1127         * primary.c (match_boz_constant): Call gfc_notify_std only if
1128         we actually have a non-standard boz-literal-constant.
1129
1130         PR fortran/15754
1131         * expr.c (gfc_check_assign): Print ranks if incompatible. Issue
1132         warning if assigning NULL().
1133
1134 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
1135
1136         * f95-lang.c (set_block): Remove.
1137         (gfc_clear_binding_stack): New.
1138         (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
1139         (struct binding_level): Remove block_created_by_back_end.
1140         (clear_binding_level): Likewise.
1141         (poplevel): Don't handle block_created_by_back_end.
1142
1143 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1144
1145         * trans-decl.c (gfc_create_module_variable): Nothing to do if
1146         symbol is in common, because we ...
1147         (gfc_generate_module_vars): Call gfc_trans_common.
1148
1149 2004-07-10  Paul Brook  <paul@codesourcery.com>
1150
1151         * trans-array.c (gfc_build_null_descriptor): New function.
1152         (gfc_trans_static_array_pointer): Use it.
1153         * trans-array.h (gfc_build_null_descriptor): Add prototype.
1154         * trans-expr.c (gfc_conv_structure): Handle array pointers.
1155
1156 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1157
1158         PR fortran/16336
1159         * decl.c (gfc_match_save): Use-associated common block
1160         doesn't collide.
1161         * gfortran.h (gfc_common_head): Add new field 'name'.
1162         Fix typo in comment after #endif.
1163         * match.c (gfc_get_common): Add new argument from_common,
1164         mangle name if flag is set, fill in new field in structure
1165         gfc_common_head.
1166         (match_common): Set new arg in call to gfc_get_common,
1167         use-associated common block doesn't collide.
1168         * match.h (gfc_get_common): Adapt prototype.
1169         * module.c (load_commons): Set new arg in call to
1170         gfc_get_common.
1171         * symbol.c (free_common_tree): New function.
1172         (gfc_free_namespace): Call new function.
1173         * trans-common.c (several functions): Remove argument
1174         'name', use name from gfc_common_head instead.
1175
1176 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1177
1178         * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
1179         and RHS match. Return early if the RHS is NULL().
1180
1181         PR fortran/16336
1182         * match.c (match_common): Fix error reporting for used common.
1183
1184         PR fortran/15969
1185         * trans-expr.c (gfc_conv_structure): Handle initialization
1186         of scalar pointer components.
1187
1188         * parse.c (decode_statement): Fix matching of BLOCK DATA.
1189
1190         * trans-decl.c (generate_local_decl): Remove workaround obsoleted
1191         by fix for PR 15481.
1192
1193 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1194
1195         * trans-common.c: Fix whitespace issues, make variable names
1196         more readable.
1197         (create_common): Additionally, make loop logic more obvious.
1198
1199 2004-07-10  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1200         Paul Brook  <paul@codesourcery.com>
1201
1202         PR fortran/13415
1203         * trans-common.c (calculate_length): Remove ...
1204         (get_segment_info): Merge into here.  Save field type.
1205         (build_field): Use saved type.
1206         (create_common, new_condition, new_segment, finish_equivalences):
1207         Use new get_segment_info.
1208         * trans-types.c: Update comment.
1209
1210 2004-07-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1211
1212         PR fortran/14077
1213         * moduele.c (mio_symbol): Don't I/O initial values unless
1214         symbol is a parameter.
1215
1216 2004-07-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1217
1218         PR fortran/13201
1219         * resolve.c (resolve_symbol): Verify that the shape of a
1220         parameter array is not only explicit, but also constant.
1221         * array.c (gfc_is_compile_time_shape): New function.
1222         * gfortran.h (gfc_is_compile_time_shape): Add prototype.
1223
1224 2004-07-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1225
1226         PR fortran/15481
1227         PR fortran/13372
1228         PR fortran/13575
1229         PR fortran/15978
1230         * module.c (write_symbol, write_symtree): Remove workaround.
1231         * primary.c (match_actual_arglist): Enhance comment.
1232         (gfc_match_rvalue): Handle function call with first argument
1233         a keyword argument correctly.
1234         * resolve.c (resolve_symbol): Change call to
1235         gfc_set_default_type to issue error if no implicit type
1236         can be found.
1237         * trans-decl.c (gfc_create_module_variable): Remove workaround.
1238
1239 2004-07-08  Paul Brook  <paul@codesourcery.com>
1240
1241         * intrinsic.c (add_sym_4s): New function.
1242         (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
1243
1244 2004-07-04  Janne Blomqvist  <jblomqvi@cc.hut.fi>
1245         Paul Brook  <paul@codesourcery.com>
1246
1247         PR fortran/15280
1248         PR fortran/15665
1249         * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
1250         GFC_ISYM_COMMAND_ARGUMENT_COUNT.
1251         * intrinsic.c (add_functions):  Identify iargc.  Add
1252         command_argument_count.
1253         (add_subroutines): Resolve getarg.  Add get_command and
1254         get_command_argument.
1255         * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
1256         gfc_resolve_get_command_argument): Add prototypes.
1257         * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
1258         gfc_resolve_get_command_argument): New functions.
1259         * trans-decl.c (gfor_fndecl_iargc): New variable.
1260         (gfc_build_intrinsic_function_decls): Set it.
1261         * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
1262         (gfc_conv_intrinsic_function): Use it.
1263         * trans.h (gfor_fndecl_iargc): Declare.
1264
1265 2004-07-04  Matthias Klose  <doko@debian.org>
1266
1267         * Make-lang.in: Generate and install gfortran man page.
1268         * invoke.texi: Remove extra '@c man end'.
1269
1270 2004-07-04  Richard Henderson  <rth@redhat.com>
1271
1272         * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
1273
1274 2004-07-04  Paul Brook  <paul@codesourcery.com>
1275
1276         * decl.c (gfc_match_implicit_range): Don't use typespec.
1277         (gfc_match_implicit): Handle character selectors.
1278         * gfortran.h (gfc_set_implicit): Remove prototype.
1279         (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
1280         * parse.c (accept_statement): Don't call gfc_set_implicit.
1281         * symbol.c (new_ts): Remove.
1282         (gfc_set_implicit_none): Use same loop bounds as other functions.
1283         (gfc_set_implicit): Remove.
1284         (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
1285         (gfc_merge_new_implicit): Combine with gfc_set_implicit.
1286
1287 2004-06-30  Richard Henderson  <rth@redhat.com>
1288
1289         * match.c (var_element): Remove unused variable.
1290
1291         * trans-decl.c (gfc_generate_function_code): Don't set
1292         x_whole_function_mode_p.
1293         (gfc_generate_constructors): Likewise.
1294
1295 2004-06-30  Richard Henderson  <rth@redhat.com>
1296
1297         * trans-decl.c (gfc_generate_function_code): Don't set
1298         immediate_size_expand.
1299         (gfc_generate_constructors): Likewise.
1300
1301 2004-06-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1302
1303         PR fortran/16161
1304         * decl.c (gfc_match_type_spec): Rename second argument to
1305         'implicit_flag', reverse meaning. Don't match_char_spec if
1306         'implicit_flag' is set. Rename to ...
1307         (match_type_spec): ... this.
1308         (gfc_match_implicit_none, match_implicit_range): Move here
1309         from match.c.
1310         (gfc_match_implicit): Move here from match.c, try to
1311         match_char_len if match_implicit_range doesn't succeed for
1312         CHARACTER implicits. Call renamed fucntion match_type_spec.
1313         (gfc_match_data_decl, match_prefix): Call renamed function
1314         match_type_spec.
1315         * match.c (gfc_match_implicit_none, match_implicit_range,
1316         gfc_match_implicit): Move to decl.c.
1317         * match.h (gfc_match_implicit_none, gfc_match_implicit):
1318         Move protoypes to section 'decl.c'.
1319         (gfc_match_type_spec): Remove prototype.
1320
1321 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1322
1323         * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
1324         copyright years.
1325
1326 2004-06-29  Steven Bosscher  <stevenb@suse.de>
1327
1328         Make sure types in assignments are compatible.  Mostly mechanical.
1329         * trans-const.h (gfc_index_one_node): New define.
1330         * trans-array.c (gfc_trans_allocate_array_storage,
1331         gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
1332         gfc_trans_array_constructor_value, gfc_trans_array_constructor,
1333         gfc_conv_array_ubound, gfc_conv_array_ref,
1334         gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
1335         gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
1336         gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
1337         gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
1338         types in assignments, conversions and conditionals for expressions.
1339         * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
1340         gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
1341         gfc_conv_function_call, gfc_trans_pointer_assignment,
1342         gfc_trans_scalar_assign): Likewise.
1343         * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
1344         gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
1345         gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
1346         gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
1347         gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
1348         gfc_conv_allocated, gfc_conv_associated,
1349         gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
1350         * trans-io.c (set_string): Likewise.
1351         * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
1352         gfc_do_allocate, generate_loop_for_temp_to_lhs,
1353         generate_loop_for_rhs_to_temp, compute_inner_temp_size,
1354         compute_overall_iter_number, gfc_trans_assign_need_temp,
1355         gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
1356         gfc_evaluate_where_mask, gfc_trans_where_assign,
1357         gfc_trans_where_2): Likewise.
1358         * trans-types.c (gfc_get_character_type, gfc_build_array_type,
1359         gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
1360
1361         * trans.c (gfc_add_modify_expr): Add sanity check that types
1362         for the lhs and rhs are the same for scalar assignments.
1363
1364 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1365
1366         * dump-parse-tree.c (show_common): New function.
1367         (gfc_show_namespace): Show commons.
1368
1369 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1370         Andrew Vaught  <andyv@firstinter.net>
1371
1372         PR fortran/13249
1373         PR fortran/15481
1374         * decl.c (gfc_match_save): Adapt to new common structures,
1375         don't allow saving USE-associated common.
1376         * dump-parse-tree (gfc_show_attr): (saved_)common are not
1377         symbol attributes any longer.
1378         (gfc_show_symbol): Don't show old-style commons any longer.
1379         (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
1380         interface.
1381         * gfortran.h (symbol_attribute): Remove common and saved_common
1382         attributes.
1383         (gfc_symbol): Remove common_head element.
1384         (gfc_common_head): New struct.
1385         (gfc_get_common_head): New macro.
1386         (gfc_symtree): Add field 'common' to union.
1387         (gfc_namespace): Add field 'common_root'; change type of field
1388         'blank_common' to blank_common.
1389         (gfc_add_data): New prototype.
1390         (gfc_traverse_symtree): Expect a symtree as first argument
1391         instead of namespace.
1392         * match.c (gfc_get_common): New function.
1393         (match_common_name): Change to take char * as argument, adapt,
1394         fix bug with empty name.
1395         (gfc_match_common): Adapt to new data structures. Disallow
1396         redeclaration of USE-associated COMMON-block. Fix bug with
1397         empty common.
1398         (var_element): Adapt to new common structures.
1399         * match.h (gfc_get_common): Declare.
1400         * module.c: Add 2004 to copyright years, add commons to module
1401         file layout description.
1402         (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
1403         for removed attributes.
1404         (mio_symbol): Adapt to new way of storing common relations.
1405         (load_commons): New function.
1406         (read_module): Skip common list on first pass, load_commons at
1407         second.
1408         (write_commons): New function.
1409         (write_module): Call write_commons().
1410         * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
1411         functions related to removed attributes.
1412         (gfc_add_data): New function.
1413         (gfc_clear_attr): Don't set removed attributes.
1414         (gfc_copy_attr): Don't copy removed attributes.
1415         (traverse_symtree): Remove.
1416         (gfc_traverse_symtree): Don't traverse symbol
1417         tree of the passed namespace, but require a symtree to be passed
1418         instead. Unify with traverse_symtree.
1419         (gfc_traverse_ns): Call gfc_traverse_symtree according to new
1420         interface.
1421         (save_symbol): Remove setting of removed attribute.
1422         * trans-common.c (gfc_sym_mangled_common_id): Change to
1423         take 'char *' argument instead of 'gfc_symbol'.
1424         (build_common_decl, new_segment, translate_common): Adapt to new
1425         data structures, add new
1426         argument name.
1427         (create_common): Adapt to new data structures, add new
1428         argument name. Fix typo in intialization of derived types.
1429         (finish_equivalences): Add second argument in call to
1430         create_common.
1431         (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
1432         (gfc_trans_common): Adapt to new data structures.
1433         * trans-decl.c (gfc_create_module_variables): Remove test for
1434         removed attribute.
1435
1436 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1437
1438         * io.c: Add 2004 to copyright years.
1439
1440 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1441         Andrew Vaught  <andyv@firstinter.net>
1442
1443         * gfortran.h (gfc_gsymbol): New typedef.
1444         (gfc_gsym_root): New variable.
1445         (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
1446         * parse.c (global_used): New function.
1447         (parse_block_data): Check for double empty BLOCK DATA,
1448         use global symbol table.
1449         (parse_module): Use global symbol table.
1450         (add_global_procedure, add_global_program): New functions.
1451         (gfc_parse_file): Use global symbol table.
1452         * symbol.c (gfc_gsym_root): New variable.
1453         (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
1454         functions.
1455
1456 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1457
1458         * module.c (mio_gmp_real): Correct writing of negative numbers.
1459
1460 2004-06-29  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1461
1462         PR fortran/15963
1463         * expr.c (check_intrinsic_op): Allow comparison of characters.
1464         Make logic easier.
1465
1466 2004-06-26  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1467         Andrew Vaught  <andyv@firstinter.net>
1468
1469         * decl.c (contained_procedure): New function.
1470         (match_end): Verify correctness of END STATEMENT in
1471         all cases.
1472
1473 2004-06-26  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1474         Andrew Vaught  <andyv@firstinter.net>
1475
1476         PR fortran/15190
1477         * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
1478         (decode_statement): Enforce required space in free-form.
1479
1480 2004-06-22  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1481
1482         * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
1483         * trans-array.c (gfc_conv_descriptor_data): Add operand
1484         for COMPONENT_REF.
1485         (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
1486         (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
1487         (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
1488         * trans-common.c (create_common): Likewise.
1489         * trans-expr.c (gfc_conv_component_ref): Likewise.
1490         * trans-io.c (set_parameter_value): Likewise.
1491         (set_parameter_ref, set_string, set_flag, io_result): Likewise.
1492         (transfer_expr): Likewise.
1493         * trans-decl.c (gfc_trans_auto_character_variable):
1494         Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
1495         (gfc_gimplify_function): New function.
1496         (gfc_generate_function-code): Properly handle nested functions.
1497         * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
1498
1499 2004-06-22  Janne Blomqvist  <jblomqvi@cc.hut.fi>
1500
1501         PR fortran/15750
1502         * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
1503         (gfc_resolve_inquire): Resolve the iolength tag.  Return
1504         SUCCESS at end of function if no failure has occured.
1505         * resolve.c (resolve_code): Resolve if iolength is encountered.
1506         * trans-io.c: (ioparm_iolength, iocall_iolength,
1507         iocall_iolength_done): New variables.
1508         (last_dt): Add IOLENGTH.
1509         (gfc_build_io_library_fndecls ): Set iolength related variables.
1510         (gfc_trans_iolength): Implement.
1511         (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
1512
1513 2004-06-21  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de
1514
1515         PR fortran/15511
1516         * scanner.c (load_line): Don't truncate preprocessor lines.
1517         Reformat error message.
1518         (preprocessor_line): Issue warning in case of malformed
1519         preprocessor line.
1520
1521 2004-06-21  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1522
1523         * resolve.c (resolve_symbol): Add comment in function body.
1524         (check_data_variable): Change type of mark to ar_type, adapt code
1525         accordingly.
1526
1527 2004-06-21  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1528
1529         * array.c (gfc_insert_constructor): Avoid redundant call to
1530         mpz_comp. Add 2004 to copyright years.
1531
1532 2004-06-21  Joseph S. Myers  <jsm@polyomino.org.uk>
1533
1534         * trans.h (stmtblock_t): Change has_scope to unsigned int.
1535
1536 2004-06-20  Steven G. Kargl  <kargls@comcast.net>
1537
1538         * arith.c (gfc_range_check): correct complex underflow.
1539
1540 2004-06-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1541
1542         PR fortran/15962
1543         * match.c (match_case_selector): Call gfc_match_init_expr
1544         instead of gfc_match_expr.
1545         * resolve.c (validate_case_label_expr): No need to check for
1546         constant, since it wouldn't have been matched with the fix to
1547         match.c.
1548
1549 2004-06-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1550
1551         PR fortran/15211
1552         * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
1553         of strings.
1554
1555 2004-06-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1556
1557         PR fortran/15510
1558         * trans-deecl.c (generate_local_decl): Do not issue warning for
1559         unused variables if they're use associated.
1560
1561 2004-06-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1562         Andrew Vaught <andyv@firstinter.net>
1563
1564         PR fortran/14928
1565         * gfortran.h (gfc_check_f): Add new field f3ml.
1566         * check.c (gfc_check_minloc_maxloc): Take argument list instead
1567         of individual arguments, reorder if necessary.
1568         * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
1569         * intrinsic.c (add_sym_3ml): New function.
1570         (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
1571         (check_specific): Catch special case MINLOC, MAXLOC.
1572
1573 2004-06-14  Paul Brook  <paul@codesourcery.com>
1574
1575         * intrinsic.c (add_sym_2s): Use correct function types.
1576
1577 2004-06-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1578
1579         * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize.  Move data.c
1580         * data.c (gfc_get_section_index):  Remove dependency on trans.h.
1581
1582 2004-06-12  Steven G. Kargl  <kargls@comcast.net>
1583
1584         * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
1585         gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
1586         * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
1587         GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
1588         * trans-intrinsic.c:  Use symbols.
1589         * intrinsic.c (add_sym_2s): New function.
1590         * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
1591         * intrinsic.h: Function prototypes.
1592         * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
1593         gfc_resolve_srand):  New functions.
1594
1595 2004-06-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1596
1597         PR fortran/14957
1598         * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
1599         contained procedure.
1600
1601 2004-06-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1602
1603         PR fortran/12841
1604         * interface.c (compare_parameter, compare_actual_formal): Don't
1605         check types and array shapes for NULL()
1606         * trans-expr.c (conv_function_call): No double indirection for
1607         NULL()
1608
1609 2004-06-09  Toon Moene  <toon@moene.indiv.nluug.nl>
1610
1611         * trans-expr.c (gfc_conv_cst_int_power): Compute
1612         x**(-n) by converting it to (1/x)**n instead of
1613         1/x**n.
1614
1615 2004-06-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1616
1617         PR fortran/13372
1618         * module.c (write_symbol, write_symtree): Don't write symbols
1619         wrongly added to namespace.
1620         * trans-decl.c (gfc_create_module_variable): Don't create a
1621         backend decl for a symbol incorrectly added to namespace.
1622
1623 2004-06-09  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1624
1625         PR fortran/13201
1626         * resolve.c (resolve_symbol): Verify that parameter array has an
1627         explicit shape. Fix typos and coding style issues in surrounding
1628         lines.
1629
1630 2004-06-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1631
1632         PR fortran/15478
1633         * gfortran.texi: The documentation doesn't contain infomration on
1634         how to report bugs, and shouldn't, so remove the line which
1635         says it does.
1636
1637 2004-06-05  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1638
1639         * intrinsic.c (sort_actual): Keep track of type of missing
1640         arguments. (Missing from previous commit.)
1641
1642 2004-06-03  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1643
1644         * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
1645         * interface.c (compare_actual_formal): Keep type of omitted
1646         optional arguments.
1647         * trans-expr.c (gfc_conv_function_call): Add string length
1648         argument for omitted string argument.
1649
1650 2004-06-03  Paul Brook  <paul@codesourcery.com>
1651
1652         * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
1653         lists instead of compound expr chains.
1654         (gfc_trans_code): Annotate statement lists.
1655
1656 2004-06-03  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1657
1658         * trans-array.c: Fix spelling in comments.
1659
1660 2004-06-02  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1661
1662         PR fortran/15557
1663         * data.c (assign_substring_data_value): New function.
1664         (gfc_assign_data_value): Call the new function if we're dealing
1665         with a substring LHS.
1666
1667 2004-06-01  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1668
1669         PR fortran/15477
1670         * gfortran.h (GFC_VERSION): Remove.
1671         * gfortran.texi (version-gfortran): Remove, replace by version-GCC
1672         where used.
1673
1674 2004-05-31  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1675
1676         * trans-types.c: Fix spelling & layout in comments.
1677
1678 2004-05-30  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1679
1680         PR fortran/14067
1681         * trans-const.c (gfc_conv_string_init): Allow variable string
1682         length lower than initialization string length.
1683
1684 2004-05-30  Paul Brook  <paul@codesourcery.com>
1685
1686         PR fortran/15620
1687         * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
1688         * trans-expr.c (gfc_trans_string_copy): New function.
1689         (gfc_conv_statement_function): Use them.  Create temp vars.  Enforce
1690         character lengths.
1691         (gfc_conv_string_parameter): Use gfc_trans_string_copy.
1692         * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
1693         * trans.h (struct gfc_saved_var): Define.
1694         (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
1695
1696 2004-05-30  Steven G. Kargl  <kargls@comcast.net>
1697
1698         * iresolve.c (gfc_resolve_random_number): Clean up conditional.
1699
1700 2004-05-29  Steven G. Kargl  <kargls@comcast.net>
1701
1702         * simplify.c (gfc_simplify_log): Remove useless line of code.
1703
1704 2004-05-29  Paul Brook  <paul@codesourcery.com>
1705
1706         * trans-common.c (find_equivalence): Find multiple rules.
1707
1708 2004-05-27  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1709
1710         * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
1711         (gfc_current_locus): Declare new global variable.
1712         * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
1713         (gfc_current_locus1): Rename ...
1714         (gfc_current_locus): ... to this.
1715         (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
1716         skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
1717         gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
1718         gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
1719         and gfc_current_locus(), respectively.
1720         * array.c (match_subscript, gfc_match_array_ref, match_array_list,
1721         match_array_cons_element, gfc_match_array_constructor):
1722         Read/modify gfc_current_locus instead of calling gfc_set_locus()
1723         and gfc_current_locus().
1724         * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
1725         match_attr_spec, gfc_match_function_decl, gfc_match_end,
1726         attr_decl1, gfc_match_save): Likewise.
1727         * error.c (error_print, gfc_internal_error): Likewise.
1728         * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
1729         * interface.c (gfc_add_interface): Likewise.
1730         * io.c (gfc_match_format, match_dt_format, match_dt_element,
1731         match_io_iterator, match_io): Likewise.
1732         * match.c (gfc_match_space, gfc_match_eos,
1733         gfc_match_small_literal_int, gfc_match_st_label,
1734         gfc_match_strings, gfc_match_name, gfc_match_iterator,
1735         gfc_match_char, gfc_match, gfc_match_assignment,
1736         gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
1737         gfc_match_nullify, gfc_match_call, match_implicit_range,
1738         gfc_match_implicit, gfc_match_data, match_case_selector,
1739         gfc_match_case, match_forall_iterator): Likewise.
1740         * matchexp.c (gfc_match_defined_op_name, next_operator,
1741         match_level_1, match_mult_operand, match_ext_mult_operand,
1742         match_add_operand, match_ext_add_operand, match_level_2,
1743         match_level_3, match_level_4, match_and_operand, match_or_operand,
1744         match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
1745         * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
1746         * parse.c (match_word, decode_statement, next_free, next_fixed,
1747         add_statement, verify_st_order, parse_if_block, gfc_parse_file):
1748         Likewise.
1749         * primary.c (match_digits, match_integer_constant,
1750         match_boz_constant, match_real_constant, match_substring,
1751         next_string_char, match_charkind_name, match_string_constant,
1752         match_logical_constant, match_const_complex_part,
1753         match_complex_constant, match_actual_arg, match_keyword_arg,
1754         gfc_match_actual_arglist, gfc_match_structure_constructor,
1755         gfc_match_rvalue, gfc_match_variable): Likewise.
1756         * st.c (gfc_get_code): Likewise.
1757         * symbol.c (check_conflict, check_used, check_done,
1758         duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
1759         gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
1760         gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
1761
1762 2004-05-26  Roger Sayle  <roger@eyesopen.com>
1763
1764         * io.c (format_asterisk): Silence compiler warnings by correcting
1765         the number of elements of a "locus" initializer.
1766
1767 2004-05-25  Roger Sayle  <roger@eyesopen.com>
1768
1769         PR fortran/13912
1770         * matchexp.c: Allow unary operators after arithmetic operators
1771         as a GNU extension.
1772         (match_ext_mult_operand, match_ext_add_operand): New functions.
1773         (match_mult_operand): Tweak to call match_ext_mult_operand.
1774         (match_add_operand): Tweak to call match_ext_mult_operand.
1775         (match_level_2): Rearrange to call match_ext_add_operand.
1776
1777 2004-05-25  Paul Brook  <paul@codesourcery.com>
1778
1779         * expr.c (check_inquiry): Remove bogus tests.
1780
1781 2004-05-23  Paul Brook  <paul@codesourcery.com>
1782
1783         PR fortran/13773
1784         * expr.c (restricted_args): Remove redundant checks/argument.
1785         (external_spec_function): Update to match.
1786         (restricted_intrinsic): Rewrite.
1787
1788 2004-05-23  Paul Brook  <paul@codesourcery.com>
1789         Victor Leikehman  <lei@haifasphere.co.il>
1790
1791         * gfortran.h (struct gfc_symbol): Add equiv_built.
1792         * trans-common.c: Change int to HOST_WIDE_INT.  Capitalize error
1793         messages.
1794         (current_length): Remove.
1795         (add_segments): New function.
1796         (build_equiv_decl): Create initialized common blocks.
1797         (build_common_decl): Always add decl to bindings.
1798         (create_common): Create initializers.
1799         (find_segment_info): Reformat to match coding conventions.
1800         (new_condition): Use add_segments.
1801         (add_condition, find_equivalence, add_equivalences): Move iteration
1802         inside functions.  Only process each segment once.
1803         (new_segment, finish_equivalences, translate_common): Simplify.
1804
1805 2004-05-23  Steven G. Kargl  <kargls@comcast.net>
1806
1807         * check.c (gfc_check_random_seed): Issue for too many arguments.
1808
1809 2004-05-22  Steven G. Kargl  <kargls@comcast.net>
1810
1811         * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
1812
1813 2004-05-22  Paul Brook  <paul@codesourcery.com>
1814
1815         * dump-parse-tree.c (gfc_show_equiv): New function.
1816         (gfc_show_namespace): Use it.
1817
1818 2004-05-22  Victor Leikehman  <lei@haifasphere.co.il>
1819
1820         PR fortran/13249
1821         * symbol.c (gfc_add_common): Disable checks to work around other more
1822         fundamental inadequacies.
1823
1824 2004-05-22  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
1825
1826         * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
1827         only for functions.
1828         (gfc_build_function_decl): Likewise.
1829
1830 2004-05-22  Steven G. Kargl  <kargls@comcast.net>
1831
1832         * check.c (gfc_check_system_clock): New function.
1833         * intrinsic.c (add_sym_3s): New function.
1834         (add_subroutines): Use it.
1835         * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
1836         Add prototypes.
1837         * iresolve.c (gfc_resolve_system_clock): New function.
1838
1839 2004-05-22  Steven G. Kargl  <kargls@comcast.net>
1840
1841         * invoke.texi: Document -Wunderflow and spell check.
1842         * lang.opt: Add Wunderflow.
1843         * gfortran.h (gfc_option_t): Add warn_underflow option.
1844         * options.c (gfc_init_options, set_Wall): Use it.
1845         * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
1846         * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
1847         gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
1848         gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
1849         * arith.c (common_logarithm): Fix typo in comment.
1850
1851 2004-05-21  Roger Sayle  <roger@eyesopen.com>
1852
1853         * io.c (check_format): As a GNU extension, allow the comma after a
1854         string literal to be optional in a format.  Use gfc_notify_std to
1855         issue an error/warning as appropriate.
1856
1857 2004-05-21  Roger Sayle  <roger@eyesopen.com>
1858
1859         * io.c (check_format): Use gfc_notify_std to determine whether to
1860         issue an error/warning for omitting the digits from the X format.
1861
1862 2004-05-20  Roger Sayle  <roger@eyesopen.com>
1863
1864         * io.c (check_format): Allow the number before the X format to
1865         be optional when not -pedantic.
1866
1867 2004-05-18  Feng Wang  <fengwang@nudt.edu.cn>
1868         Paul Brook  <paul@codesourcery.com>
1869
1870         * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
1871         Create decls for __builtin_pow{,f}.
1872         * gfortran.h (PREFIX_LEN): Define.
1873         * trans-decl.c (gfor_fndecl_math_powi): Add.
1874         (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
1875         (gfc_build_intrinsic_function_decls): Create decls for powi.
1876         * trans-expr.c (powi_table): Add.
1877         (gfc_conv_integer_power): Remove.
1878         (gfc_conv_powi): New function.
1879         (gfc_conv_cst_int_power): New function.
1880         (gfc_conv_power_op): Use new powi routines.
1881         * trans.h (struct gfc_powdecl_list): Add.
1882         (gfor_fndecl_math_powi): Add.
1883         (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
1884
1885 2004-05-18  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1886
1887         * trans.c, trans-decl.c: Fix comment typos.
1888
1889 2004-05-18  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1890
1891         * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
1892
1893 2004-05-18  Steve Kargl  <kargls@comcast.net>
1894
1895         * arith.c (gfc_int2complex): Fix incorrect range checking.
1896
1897 2004-05-18  Paul Brook  <paul@codesourcery.com>
1898
1899         PR fortran/13930
1900         * decl.c (add_init_expr_to_sym): Remove incorrect check.
1901         (default_initializer): Move to expr.c.
1902         (variable_decl): Don't assign default initializer to variables.
1903         * expr.c (gfc_default_initializer): Move to here.
1904         * gfortran.h (gfc_default_initializer): Add prototype.
1905         * resolve.c (resolve_symbol): Check for illegal initializers.
1906         Assign default initializer.
1907
1908 2004-05-17  Steve Kargl  <kargls@comcast.net>
1909
1910         * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
1911
1912 2004-05-17  Steve Kargl  <kargls@comcast.net>
1913
1914         * arith.c (gfc_real2complex): Range checking wrong part of complex
1915         number.
1916
1917 2004-05-16  Paul Brook  <paul@codesourcery.com>
1918
1919         * options.c (gfc_handle_module_path_options): Fix buffer overrun.
1920
1921 2004-05-16  Paul Brook  <paul@codesourcery.com>
1922
1923         * arith.c (gfc_range_check): Fix logic error.
1924
1925 2004-05-16  Steve Kargl  <sgk@troutmask.apl.washington.edu>
1926
1927         * arith.c: Fix comment typos.
1928
1929 2004-05-15  Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1930
1931         PR fortran/13742
1932         * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
1933         not initialized in a disallowed fashion.
1934         * match.c (gfc_match_common): Likewise.
1935         (var_element): Verify that variable is not in the blank COMMON,
1936         if it is in a common.
1937
1938 2004-05-15  Joseph S. Myers  <jsm@polyomino.org.uk>
1939
1940         * Make-lang.in (f95.generated-manpages): Remove.
1941         (f95.srcextra): New.
1942         (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
1943         f95.maintainer-clean): Generate info and dvi files in objdir/doc.
1944         (f95.dvi): Remove.
1945         (dvi): New.
1946         (f95.install-info): Remove.
1947         (install-info): New.
1948
1949 2004-05-15  Victor Leikehman  <lei@haifasphere.co.il>
1950
1951         * decl.c (add_init_expr_to_sym): Check for variable size arrays.
1952
1953 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1954
1955         * primary.c (match_boz_constant): Use gfc_notify_std() for
1956         issuing a warning or an error.
1957
1958 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1959
1960         PR fortran/13826
1961         * primary.c (match_structure_constructor): Rename ...
1962         (gfc_match_structure_constructor): ... to this. Make non-static.
1963         (gfc_match_rvalue): Call renamed function.
1964         * match.h (gfc_match_structure_constructor): Declare.
1965         * match.c (gfc_match_data_constant): Handle structure
1966         constructor.
1967
1968 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
1969
1970         PR fortran/13702
1971         (Port from g95)
1972         * gfortran.h (gfc_linebuf): New typedef.
1973         (linebuf): Remove.
1974         (gfc_file): Revamped, use new gfc_linebuf.
1975         (locus): Revamped, use new types.
1976         (gfc_current_file): Remove.
1977         (gfc_current_form, gfc_source_file): New global variables.
1978         * match.c (gfc_match_space, gfc_match_strings): Use
1979         gfc_current_form to find source form.
1980         * module.c (gfc_dump_module): Use gfc_source_file when printing
1981         module header.
1982         * error.c (show_locus, show_loci) Use new data structures to print
1983         locus.
1984         * scanner.c (first_file, first_duplicated_file, gfc_current_file):
1985         Remove.
1986         (file_head, current_file, gfc_current_form, line_head, line_tail,
1987         gfc_current_locus1, gfc_source_file): New global variables.
1988         (gfc_scanner_init1): Set new global variables.
1989         (gfc_scanner_done1): Free new data structures.
1990         (gfc_current_locus): Return pointer to gfc_current_locus1.
1991         (gfc_set_locus): Set gfc_current_locus1.
1992         (gfc_at_eof): Set new variables.
1993         (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
1994         to new locus structure.
1995         (gfc_check_include): Remove.
1996         (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
1997         (gfc_skip_comments): Use gfc_current_form, find locus with
1998         gfc_current_locus1.
1999         (gfc_next_char): Use gfc_current_form.
2000         (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
2001         (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
2002         comment formatting.
2003         (get_file): New function.
2004         (preprocessor_line, include_line): New functions.
2005         (load_file): Move down, rewrite to match new data structures.
2006         (gfc_new_file): Rewrite to match new data structures.
2007         * parse.c (next_statement): Remove code which is now useless. Use
2008         gfc_source_form and gfc_source_file where appropriate.
2009         * trans-decl.c (gfc_get_label_decl): adapt to new data structures
2010         when determining locus of frontend code.
2011         * trans-io.c (set_error_locus): Same.
2012         * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
2013         * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
2014         preprocessor flags.
2015         (all): Add missing initializers.
2016
2017 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2018
2019         * Make-lang.in (trans-common.o): Remove redundant dependency.
2020         (data.c): Replace object file name ...
2021         (data.o): ... by the correct one.
2022
2023 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2024
2025         * dump-parse-tree.c (gfc_show_array_ref): Print colon only
2026         for ranges when dumping array references.
2027
2028 2004-05-14  Victor Leikehman  <lei@haifasphere.co.il>
2029
2030         * decl.c (variable_decl): Always apply default initializer.
2031
2032 2004-05-08  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
2033
2034         PR fortran/15206
2035         * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
2036         handle zero correctly.
2037
2038 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2039
2040         * match.c (gfc_match): Eliminate dead code.
2041
2042 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2043
2044         * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
2045         Detect bad continuation line in fixed form sources.
2046
2047 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2048
2049         PR fortran/15205
2050         * iresolve.c (gfc_resolve_nearest): Add new function.
2051         * intrinsic.h: ... declare it here.
2052         * intrinsic.c (add_functions): ... add it as resolving function
2053         for NEAREST.
2054
2055 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2056
2057         PR fortran/14066
2058         * match.c (gfc_match_do): Allow infinite loops with
2059         label-do-stmt. Do not enforce space after comma.
2060
2061 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2062
2063         PR fortran/15051
2064         * parse.c (parse_interface): Allow empty INTERFACE, remove
2065         seen_body.
2066
2067 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2068
2069         * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
2070         decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
2071         expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
2072         intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
2073         matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
2074         primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
2075         trans-array.c, trans-array.h, trans-common.c, trans-const.c,
2076         trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
2077         trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
2078         trans-types.h, trans.c, trans.h: Update copyright years and
2079         boilerplate.
2080         * data.c: Likewise, also removed two whitespace-only lines.
2081         * gfortranspec.c, lang.opt: Update copyright years.
2082
2083 2004-05-14  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
2084
2085         PR fortran/14568
2086         * trans-decl.c (generate_local_decl): Don't warn for unused
2087         variables which are in common blocks.
2088
2089 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
2090
2091         * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
2092         trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
2093         trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
2094
2095 2004-05-13  Victor Leikehman  <lei@haifasphere.co.il>
2096
2097         PR fortran/15314
2098         * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
2099
2100 2004-05-13  Joseph S. Myers  <jsm@polyomino.org.uk>
2101
2102         * gfortran.texi: Use @table @emph instead of @itemize @emph.
2103         Remove "set DEVELOPMENT".
2104         (Compiling GFORTRAN): Remove.
2105
2106 2004-05-09  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
2107
2108         * array.c (match_subscript, match_array_ref): Add comments
2109         explaining argument 'init'.
2110         * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
2111         trans-expr.c, trans.c: Fix some typos in comments.
2112         * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
2113         * primary.c (match_digits, match_integer_constant): Add comment
2114         explaining signflag.
2115
2116 2004-05-01  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
2117
2118         PR fortran/13940
2119         * primary.c: Include system.h and flags.h, needed for pedantic.
2120         (match_boz_constant): Allow "x" for hexadecimal constants, warn if
2121         pedantic is set.
2122
2123 2004-05-01  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
2124
2125         PR fortran/13940
2126         * match.c (match_data_constant): Handle case where
2127         gfc_find_symbol sets sym to NULL
2128
2129 2004-04-28  Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
2130
2131         * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
2132         dependency on mathbuiltins.def
2133
2134 2004-04-24  Victor Leikehman  <lei@il.ibm.com>
2135
2136         * trans-io.c (transfer_expr): Implemented recursive printing
2137         of derived types.
2138
2139 2004-04-24  Andrew Pinski  <pinskia@physics.uc.edu>
2140
2141         * gfortranspec.c: Do not include multilib.h.
2142
2143 2004-04-24  Tobias Schlüter  <tobias.schlueter@physik.uni-muenchen.de>
2144
2145         * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
2146         2004 to copyright years.
2147         * trans-expr.c, trans-decl.c: Comment update, we now generate
2148         GENERIC, not SIMPLE. Add 2004 to copyright years.
2149
2150 2004-04-24  Paul Brook  <paul@codesourcery.com>
2151
2152         * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
2153
2154 2004-04-24  Feng Wang  <fengwang@nudt.edu.cn>
2155
2156         PR 14817
2157         * arith.c (gfc_arith_divide): Fix complex divide.
2158
2159 2004-04-23  Andrew Pinski  <pinskia@physics.uc.edu>
2160
2161         * gfortranspec.c: Include the target headers.
2162
2163 2004-04-18  Feng Wang  <fengwang@nudt.edu.cn>
2164
2165         PR fortran/14921
2166         PR fortran/14540
2167         * arith.c (arctangent2): New function.
2168         * arith.h (arctangent2): Add function prototype.
2169         * simplify.c (gfc_simplify_atan2): Use it.
2170         (gfc_simplify_log): Use it.
2171
2172 2004-04-12  Diego Novillo  <dnovillo@redhat.com>
2173
2174         * fortran/f95-lang.c (gfc_expand_stmt): Remove.
2175         (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
2176
2177 2004-04-11  Bud Davis  <bdavis9659@comcast.net>
2178
2179         PR fortran/14872
2180         * trans-io.c (build_dt): Change REC to value.
2181
2182 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
2183
2184         PR 14394
2185         * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
2186         the real value when converting mpf to string.
2187
2188 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
2189
2190         PR 14395
2191         * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
2192         the result.
2193
2194 2004-04-11  Feng Wang  <fengwang@nudt.edu.cn>
2195
2196         PR fortran/14377
2197         * simplify.c (simplify_min_max): Convert the type of the result.
2198
2199 2004-04-11  Paul Brook  <paul@codesourcery.com>
2200
2201         * gfortran.texi: Use full target triplet.
2202
2203 2004-04-11  Paul Brook  <paul@codesourcery.com>
2204
2205         * Make-lang.in (GFORTRAN_TEXI): Set it.
2206         (fortran/dfortran.dvi): Use it.  Add fortran to include paths.
2207         (fortran/gfortran.info): Ditto.
2208         * gfortran.texi: Major update.
2209         * invoke.texi: New file.
2210
2211 2004-04-10  Paul Brook  <paul@codesourcery.com>
2212
2213         * trans-array.c (gfc_trans_allocate_temp_array,
2214         gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
2215         * trans-decl.c (gfc_build_dummy_array_decl,
2216         gfc_get_symbol_decl, gfc_build_function_decl,
2217         gfc_create_module_variable): Ditto.
2218         * trans-expr.c (gfc_conv_variable): Ditto.
2219         * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
2220         * trans.h (GFC_DECL_STRING): Remove.
2221         (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
2222         GFC_DECL_ASSIGN): Renumber flags.
2223
2224 2004-04-05  Paul Brook  <paul@codesourcery.com>
2225
2226         PR 13252
2227         PR 14081
2228         * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
2229         and stack_restore.
2230         * gfortran.h (struct gfc_charlen): Add backend_decl.
2231         * trans-array.c (gfc_trans_allocate_temp_array,
2232         gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
2233         (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
2234         Remove old, broken string handling.
2235         (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
2236         gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
2237         gfc_trans_deferred_array): Handle character arrays.
2238         * trans-const.c (gfc_conv_const_charlen): New function.
2239         * trans-const.h (gfc_conv_const_charlen): Add prototype.
2240         * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
2241         as static.
2242         (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
2243         (gfc_create_string_length): New function.
2244         (gfc_get_symbol_decl): Create lengths for character variables.
2245         (gfc_get_fake_result_decl): Ditto.
2246         (gfc_build_function_decl): Only set length for assumed length
2247         character arguments.
2248         (gfc_trans_dummy_character): New function.
2249         (gfc_trans_auto_character_variable): Rewrite.
2250         (gfc_trans_deferred_vars): Handle more types of character variable.
2251         (gfc_create_module_variable): String lengths have moved.
2252         (gfc_generate_function_code): Initialize deferred var chain earlier.
2253         * trans-expr.c (gfc_conv_init_string_length): Rename ...
2254         (gfc_trans_init_string_length):  ... to this.
2255         (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
2256         gfc_conv_function_call): Update to new format for character variables.
2257         (gfc_conv_string_length): Remove.
2258         (gfc_conv_string_parameter): Update assertion.
2259         * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
2260         * trans-io.c (set_string): Use new macro names.
2261         * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
2262         * trans-types.c (gfc_get_character_type): Use existing length expr.
2263         (gfc_is_nodesc_array): Make public.
2264         (gfc_get_dtype_cst): Rename ...
2265         (gfc_get_dtype): ... to this.  Handle unknown size arrays.
2266         (gfc_get_nodesc_array_type): Use new name.
2267         (gfc_sym_type): New character variable code.
2268         (gfc_get_derived_type): Ditto.
2269         (gfc_get_function_type): Evaluate character variable lengths.
2270         * trans-types.h (gfc_strlen_kind): Define.
2271         (gfc_is_nodesc_array): Add prototype.
2272         * trans.h: Update prototypes.
2273         (struct lang_type): Update comments.
2274         (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
2275         (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
2276
2277 2004-04-04  Paul Brook  <paul@codesourcery.com>
2278
2279         * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
2280         * options.c (gfc_init.options, gfc_handle_option): Ditto.
2281         * trans-expr.c (gfc_conv_function_call): Ditto.
2282         * trans-types.c (gfc_is_nodesc_array): Ditto
2283         * lang.opt (fg77-calls): Remove.
2284
2285 2004-04-04  Paul Brook  <paul@codesourcery.com>
2286
2287         * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
2288         (gfc_conv_descriptor_base): Rename ...
2289         (gfc_conv_descriptor_offset): ... to this.
2290         (gfc_trans_allocate_array_storage): Set offset to zero.
2291         (gfc_conv_array_base): Rename ...
2292         (gfc_conv_array_offset): ... to this.
2293         (gfc_conv_array_index_ref): Add offset parameter.
2294         (gfc_conv_array_ref): Include offset.
2295         (gfc_trans_preloop_setup): Use existing offset.
2296         (gfc_trans_allocate_temp_array,  gfc_array_allocate,
2297         gfc_trans_auto_array_allocation, gfc_trans_g77_array,
2298         gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
2299         gfc_conf_ss_descriptor): Set offset.
2300         * trans-array.h: Rename prototypes.
2301         * trans-const.h (gfc_index_zero_node): Define.
2302         * trans-decl.c (gfc_build_qualified_array): Change base to offset.
2303         * trans-types.c (gfc_get_array_type_bounds): Ditto.
2304         (gfc_get_nodesc_array_type): Calculate offset before upper bound.
2305
2306 2004-03-25  Diego Novillo  <dnovillo@redhat.com>
2307
2308         * convert.c (convert): Don't handle WITH_RECORD_EXPR.
2309
2310 2004-03-24  Bud Davis  <bdavis9659@comcast.net>
2311
2312         PR 14055
2313         * arith.c (gfc_convert_integer,gfc_convert_real):  Removed leading '+'
2314         before conversion by gmp library call.
2315
2316 2004-03-24  Bud Davis  <bdavis9659@comcast.net>
2317
2318         PR 12921
2319         * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
2320
2321 2004-02-24  Richard Henderson  <rth@redhat.com>
2322
2323         * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
2324
2325 2004-02-19  Loren J. Rittle  <ljrittle@acm.org>
2326
2327         * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
2328         (fortran/gfortran.info): ... to here.
2329         (f95.srcinfo): New.
2330
2331 2004-02-16  Richard Henderson  <rth@redhat.com>
2332
2333         * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
2334         * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
2335         (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
2336         (gfc_expand_function): Rename from expand_function_body, make static,
2337         don't do anything except invoke tree_rest_of_compilation.
2338         (gfc_be_parse_file): Invoke cgraph.
2339         (gfc_expand_decl): Remove.
2340         (gfc_init_builtin_functions): Add __builtin_init_trampoline and
2341         __builtin_adjust_trampoline.
2342         * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
2343         (gfc_finalize): New.
2344         (gfc_generate_function_code): Use it.  Lower nested functions.
2345         * trans-expr.c (gfc_conv_function_call): Add static chain operand
2346         to call_expr.
2347         * trans.c (gfc_build_function_call): Likewise.
2348         * trans.h (expand_function_body): Remove.
2349
2350 2004-02-15  Victor Leikehman  <lei@il.ibm.com>
2351
2352         PR gfortran/13433
2353         * trans-decl.c (gfc_build_function_decl) For functions
2354         returning CHARACTER pass an extra length argument,
2355         following g77 calling conventions.
2356         * trans-types.c (gfc_get_function_type) Ditto.
2357         * trans-expr.c (gfc_conv_function_call) Ditto.
2358
2359 2004-02-14  Paul Brook  <paul@codesourcery.com>
2360
2361         * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
2362
2363 2004-02-12  Paul Brook  <paul@nowt.org>
2364
2365         * BUGS: Remove.
2366
2367 2004-02-08  Steve Kargl  <sgk@troutmask.apl.washington.edu>
2368
2369         * gfortran.texi: Fix typos.
2370
2371 2004-02-07  Bud Davis  <bdavis9659@comcast.net>
2372
2373         PR gfortran/13909
2374         * intrinsic.c (add_conversions) Use logical conversion instead
2375         of real.
2376         * trans-types.c (gfc_get_logical_type) implemented logical*1
2377         and logical*2.
2378
2379 2004-01-17  Paul Brook  <paul@codesourcery.com>
2380
2381         * lang-specs.h: Remove %<fixed-form.
2382
2383 2004-01-15  Toon Moene  <toon@moene.indiv.nluug.nl>
2384
2385         * lang-specs.h: Enable preprocessing of source files
2386         ending in .F, .fpp, .FPP, .F90 and .F95.
2387
2388 2004-01-13  Toon Moene  <toon@moene.indiv.nluug.nl>
2389
2390         PR fortran/12912
2391         * lang-specs.h: Enable compilation of files ending
2392         in .f, .for and .FOR.
2393
2394 2004-01-11  Paul Brook  <paul@codesourcery.com>
2395
2396         * trans-stmt.c (gfc_trans_if_1): New function.
2397         (gfc_trans_if): Use it.
2398
2399 2004-01-11  Erik Schnetter  <schnetter@uni-tuebingen.de>
2400
2401         * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
2402         (gfc_option_t): Add max_identifier_length.
2403         * lang.opt: Add fmax-identifier-length.
2404         * match.c (parse_name): Use limit.
2405         * options.c (gfc_init_options): Set max_identifier_length.
2406         (gfc_handle_option): Ditto.
2407
2408 2004-01-11  Feng Wang  <fengwang@nudt.edu.cn>
2409
2410         * intrinsic.c (add_functions): Add resolve function to dcmplx.
2411         * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
2412         * iresolve.c (gfc_resolve_dcmplx): New function.
2413
2414 2004-01-10  Paul Brook  <paul@codesourcery.com>
2415
2416         * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
2417         * trans-types.c (gfc_sym_type): Handle external dummy procedures.
2418         (gfc_return_by_reference): Correct condition.
2419         (gfc_get_function_type): Ditto.
2420
2421 2004-01-10  Paul Brook  <paul@codesourcery.com>
2422
2423         * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
2424         types.
2425
2426 2004-01-10  Huang Chun  <chunhuang73@hotmail.com>
2427
2428         * iresolve.c: Use correct kind.
2429
2430 2004-01-10  Huang Chun  <chunhuang73@hotmail.com>
2431
2432         PR fortran/13467
2433         * trans-decl.c (gfc_create_module_variable):  Output array valued
2434         parameters.
2435
2436 2004-01-10  Paul Brook  <paul@codesourcery.com>
2437
2438         * resolve.c (resolve_branch): Get error message right way round.
2439
2440 2004-01-10  Canqun Yang <canqun@nudt.edu.cn>
2441
2442         * trans-array (gfc_conv_loop_setup): Adjust comment to track
2443         reality.
2444         (gfc_array_allocate): Don't count size of element twice.
2445
2446 2004-01-04  Paul Brook  <paul@codesourcery.com>
2447
2448         * lang.opt (i8, r8, std=*): Remove RejectNegative.
2449
2450 2004-01-04  Paul Brook  <paul@codesourcery.com>
2451
2452         * error.c (gfc_notify_std): New function.
2453         * gfortran.h (gfc_notify_std): Declare.
2454         (GFC_STD_*): Define.
2455         (gfc_option_t): Add warn_std and allow_std.
2456         * intrinsic.c (gfc_init_expr_extensions): Fix logic.
2457         (gfc_intrinsic_func_interface): Use gfc_notify_std.
2458         * check.c (check_rest): Use gfc_notify_std.
2459         * match.c (gfc_match_pause): Ditto.
2460         (gfc_match_assign): Ditto.
2461         (gfc_match_goto): Ditto.
2462         * resolve.c (resolve_branch): Ditto.
2463         * lang.opt: Add std=<foo> and w.
2464         * options.c (gfc_init_options): Set allow_std and warn_std.
2465         (gfc_handle_option): Handle OPT_std_* and OPT_w.
2466
2467 2004-01-01  Paul Brook  <paul@codesourcery.com>
2468
2469         * array.c (gfc_append_constructor): Take constructor, not expression.
2470         * data.c (struct gfc_expr_stack): Remove.
2471         (expr_stack): Remove.
2472         (find_con_by_offset): Rename from find_expr_in_con.
2473         (find_con_by_component): Rename from find_component_in_con.
2474         (gfc_get_expr_stack): Remove.
2475         (gfc_assign_data_value): Rewrite.
2476         (gfc_expr_push): Remove.
2477         (gfc_expr_pop): Remove.
2478         (gfc_advance_section): Rename from
2479         gfc_modify_index_and_calculate_offset.  Handle unbounded sections.
2480         (gfc_get_section_index): Handle unbounded sections.
2481         * gfortran.h: Update prototypes.
2482         * resolve.c (check_data_variable): Array section maight not be the
2483         last ref.
2484
2485 2004-01-01  Paul Brook  <paul@codesourcery.com>
2486
2487         PR fortran/13432
2488         * resolve.c (resolve_symbol): Allow assumed length function results.
2489
2490 2004-01-01  Steve Kargl  <sgk@troutmask.apl.washington.edu>
2491
2492         * match.c (gfc_match_pause): Fix spelling.
2493
2494 2004-01-01  Steven Bosscher  <stevenb@suse.de>
2495
2496         PR fortran/13251
2497         * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
2498         reference from the expression.
2499
2500 2003-12-26  Feng Wang  <fengwang@nudt.edu.cn>
2501
2502         * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
2503         dumping.
2504         * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
2505         (gfc_exec_op): New EXEC_LABEL_ASSIGN.
2506         (symbol_attribute):New variable attribute: assign.
2507         * io.c (resolve_tag):Integer variable is allowed.
2508         (match_dt_format): Add ASSIGN statement. Set assign flag.
2509         * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
2510         (gfc_match_assign): Add ASSIGN statement. Set assign flag.
2511         (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
2512         * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
2513         (next_statement): Add ST_LABEL_ASSIGNMENT.
2514         (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
2515         * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
2516         (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
2517         * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
2518         * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
2519         assign.  Put them into the stuct lang_decl.
2520         * trans-io.c (set_string): Add the assign statement.
2521         * trans-stmt.c (gfc_trans_label_assign): New function.
2522         (gfc_trans_goto): Translate ASSIGNED GOTO statement.
2523         * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
2524         * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
2525         * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
2526         (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
2527         (GFC_DECL_ASSIGN(node)): New macro to access flag.
2528
2529 2003-12-31  Huang Chun <chunhuang73@hotmail.com>
2530
2531         PR fortran/13434
2532         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
2533         minval/maxval.
2534
2535 2003-12-22  Toon Moene  <toon@moene.indiv.nluug.nl>
2536
2537         * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
2538         that arguments to subroutines/functions can't alias themselves, nor global
2539         memory.
2540
2541 2003-12-20  Steven Bosscher  <stevenb@suse.de>
2542
2543         * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
2544         * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
2545
2546 2003-12-12  Huang Chun <chunhuang73@hotmail.com>
2547
2548         * primary.c (match_substring): Fix substring bug for start point
2549         or end point is NULL.
2550         * trans-expr.c (gfc_conv_substring): Ditto
2551         * trans-types.c (gfc_sym_type): Get correct type of scalar
2552         character variables.
2553         * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
2554         derived type.
2555
2556 2003-12-10  Richard Henderson  <rth@redhat.com>
2557
2558         * options.c (gfc_post_options): Don't ever use rtl inlining.
2559
2560 2003-12-05  Canqun Yang  <canqun@nudt.edu.cn>
2561
2562         * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
2563         * trans-equivalence.c: Remove.
2564         * trans-decl.c (gfc_get_symbol_decl): Update to match.
2565         (gfc_generate_function_code): Ditto.
2566         * trans-array.c (gfc_conv_array_parameter): Ditto.
2567         * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
2568         (F95_ADDITIONAL_OBJS): Add stor-layout.o
2569         * trans.h (gfc_trans_equivalence): Remove.
2570         * gfortran.h (struct gfc_equiv): Add used field.
2571         (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
2572         equiv_offset fields.
2573
2574 2003-12-05  Richard Henderson  <rth@redhat.com>
2575
2576         * trans.c (gfc_build_addr_expr): New.
2577         (gfc_build_indirect_ref, gfc_build_array_ref): New.
2578         * trans.h: Declare them.
2579         * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
2580         trans-stmt.c, trans.c (*): Use them.
2581
2582         * f95-lang.c (gfc_post_options): Remove dead prototype.
2583         * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
2584         * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
2585         allocation size.
2586
2587 2003-12-01  Feng Wang  <fengwang@nudt.edu.cn>
2588
2589         * io.c (gfc_match_format): Check for missing format label.
2590
2591 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
2592
2593         PR fortran/13155
2594         * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
2595         from interfaces in modules.
2596
2597 2003-11-30  Paul Brook  <paul@nowt.org>
2598
2599         * trans-array.c (gfc_trans_g77_array): Make non-static.
2600         (gfc_trans_assumed_size): Remove.
2601         (gfc_trans_dummy_array_bias): Explicitly free temporary.
2602         * trans-array.h (gfc_trans_g77_array): Add prototype.
2603         (gfc_trans_assumed_size): Remove.
2604         * trans-decls.c (gfor_fndecl_push_context): Remove.
2605         (gfor_fndecl_pop_context): Remove.
2606         (gfc_build_function)decls): Don't create them.
2607         (gfc_trans_deferred_vars): Update to match. Remove dead code.
2608         * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
2609
2610 2003-11-30  Kejia Zhao  <kejia_zh@nudt.edu.cn>
2611
2612         * trans-array.c (gfc_conv_array_parameter): Simplify
2613         array argument passing for array name actual argument.
2614         * trans-expr.c (gfc_conv_function_call): Ditto
2615         * trans-types.c (gfc_is_nodesc_array):Ditto.
2616
2617 2003-11-30  Paul Brook  <paul@nowt.org>
2618
2619         * f95-lang.c (gfc_post_options): Move ...
2620         * options.c (gfc_post_options): .. to here.  Handle inlining options.
2621         * gfortran.h (gfc_post_options): Add prototype.
2622
2623 2003-11-28  Richard Henderson  <rth@redhat.com>
2624
2625         * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
2626
2627 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
2628
2629         * trans.h (has_alternate_specifier): New global variable.
2630         * match.c (gfc_match_call): Handle actual arguments associated with
2631         alternate return indicators.
2632         * trans-expr.c (gfc_conv_function_call): Ditto
2633         * trans-stmt.c (gfc_trans_call): Ditto
2634         (gfc_trans_return): Handle return statement with value.
2635         * trans-decl.c (gfc_generate_function_code): Handle functions with
2636         asterisk dummy.
2637         (gfc_get_fake_result_decl): Ditto
2638         * trans-types.c (gfc_get_function_type): Ditto
2639         * resolve.c (resolve_actual_arglist): Check alternate return indicators.
2640         (resolve_formal_arglist): Check asterisk dummy.
2641
2642 2003-11-27  Paul Brook  <paul@nowt.org>
2643
2644         * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
2645         allocation interface.
2646         (gfc_conv_ array_parameter): Ditto.
2647         (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
2648         * trans-array.c: Update prototype.
2649         * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
2650         (gfc_trans_auto_character_variable): Use new memory alloc interface.
2651         * trans-expr.c (gfc_conv_string_tmp): Ditto.
2652         (gfc_conv_function_call): Use gfc_conv_string_tmp.
2653         * trans-stmt.c (gfc_do_allocate):  Use new memory alloc interface.
2654         * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
2655         * trans.h (gfc_ss_info): Remove unused pdata field.
2656         * trans.c (gfc_create_var_np): Change T to V.
2657
2658 2003-11-26  Richard Henderson  <rth@redhat.com>
2659
2660         * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
2661         * trans-intrinsic.c (gfc_intrinsic_map): ... here.  Add SCALE,
2662         FRACTION, NEAREST, SET_EXPONENT.
2663         (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
2664         Fix GTY marking.  Remove unnecessary const's.
2665         (LIBM_FUNCTION): Rename from I_LIB.
2666         (LIBF_FUNCTION): New.
2667         (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
2668         conventions.  Assume the expr signature is correct.  Mark const.
2669         (gfc_conv_intrinsic_exponent): Use library functions.
2670         (gfc_conv_intrinsic_set_exponent): Remove.
2671         (gfc_conv_intrinsic_scale): Remove.
2672         (gfc_conv_intrinsic_nearest): Remove.
2673         (gfc_conv_intrinsic_fraction): Remove.
2674         (gfc_conv_intrinsic_function): Update.
2675         * trans-decl.c (gfor_fndecl_math_exponent4): New.
2676         (gfor_fndecl_math_exponent8): New.
2677         (gfc_build_intrinsic_function_decls): Set them.
2678         * trans.h: Declare them.
2679
2680 2003-11-25  Canqun Yang  <canqun@nudt.edu.cn>
2681
2682         * trans-common.c (gfc_layout_global_equiv): Locate the error for
2683         underflow COMMON block.
2684         (gfc_trans_one_common): Fix bug for size of COMMON block containing
2685         EQUIVALENCE object. Also fix typo in an error message.
2686
2687 2003-11-25  Diego Novillo  <dnovillo@redhat.com>
2688
2689         * Make-lang.in: Add check-gfortran to lang_checks.
2690         (check-f95): Alias for check-gfortran.
2691
2692 2003-11-25  Jason Merrill  <jason@redhat.com>
2693
2694         * Make-lang.in (f95.tags): Create TAGS.sub files in each
2695         directory and TAGS files that include them for each front end.
2696
2697 2003-11-24  Paul Brook  <paul@nowt.org>
2698
2699         PR fortran/13154
2700         * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
2701
2702 2003-11-24  Paul Brook  <paul@nowt.org>
2703
2704         * expr.c (simplify_const_ref): Return SUCCESS for things we don't
2705         handle.
2706         * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
2707
2708 2003-11-24  Paul Brook  <paul@nowt.org>
2709
2710         PR fortran/13105
2711         * array.c (gfc_array_ref_shape): Handle elemental dimensions.
2712         * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
2713
2714 2003-11-20  Richard Henderson  <rth@redhat.com>
2715
2716         * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
2717         (gfc_conv_array_base): Likewise.
2718         * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
2719         * trans-expr.c (gfc_conv_string_tmp): Likewise.
2720         * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
2721         * trans-stmt.c (gfc_trans_character_select): Likewise.
2722
2723 2003-11-13  Paul Brook  <paul@nowt.org>
2724
2725         * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
2726
2727 2003-11-13  Canqun Yang  <canqun@nudt.edu.cn>
2728
2729         * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
2730         (resolve_equivalence): New function.
2731         (resolve_equivalence_derived): New function.
2732
2733 2003-11-12  Richard Henderson  <rth@redhat.com>
2734
2735         * trans.c (gfc_trans_code): Use annotate_with_locus instead of
2736         annotate_all_with_locus.
2737
2738 2003-11-11  Canqun Yang  <canqun@nudt.edu.cn>
2739
2740         * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
2741         * trans-decl.c (gfc_finish_var_decl): Modified.
2742
2743 2003-11-08  Paul Brook  <paul@nowt.org>
2744
2745         PR fortran/12704
2746         * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
2747         arrays.
2748
2749 2003-11-06  Paul Brook  <paul@nowt.org>
2750
2751         * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
2752
2753 2003-11-02  Canqun Yang  <canqun@nudt.edu.cn>
2754
2755         * match.c (gfc_match_stopcode): Assign '0' to stop_code.
2756
2757 2003-10-27  Anthony Green  <green@redhat.com>
2758
2759         * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
2760         (f95.stagefeedback): Ditto.
2761
2762 2003-10-27  Andrew Pinski  <pinskia@physics.uc.edu>
2763
2764         PR fortran/12682
2765         * Make-lang.in (f95.stageprofile): Add.
2766         (f95.stagefeedback): Add.
2767
2768 2003-10-23  Richard Henderson  <rth@redhat.com>
2769
2770         * f96-lang.c (gfc_gimplify_expr): Remove.
2771         (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
2772         (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
2773
2774 2003-10-23  Richard Henderson  <rth@redhat.com>
2775
2776         * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
2777
2778 2003-10-20  Paul Brook  <paul@nowt.org>
2779
2780         * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
2781         * trans-stmt.c (gfc_trans_do_while): Ditto.
2782
2783 2003-10-17  Paul Brook  <paul@nowt.org>
2784
2785         * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
2786
2787 2003-10-17  Paul Brook  <paul@nowt.org>
2788
2789         * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
2790
2791 2003-10-17  Feng Wang  <wf_cs@yahoo.com>
2792
2793         * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
2794         (gfc_resolve_minloc): Ditto.
2795         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
2796         Return the value after subtracting the lower bound.
2797
2798 2003-10-16  Richard Henderson  <rth@redhat.com>
2799
2800         * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
2801
2802 2003-10-16  Steven Bosscher  <steven@gcc.gnu.org>
2803
2804         * lang.c: Remove -M option for now, it's in the way for C.
2805
2806 2003-10-14  Jason Merrill  <jason@redhat.com>
2807
2808         * Make-lang.in (f95.tags): New rule.
2809
2810 2003-10-13  Richard Henderson  <rth@redhat.com>
2811
2812         * trans.c (gfc_trans_code): Use annotate_all_with_locus.
2813
2814 2003-10-13  Paul Brook  <paul@nowt.org>
2815
2816         * trans-decl.c (generate_local_decl): Don't create junk variables.
2817
2818 2003-10-13  Paul Brook  <paul@nowt.org>
2819
2820         * resolve.c (resolve_formal_arglist): Use function result decl in
2821         preference to function decl.
2822
2823 2003-10-12  Richard Henderson  <rth@redhat.com>
2824
2825         * f95-lang.c (gfc_define_builtin): New const_p argument.  Set
2826         TREE_READONLY.  Update all callers.
2827
2828 2003-10-12  Feng Wang  <wf_cs@yahoo.com>
2829
2830         * iresolve.c (gfc_resolve_cshift): Change to match implementation.
2831         * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
2832         (gfc_is_intrinsic_libcall): Add CSHIFT.
2833
2834 2003-10-12  Richard Henderson  <rth@redhat.com>
2835
2836         * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
2837         (gfc_trans_array_constructor_value): Likewise.
2838         (gfc_conv_array_initializer): Likewise.
2839         * trans-stmt.c (gfc_trans_character_select): Likewise.
2840
2841 2003-11-12  Kejia Zhao  <kejia_zh@yahoo.com.cn>
2842
2843         * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
2844
2845 2003-10-11  Huang Chun  <jiwang@mail.edu.cn>
2846
2847         * check.c (gfc_check_repeat): Check arguments are scalar.
2848         (gfc_check_trim): New function.
2849         * intrinsic.h (gfc_check_trim): Add prototype.
2850         * intrinsic.c (add_functions): Use it.
2851         * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
2852         Decalare.
2853         * trans-decl.c: Ditto.
2854         (gfc_build_intrinsic_fucntion_decls): Set them.
2855         * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
2856         (gfc_conv_intrinsic_trim): New function.
2857         (gfc_conv_intrinsic_repeat): New function.
2858         (gfc_conv_intrinsic_function): Use them.
2859
2860 2003-10-11  Huang Chun  <jiwang@mail.edu.cn>
2861
2862         * trans-types.c (gfc_sym_type): Handle result variables.
2863
2864 2003-10-11  Huang Chun  <jiwang@mail.edu.cn>
2865
2866         * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
2867         gfc_get_character_type.
2868
2869 2003-10-11  Feng Wang  <wf_cs@yahoo.com>
2870
2871         * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
2872
2873 2003-10-11  Paul Brook  <paul@nowt.org>
2874
2875         * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
2876         (gfc_resolve_dprod): New function.
2877         (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
2878         * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
2879         (gfc_resolve_dprod): Declare.
2880         * intrinsic.c (add_functions): Use them.
2881         * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
2882
2883 2003-10-06  Richard Henderson  <rth@redhat.com>
2884
2885         * f95-lang.c (gfc_init_builtin_functions): Add clzll.
2886         * trans-intrinsic.c (call_builtin_clz): Use it.
2887
2888 2003-10-05  Paul Brook  <paul@nowt.org>
2889
2890         * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
2891         * trans-decl.c (gfc_generate_function_code): Set
2892         cfun->function_end_locus.
2893
2894 2003-09-24  Jason Merrill  <jason@redhat.com>
2895
2896         * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
2897         TREE_LOCUS.
2898
2899 2003-09-21  Lifang Zeng  <zlf605@hotmail.com>
2900         Paul Brook  <paul@nowt.org>
2901
2902         * Make-lang.in (F95_OBJS): Add fortran/data.o.
2903         * array.c (gfc_inser_constructor): New function.
2904         (gfc_get_constructor): New function.
2905         (gfc_free_constructor): Initialize offset and repeat.
2906         (iterator_stack): Remove.
2907         (expand_info): Add offset, component and repeat fields.
2908         (expand_constructor): Set them.
2909         (expand): Set new fields.
2910         (gfc_copy_constructor): Ditto. Avoid recursion.
2911         * gfortran.h: Add prototypes for new functions.
2912         (gfc_constructor): Add offset, component and repeat.
2913         (iteratio_stack): Move to here.
2914         * resolve.c (check_data_variable): Convert data values into variable
2915         initializers.
2916         (traverse_data_list): Build implicit loop chain.
2917         (gfc_resolve): Ditto.
2918         * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
2919         * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
2920         * trans-expr.c (gfc_conv_structure): Handle array initializers.
2921         (gfc_conv_expr): Update to match.
2922         * trans.h (gfc_conv_structure): Declare.
2923         * data.c: New file.
2924
2925 2003-09-20  Kejia Zhao  <kejia_zh@yahoo.com.cn>
2926
2927         * trans.h: Add declarations for gfor_fndecl_si_kind and
2928         gfor_fndecl_sr_kind.
2929         * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
2930         * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
2931         (g95_conv_intrinsic_sr_kind): New function.
2932         (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
2933         SELECTED_REAL_KIND.
2934
2935 2003-09-17  Lars Segerlund  <Lars.Segerlund@comsys.se>
2936
2937         * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
2938         instead of _4 and _8 as postfix for libgfortran calls.
2939
2940 2003-09-16  Paul Brook  <paul@nowt.org>
2941
2942         * array.c (compare_bounds): New function.
2943         (gfc_compare_array_spec): Use it.
2944
2945 2003-09-14  Paul Brook  <paul@nowt.org>
2946
2947         * primary.c (gfc_match_rvalue): Make sure sym->result is set.
2948         * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
2949
2950 2003-09-14  Paul Brook  <paul@nowt.org>
2951
2952         * check.c (dim_rank_check): Allow assumed bounds if requested.
2953         (gfc_check_lbound): Call it.
2954         (gfc_check_ubound): Ditto.
2955         (gfc_check_size): Change to match.
2956         * simplify.c (gfc_simplify_bound): New function.
2957         (gfc_simplify_lbound): New function.
2958         (gfc_simplify_ubound): New function.
2959         * intrinsic.h: Declare them.
2960         * intrinsic.c (add_functions): Use them.
2961
2962 2003-09-14  Paul Brook  <paul@nowt.org>
2963
2964         * io.c (format_lex): Initialize negative_flag.
2965         (check_format): Intialize repeat.
2966         * trans-io.c (gfc_new_nml_name_expr): Declare static.
2967         (gfc_new_var_expr): Ditto.
2968
2969 2003-09-14  Paul Brook  <paul@nowt.org>
2970
2971         * trans-array.c (gfc_conv_array_initializer): Handle derived types.
2972         * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
2973
2974 2003-09-12  Paul Brook  <paul@nowt.org>
2975
2976         * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
2977
2978 2003-09-12  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
2979
2980         * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
2981         for a correct expression.
2982
2983 2003-09-10  Kejia Zhao  <kejia_zh@yahoo.com.cn>
2984
2985         * trans-intrinsic.c (real_compnt_info): New struct.
2986         (prepare_arg_info): New function.
2987         (gfc_conv_intrinsic_set_exponent): New function.
2988         (gfc_conv_intrinsic_scale): New function.
2989         (gfc_conv_intrinsic_nearest): New function.
2990         (gfc_conv_intrinsic_fraction): New function.
2991         (gfc_conv_intrinsic_exponent): New function.
2992         (gfc_conv_intrinsic_spacing): New function.
2993         (gfc_conv_intrinsic_rrspacing): New function.
2994         (gfc_conv_intrinsic_function): Use them.
2995
2996 2003-08-24 XiaoQiang Zhang  (zhangapache@yahoo.com>
2997
2998         * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
2999         build_int_2 changed from (high, low) to (low, high).
3000         * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
3001         ioparm_namelist_read_mode, iocall_set_nml_val_int,
3002         iocall_set_nml_val_float, iocall_set_nml_val_char,
3003         iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
3004         (gfc_build_io_library_fndecls): Add variable initialization.
3005         (gfc_new_nml_name_expr, get_new_var_expr): New function.
3006         (build_dt): Add namelist support.
3007         * io.c (value): New variable.
3008         (check_format): Support FMT_H now.
3009
3010 2003-09-07  Paul Brook  <paul@nowt.org>
3011
3012         * io.c (gfc_resolve_dt): Error if format label is not defined.
3013
3014 2003-09-07  Kejia Zhao  <kejia_zh@yahoo.com.cn>
3015
3016         * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
3017         about case_switch's break. The other is about building the condition
3018         statement tree, which judges the argument in the range of the
3019         corresponding integer type.
3020         * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
3021         for the large values.
3022
3023 2003-09-05  Paul Brook  <paul@nowt.org>
3024
3025         * f95-lang.c (expand_function_body): Gimplify the function.
3026
3027 2003-09-04  Jeff Law  <law@redhat.com>
3028
3029         * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
3030         index zero!
3031
3032 2003-09-04  Paul Brook  <paul@nowt.org>
3033
3034         * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
3035         (gfc_expand_stmt): New function.
3036         (LANG_HOOKS_RTL_EXPAND_STMT): Define.
3037         (expand_function_body): Use tree_rest_of_compilation.
3038         * trans-decl.c (gfc_generate_function_code): Don't free cfun.
3039
3040 2003-09-03  Jeff Law  <law@redhat.com>
3041
3042         * f95-lang.c (gfc_init_builtin_functions): C arrays start at
3043         index zero!
3044
3045 2003-08-30  Paul Brook  <paul@nowt.org>
3046
3047         * f95-lang.c (builtin_function): Remove #if 0 code.
3048         (gfc_define_builtin): New function.
3049         (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
3050         * mathbuiltins.def: New file.
3051         * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
3052         (gfc_intrinsic_map): Use mathbuiltins.def.
3053         (gfc_intrinsic_builtin_t): Remove.
3054         (gfc_build_intrinsic_lib_fndecls): Update.
3055         * trans-types.c (gfc_init_types): Remove redundant initilaization of
3056         signed_size_type_node.
3057
3058 2003-08-29  Paul Brook  <paul@nowt.org>
3059
3060         * arith.c (gfc_real_kinds): Use correct minimum exponents.
3061
3062 2003-08-22  Kejia Zhao  <kejia_zh@yahoo.com.cn>
3063
3064         * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
3065         (gfc_conv_intrinsic_function): Add MODULO.
3066
3067 2003-08-22  Jason Merrill  <jason@redhat.com>
3068
3069         * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
3070
3071 2003-08-22  Andreas Jaeger  <aj@suse.de>
3072
3073         * Make-lang.in (f95.install-common): Add DESTDIR support.
3074         * (f95.install-info): Likewise.
3075         (f95.uninstall): Likewise.
3076
3077 2003-08-19  Diego Novillo  <dnovillo@redhat.com>
3078
3079         * trans-types.c (gfc_init_types): Initialize
3080         signed_size_type_node with size_type_node.
3081
3082 2003-08-18  Paul Brook  <paul@nowt.org>
3083
3084         * dependency.c (gfc_dependency): New enum.
3085         (check_another_array_ref): Remove.
3086         (gfc_get_array_from_component): Remove.
3087         (get_x): Remove.
3088         (get_range): Remove.
3089         (get_no_of_elements): Use mpz_t, not mpf_t.
3090         (transform_sections): New function.
3091         (gfc_check_range_range): Rename ...
3092         (gfc_check_section_vs_section): ... to this.  Use new function.
3093         (gfc_is_inside_range): Rewrite to match.
3094         (gfc_check_element_vs_section): Ditto.
3095         (gfc_check_element_vs_element): Ditto.
3096         (get_deps): Ditto.
3097         (gfc_dep_resolver): Ditto.  Remove unused parameter.
3098         * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
3099         gfc_check_element_vs_element, gfc_is_inside_range,
3100         gfc_get_array_from_component): Remove prototypes for static functions.
3101         (gfc_dep_resolver): Update prototype.
3102         * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
3103
3104 2003-08-15  Paul Brook  <paul@nowt.org>
3105
3106         * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
3107         return values to parent scope.
3108         (gfc_build_dummy_array_decl): Ditto.
3109
3110 2003-08-14  Paul Brook  <paul@nowt.org>
3111
3112         * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
3113         size of the type, not the pointer.
3114         * resolve.c (resolve_symbol): Give more accurate error message.
3115
3116 2003-08-10  Paul Brook  <paul@nowt.org>
3117
3118         * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
3119
3120 2003-08-10  Paul Brook  <paul@nowt.org>
3121
3122         * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
3123         type components.
3124
3125 2003-08-10  Chun Huang  <compiler@sohu.com>
3126
3127         * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
3128         (resolve_symbol): Ditto.
3129         * trans-expr.c (gfc_conv_statement_function): New function.
3130         (gfc_conv_function_expr): Use it.
3131
3132 2003-08-10  Paul Brook  <paul@nowt.org>
3133
3134         * trans-array.c (gfc_conv_ss_startstride): Handle functions.
3135         (walk_function_expr): Set section rank.
3136         * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
3137
3138 2003-08-10  Paul Brook  <paul@nowt.org>
3139
3140         * intrinsic.c (add_sym): Prefix names with correct string.
3141         (add_sym_0s): New function.
3142         (add_subroutines): Register abort.
3143
3144 2003-08-10  Erik Schnetter  <schnetter@uni-tuebingen.de>
3145
3146         * gfortran.h: Introduce options to control the mangling.
3147         * lang.opt: Likewise.
3148         * options.c (gfc_init_options): Handle the options.
3149         * trans-common.c (gfc_sym_mangled_common_id): New function.
3150         (gfc_build_common_decl): Call it.
3151         * trans-decl.c (gfc_sym_mangled_function_id): New function.
3152         (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
3153
3154 2003-08-09  Paul Brook  <paul@nowt.org>
3155
3156         * module.c (mio_symbol): Always ouput a namespace for formal args.
3157         (load_needed): Namespace now belong to their proper symbol.
3158         (gfc_dump_module): Change G95=>GFORTRAN.
3159
3160 2003-08-05  Paul Brook  <paul@nowt.org>
3161
3162         * options.c: Force -fg77-calls.
3163
3164 2003-08-02  Paul Brook  <paul@nowt.org>
3165
3166         * Makelang.in: Rename G95_* to GFORTRAN_*.
3167         * All sources: Rename G95_* to GFC_*.
3168
3169 2003-08-01  Paul Brook  <paul@nowt.org>
3170
3171         * fortran/Make-lang.in: Use GMPLIBS.
3172         * fortran/config-lang.in: Set need_gmp.
3173         * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
3174
3175 2003-07-27  Andreas Jaeger  <aj@suse.de>
3176
3177         * trans-decl.c (gfc_generate_constructors): Convert prototype to
3178         ISO C90.
3179         * trans-const.c (gfc_init_constants): Likewise.
3180         * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
3181
3182         * gfortranspec.c: Convert to ISO C90.
3183         (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
3184
3185 2003-07-26  Paul Brook  <paul@nowt.org>
3186
3187         * lang.opt: Add -fdump-parse-tree.
3188         * options.c (gfc_handle_option): Ditto.
3189         * resolve.c (resolve_forall_iterators): Convert to proper type.
3190         * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
3191
3192 2003-07-26  Paul Brook  <paul@nowt.org>
3193
3194         * Makefile.in: Add build dependencies on files common with rest of gcc.
3195
3196 2003-07-26  Lifang Zeng  <zlf605@hotmail.com>
3197
3198         * trans.h: Declare g95_trans_pointer_assignment.
3199         * trans-expr.c (g95_trans_pointer_assignment): New function.
3200         (g95_trans_pointer_assign): Use it.
3201         * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
3202         (g95_trans_pointer_assign_need_temp): New function.
3203
3204 2003-07-26  Paul Brook  <paul@nowt.org>
3205
3206         * gfortran.texi: Replace references to g95.
3207
3208 2003-07-26  Paul Brook  <paul@nowt.org>
3209
3210         Rename g95_* to gfc_*.
3211
3212 2003-07-25  Paul Brook  <paul@nowt.org>
3213
3214         * gfortran.h: Rename from g95.h.
3215         * trans-types.c (boolean_type_node, booelan_true_node,
3216         boolean_false_node): Remove.
3217         * trans-types.h: Ditto.
3218
3219 2003-07-25  Chun Huang  <compiler@sohu.com>
3220
3221         * parse.c (accept_statement): Implement BLOCK DATA statement.
3222         * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
3223         variables.
3224
3225 2003-07-24  Lifang Zeng  <zlf605@hotmail.com>
3226
3227         * trans-stmt.c (temporary_list): Define.
3228         (g95_trans_assign_need_temp): New function.
3229         (g95_trans_forall_1): Modified for WHERE.
3230         (g95_trans_where_assign): Modified.
3231         (g95_trans_where_2): Modified.
3232         (g95_evaluate_where_mask): Modified.
3233         (g95_trans_where): Modified.
3234         (g95_get_temp_expr): Removed.
3235         (g95_add_to_where_stmt_list): Removed.
3236         (compute_overall_iter_number): Modified for WHERE.
3237         * trans.h: Remove where_stmt_list.
3238
3239 2003-07-24  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
3240
3241         * lang.opt: Correct description of options -J and -M.
3242
3243 2003-07-23  Steven Bosscher   <steven@gcc.gnu.org>
3244
3245         * lang.opt: Move help text to here.
3246         * lang-options.h: Remove.
3247
3248 2003-07-23  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
3249         * iresolve.c (g95_resolve_transpose): Proper variable in switch.
3250         * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
3251         on kind.
3252
3253 2003-07-22  Steven Bosscher  <steven@gcc.gnu.org>
3254         Paul Brook  <paul@nowt.org>
3255
3256         * check.c (check_rest): Use global pedantic flag.
3257         * io.c (data_desc): Ditto.
3258         * error.c (g95_warning, g95_warning_now): Use global flag.
3259         * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
3260         (expand_function_body): Update to new prototypes.
3261         (g95_init): Use new option names.
3262         * g95.h (g95_option_t): Standardize names.
3263         (g95_init_options, g95_handle_option): Update prototypes.
3264         * interface.c: Use new option names.
3265         * match.c: Ditto.
3266         * module.c: Ditto.
3267         * parse.c: Ditto.
3268         * primary.c: Ditto.
3269         * resolve.c: Ditto.
3270         * scanner.c: Ditto.
3271         * simplify.c: Ditto.
3272         * symbol.c: Ditto.
3273         * trans-array.c: Ditto.
3274         * trans-expr.c: Ditto.
3275         * trans-types.c: Ditto.
3276         * trans-decl.c: Ditto.
3277         (g95_build_library_function_decl): Remove obsolete VPARAMS.
3278         * trans.h: Ditto.
3279         * options.c (g95_display_help): Remove.
3280         (g95_init_options): Convert to new scheme.
3281         (set_Wall): Ditto
3282         (g95module_option): Ditto, rename from g95_parse_arg.
3283         (g95_handle_module_path_options): New function.
3284         * trans-equivalence.c: Fix error message.
3285         * lang.opt: Corrections.
3286
3287 2003-07-21  Steven Bosscher  <steven@gcc.gnu.org>
3288
3289         * lang.opt: New file.
3290
3291 2003-07-21  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
3292
3293         * decl.c (match_attr_spec): Set colon_seen.
3294
3295 2003-07-14  Paul Brook  <paul@nowt.org>
3296
3297         * trans-array.c: Update comment.
3298         (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
3299         * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
3300         minmaxloc,minmaxval): Ditto.
3301         * trans-io.c (g95_trans_transfer): Ditto.
3302         * trans-stmt.c: Remove unneeded prototypes.
3303         (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
3304         (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
3305         (compute_inner_temp_size): Remove bits of dead code. Add comments.
3306         Don't share loopinfo.
3307         (compute_overall_iter_number): Declare as static.
3308         (allocate_temp_for_forall_nest): Ditto.
3309         (g95_trans_forall_1): Don't pass shared loopinfo.
3310         * trans.c (g95_start_block): Expand comment.
3311
3312 2003-07-12  Paul Brook  <paul@nowt.org>
3313
3314         * arith.c (g95_index_integer_kind): Remove unused initializer.
3315         * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
3316         index by size of element.
3317         (generate_loop_for_rhs_to_temp): Ditto.
3318         (allocate_temp_for_forall_nest): Use element size, not index size.
3319
3320 2003-07-11  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
3321
3322         * arith.c (g95_index_integer_kind): Add a TODO.
3323         * simplify.c (g95_simplify_nearest): Add a TODO.
3324
3325 2003-07-09  Chun Huang  <compiler@sohu.com>
3326
3327         * trans.h: Add declarations for gfor_fndecl_string_scan and
3328         gfor_fndecl_string_verify.
3329         * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
3330         * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
3331         (g95_conv_intrinsic_verify): New function.
3332         (g95_conv_intrinsic_function): Add SCAN and VERIFY.
3333         * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
3334         of parameter 'BACK=.TRUE.'
3335
3336 2003-07-05  Lifang Zeng  <zlf605@hotmail.com>
3337
3338         * trans-stmt.c (iter_info, forall_info): Define.
3339         (g95_trans_forall_block): Remove.
3340         (g95_trans_forall_loop): Use forall info blocks.
3341         (g95_trans_nested_forall_loop): New function.
3342         (g95_do_allocate): Handle things other than logical masks.
3343         (generate_loop_for_temp_to_lhs): New function.
3344         (generate_loop_for_rsh_to_temp): New function.
3345         (compute_inner_temp_size): New function.
3346         (compute_overall_iter_number): New function.
3347         (allocate_temp_for_forall_nest): New function.
3348         (g95_trans_forall): Move body ...
3349         (g95_trans_forall_1): ... to here.  Handle loops with temporaries.
3350
3351 2003-07-02  Paul Brook  <paul@nowt.org>
3352
3353         * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
3354         in correct scope.  Change callers to match.
3355         * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
3356         * iresolve.c (g95_resolve_reshape): Only use constant shapes.
3357
3358 2003-07-02  Paul Brook  <paul@nowt.org>
3359
3360         * trans-array.c (g95_conv_loop_setup): Remove dead var.  Use
3361         expression shape for all expressions.
3362         * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
3363
3364 2003-07-03  Arnaud Desitter  <arnaud.desitter@geography.oxford.ac.uk>
3365
3366         * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
3367         g95_parse_arg), intrinsic.c (g95_convert_type): support of
3368         -Wconversion.
3369         * intrinsic.c, g95.h: Add g95_convert_type_warn,
3370         * resolve.c (g95_resolve_index): Call it.
3371
3372 2003-07-02  Paul Brook  <paul@nowt.org>
3373
3374   &n