OSDN Git Service

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