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