OSDN Git Service

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