OSDN Git Service

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