OSDN Git Service

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