OSDN Git Service

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