1 2004-08-17 Paul Brook <paul@codesourcery.com>
2 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
5 * decl.c (get_proc_name): Update mystery comment.
6 (gfc_match_entry): Check for errors earlier. Add entry point to list.
7 * dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes.
8 * gfortran.h (symbol_attribute): Add entry_master. Document entry.
9 (struct gfc_entry_list): Define.
10 (gfc_get_entry_list): Define.
11 (struct gfc_namespace): Add refs and entries.
12 (enum gfc_exec_op): Add EXEC_ENTRY.
13 (struct gfc_code): Add ext.entry.
14 * module.c (ab_attribute, attr_bits): Remove AB_ENTRY.
15 (mio_symbol_attribute): Don't save/reture addr->entry.
16 (mio_namespace_ref): Refcount namespaces.
17 * parse.c (accept_statement): Handle ST_ENTRY.
18 (gfc_fixup_sibling_symbols): Mark symbol as referenced.
19 (parse_contained): Fixup sibling references to entry points
20 after parsing the procedure body.
21 * resolve.c (resolve_contained_fntype): New function.
22 (merge_argument_lists, resolve_entries): New functions.
23 (resolve_contained_functions): Use them.
24 (resolve_code): Handle EXEC_ENTRY.
25 (gfc_resolve): Call resolve_entries.
26 * st.c (gfc_free_statement): Handle EXEC_ENTRY.
27 * symbol.c (gfc_get_namespace): Refcount namespaces.
28 (gfc_free_namespace): Ditto.
29 * trans-array.c (gfc_trans_dummy_array_bias): Treat all args as
30 optional when multiple entry points are present.
31 * trans-decl.c (gfc_get_symbol_decl): Remove incorrect check.
32 (gfc_get_extern_function_decl): Add assertion. Fix coment.
33 (create_function_arglist, trans_function_start, build_entry_thunks):
35 (gfc_build_function_decl): Rename ...
36 (build_function_decl): ... to this.
37 (gfc_create_function_decl): New function.
38 (gfc_generate_contained_functions): Use it.
39 (gfc_trans_entry_master_switch): New function.
40 (gfc_generate_function_code): Use new functions.
41 * trans-stmt.c (gfc_trans_entry): New function.
42 * trans-stmt.h (gfc_trans_entry): Add prototype.
43 * trans-types.c (gfc_get_function_type): Add entry point argument.
44 * trans.c (gfc_trans_code): Handle EXEC_ENTRY.
45 (gfc_generate_module_code): Call gfc_create_function_decl.
46 * trans.h (gfc_build_function_decl): Remove.
47 (gfc_create_function_decl): Add prototype.
49 2004-08-15 Andrew Pinski <apinski@apple.com>
52 * f95-lang.c (gfc_init_builtin_functions): Initialize the builtins
53 for cabs{,f} and copysign{,f}.
54 * trans-decl.c (gfor_fndecl_math_cabsf): Delete.
55 (gfor_fndecl_math_cabs): Delete.
56 (gfor_fndecl_math_sign4): Delete.
57 (gfor_fndecl_math_sign8): Delete.
58 (gfc_build_intrinsic_function_decls): Remove the
59 initializing of cabs{,f} and copysign{,f} functions.
60 * trans-intrinsic.c (gfc_conv_intrinsic_abs): Use the builtins
61 instead of the functions definitions.
62 (gfc_conv_intrinsic_sign): Likewise.
63 * trans.h (gfor_fndecl_math_cabsf): Delete.
64 (gfor_fndecl_math_cabs): Delete.
65 (gfor_fndecl_math_sign4): Delete.
66 (gfor_fndecl_math_sign8): Delete.
68 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
70 * trans-array.c (gfc_trans_array_constructor_value): Use
72 * trans-const.c (gfc_build_string_const,
73 gfc_init_constants, gfc_conv_mpz_to_tree,
74 gfc_conv_constant_to_tree): Likewise.
75 * trans-decl.c (gfc_get_symbol_decl): Likewise.
76 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
77 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
78 * trans-io.c (add_case, set_error_locus, build_dt,
79 transfer_expr): Likewise.
80 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
81 gfc_trans_stop, gfc_trans_character_select): Likewise.
82 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
83 * trans.c (gfc_trans_runtime_check): Likewise.
85 2004-08-14 Paul Brook <paul@codesourcery.com>
87 * trans-decl.c (gfc_build_function_decl): Remove dead code.
89 2004-08-14 Paul Brook <paul@codesourcery.com>
91 * trans-arry.c (gfc_trans_auto_array_allocation): Remove unused var.
93 2004-08-13 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
95 * gfortran.h: Add comments.
96 * parse.c (parse_contained): Fix comment typo.
97 * resolve.c (was_declared): Ditto.
100 2004-08-11 Paul Brook <paul@codeourcery.com>
103 * intrinsic.c (add_functions): Add dfloat as an alias for dble.
105 2004-08-10 Richard Henderson <rth@redhat.com>
107 * f95-lang.c (gfc_init_builtin_functions): Remove
108 __builtin_stack_alloc, add __builtin_alloca.
109 * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR.
110 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
112 2004-08-10 Paul Brook <paul@codesourcery.com>
114 * trans-io.c (transfer_expr): Handle pointters.
116 2004-08-10 Paul Brook <paul@codesourcery.com>
119 * trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT.
120 (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta.
121 (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary):
122 Handle GFC_SS_COMPONENT.
123 (gfc_conv_ss_startstride): Ditto. Set ss->shape.
124 (gfc_conv_loop_setup): Tweak commends. Remove dead code.
126 (gfc_conv_array_initializer): Call specific initializer routines.
127 * trans-expr.c (gfc_trans_structure_assign): New function.
128 (gfc_trans_subarray_assign): New function.
129 (gfc_trans_subcomponent_assign): New fucntion
130 (gfc_conv_structure): Use them.
131 * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT.
134 2004-08-08 Victor Leikehman <lei@il.ibm.com>
136 * simplify.c (gfc_simplify_shape): Bugfix.
137 * expr.c (gfc_copy_shape_excluding): New function.
138 * gfortran.h (gfc_get_shape): Bugfix.
139 (gfc_copy_shape_excluding): Added declaration.
140 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
141 gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound,
142 gfc_resolve_ubound, gfc_resolve_transpose): Added compile
143 time resolution of shape.
145 2004-08-06 Janne Blomqvist <jblomqvi@cc.hut.fi>
147 * intrinsic.c (add_subroutines): Add getenv and
148 get_environment_variable. (add_sym_5s): New function.
149 * intrinsic.h (gfc_resolve_get_environment_variable): Add
151 * iresolve.c (gfc_resolve_get_environment_variable): New
154 2004-08-06 Feng Wang <fengwang@nudt.edu.cn>
156 * f95-lang.c (gfc_init_builtin_functions): Fix the number of
157 __builtin_pow[f] arguments.
159 2004-08-06 Steven G. Kargl <kargls@comcast.net>
161 * arith.c: Add #define for model numbers. Remove global GMP variables.
162 (natural_logarithm,common_logarithm,exponential,sine,
163 cosine,arctangent,hypercos,hypersine ): Remove.
164 (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions.
165 (arctangent2,gfc_arith_init_1,gfc_arith_done_1
166 gfc_check_real_range, gfc_constant_result, gfc_range_check,
167 gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times,
168 gfc_arith_divide,complex_reciprocal,complex_pow_ui,
169 gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real,
170 gfc_convert_complex,gfc_int2real,gfc_int2complex,
171 gfc_real2int,gfc_real2real,gfc_real2complex,
172 gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP
173 to MPFR, use new functions.
174 * arith.h: Remove extern global variables.
175 (natural_logarithm,common_logarithm,exponential, sine, cosine,
176 arctangent,hypercos,hypersine): Remove prototypes.
177 (arctangent2): Update prototype from GMP to MPFR.
178 (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes.
179 * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR.
180 * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR.
181 * gfortran.h (GFC_REAL_BITS): Remove.
182 (arith): Add ARITH_NAN.
183 Include mpfr.h. Define GFC_RND_MODE.
184 Rename GCC_GFORTRAN_H GFC_GFC_H.
185 (gfc_expr): Convert GMP to MPFR.
186 * module.c: Add arith.h, correct type in comment.
187 (mio_gmp_real): Convert GMP to MPFR.
188 (mio_expr): Use gfc_set_model_kind().
189 * primary.c: Update copyright date with 2004.
190 (match_real_constant,match_const_complex_part): Convert GMP to MPFR.
191 * simplify.c: Remove global GMP variables
192 (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag,
193 gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint,
194 gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan,
195 gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx,
196 gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh,
197 gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon,
198 gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor,
199 gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int,
200 gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log,
201 gfc_simplify_log10,simplify_min_max,gfc_simplify_mod,
202 gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint,
203 gfc_simplify_rrspacing,gfc_simplify_scale,
204 gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin,
205 gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt,
206 gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny,
207 gfc_simplify_init_1,gfc_simplify_done_1): Convert GMP to MPFR.
209 * trans-const.c (gfc_conv_mpfr_to_tree): Rename from
210 gfc_conv_mpf_to_tree. Convert it to use MPFR
211 (gfc_conv_constant_to_tree): Use it.
212 * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree().
213 * trans-intrinsic.c: Add arith.h, remove gmp.h
214 (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR.
216 2004-08-06 Victor Leikehman <lei@il.ibm.com>
217 Paul Brook <paul@codesourcery.com>
219 * trans-array.c (gfc_trans_allocate_array_storage,
220 gfc_trans_allocate_temp_array, gfc_add_loop_ss_code,
221 gfc_conv_loop_setup): For functions, if the shape of the result
222 is not known in compile-time, generate an empty array descriptor for
223 the result and let the callee to allocate the memory.
224 (gfc_trans_dummy_array_bias): Do nothing for pointers.
225 (gfc_conv_expr_descriptor): Use function return values directly.
226 * trans-expr.c (gfc_conv_function_call): Always add byref call
228 (gfc_trans_pointer_assignment): Add comments.
229 (gfc_trans_arrayfunc_assign): Don't chain on expression.
231 2004-08-01 Roger Sayle <roger@eyesopen.com>
233 * options.c (gfc_init_options): Don't warn about the use GNU
234 extensions by default.
235 (gfc_post_options): Warn about GNU extensions with -pedantic.
236 (gfc_handle_option): Don't warn about GNU extensions with -std=gnu.
238 2004-07-30 Richard Henderson <rth@redhat.com>
240 * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL
243 2004-07-25 Richard Henderson <rth@redhat.com>
245 * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL
246 and DECL_IGNORED_P on RESULT_DECL.
247 (gfc_generate_constructors): Likewise.
249 2004-07-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
252 * lang.opt (ffixed-line-length-none, ffixed-line-length-): New
254 (ffixed-line-length-80, ffixed-line-length-132): Remove.
255 * options.c (gfc_handle_options): Deal with changed options.
256 * scanner.c (load_line): Change second arg to 'char **',
257 allocate if pointing to NULL. Keep track of buffer's length.
258 Adapt buffer size to overlong lines. Pad lines to full length
260 (load_file): Adapt to new interface of load_line.
262 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
264 * trans.h (builtin_function): Declare.
266 2004-07-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
269 (parts ported from g95)
270 * parse.h (gfc_state_data): New field do_variable.
271 (gfc_check_do_variable): Add prototype.
272 * parse.c (push_state): Initialize field 'do_variable'.
273 (gfc_check_do_variable): New function.
274 (parse_do_block): Remember do iterator variable.
275 (parse_file): Initialize field 'do_variable'.
276 * match.c (gfc_match_assignment, gfc_match_do,
277 gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate):
278 Add previously missing checks.
279 (gfc_match_return): Reformat error message.
280 * io.c (match_out_tag): New function.
281 (match_open_element, match_close_element,
282 match_file_element, match_dt_element): Call match_out_tag
283 instead of match_vtag where appropriate.
284 (match_io_iterator, match_io_element): Add missing check.
285 (match_io): Reformat error message.
286 (match_inquire_element): Call match_out_tag where appropriate.
288 * parse.c (gfc_check_do_variable): Fix error locus.
290 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
293 * trans-decl.c (gfc_build_function_decl): Create a new chardecl
294 for every assumed length character dummy argument.
297 * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion.
300 * simplify.c (gfc_simplify_bound): Copy the bound expression.
302 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
305 * trans-array.c gfc_trans_g77_array,
306 gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init
307 for assumed length characters.
308 (gfc_conv_expr_descriptor): Set se->string_length if dealing
309 with a character expression.
310 (gfc_cvonv_array_parameter): Pass string length when passing
311 character array according to g77 conventions.
313 2004-07-12 Paul Brook <paul@codesourcery.com>
315 * expr.c (gfc_check_assign_symbol): Handle pointer assignments.
316 * trans-array.c (gfc_trans_auto_array_allocation): Remove
318 * trans-common.c (create_common): Use gfc_conv_initializer.
319 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer.
320 * trans-expr.c (gfc_conv_initializer): New function.
321 (gfc_conv_structure): Use it.
322 * trans.h (gfc_conv_initializer): Add prototype.
324 2004-07-11 Paul Brook <paul@codesourcery.com>
327 * parse.c (gfc_fixup_sibling_symbols): Also look for untyped
329 (parse_contained): Mark contained symbols as referenced.
331 2004-07-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
334 * module.c (gfc_dump_module, gfc_use_module): Print locus
335 when opening of module file fails.
338 * io.c (match_io): Flag 'WRITE(...), ...' as extension.
341 * match.c (gfc_match_program): A program name is obligatory.
342 (gfc_match_return): RETURN in main program is an extension.
343 (gfc_match_block_data): A space is required before a block data
347 * primary.c (match_boz_constant): Call gfc_notify_std only if
348 we actually have a non-standard boz-literal-constant.
351 * expr.c (gfc_check_assign): Print ranks if incompatible. Issue
352 warning if assigning NULL().
354 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
356 * f95-lang.c (set_block): Remove.
357 (gfc_clear_binding_stack): New.
358 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
359 (struct binding_level): Remove block_created_by_back_end.
360 (clear_binding_level): Likewise.
361 (poplevel): Don't handle block_created_by_back_end.
363 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
365 * trans-decl.c (gfc_create_module_variable): Nothing to do if
366 symbol is in common, because we ...
367 (gfc_generate_module_vars): Call gfc_trans_common.
369 2004-07-10 Paul Brook <paul@codesourcery.com>
371 * trans-array.c (gfc_build_null_descriptor): New function.
372 (gfc_trans_static_array_pointer): Use it.
373 * trans-array.h (gfc_build_null_descriptor): Add prototype.
374 * trans-expr.c (gfc_conv_structure): Handle array pointers.
376 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
379 * decl.c (gfc_match_save): Use-associated common block
381 * gfortran.h (gfc_common_head): Add new field 'name'.
382 Fix typo in comment after #endif.
383 * match.c (gfc_get_common): Add new argument from_common,
384 mangle name if flag is set, fill in new field in structure
386 (match_common): Set new arg in call to gfc_get_common,
387 use-associated common block doesn't collide.
388 * match.h (gfc_get_common): Adapt prototype.
389 * module.c (load_commons): Set new arg in call to
391 * symbol.c (free_common_tree): New function.
392 (gfc_free_namespace): Call new function.
393 * trans-common.c (several functions): Remove argument
394 'name', use name from gfc_common_head instead.
396 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
398 * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
399 and RHS match. Return early if the RHS is NULL().
402 * match.c (match_common): Fix error reporting for used common.
405 * trans-expr.c (gfc_conv_structure): Handle initialization
406 of scalar pointer components.
408 * parse.c (decode_statement): Fix matching of BLOCK DATA.
410 * trans-decl.c (generate_local_decl): Remove workaround obsoleted
413 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
415 * trans-common.c: Fix whitespace issues, make variable names
417 (create_common): Additionally, make loop logic more obvious.
419 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
420 Paul Brook <paul@codesourcery.com>
423 * trans-common.c (calculate_length): Remove ...
424 (get_segment_info): Merge into here. Save field type.
425 (build_field): Use saved type.
426 (create_common, new_condition, new_segment, finish_equivalences):
427 Use new get_segment_info.
428 * trans-types.c: Update comment.
430 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
433 * moduele.c (mio_symbol): Don't I/O initial values unless
434 symbol is a parameter.
436 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
439 * resolve.c (resolve_symbol): Verify that the shape of a
440 parameter array is not only explicit, but also constant.
441 * array.c (gfc_is_compile_time_shape): New function.
442 * gfortran.h (gfc_is_compile_time_shape): Add prototype.
444 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
450 * module.c (write_symbol, write_symtree): Remove workaround.
451 * primary.c (match_actual_arglist): Enhance comment.
452 (gfc_match_rvalue): Handle function call with first argument
453 a keyword argument correctly.
454 * resolve.c (resolve_symbol): Change call to
455 gfc_set_default_type to issue error if no implicit type
457 * trans-decl.c (gfc_create_module_variable): Remove workaround.
459 2004-07-08 Paul Brook <paul@codesourcery.com>
461 * intrinsic.c (add_sym_4s): New function.
462 (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
464 2004-07-04 Janne Blomqvist <jblomqvi@cc.hut.fi>
465 Paul Brook <paul@codesourcery.com>
469 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
470 GFC_ISYM_COMMAND_ARGUMENT_COUNT.
471 * intrinsic.c (add_functions): Identify iargc. Add
472 command_argument_count.
473 (add_subroutines): Resolve getarg. Add get_command and
474 get_command_argument.
475 * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
476 gfc_resolve_get_command_argument): Add prototypes.
477 * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
478 gfc_resolve_get_command_argument): New functions.
479 * trans-decl.c (gfor_fndecl_iargc): New variable.
480 (gfc_build_intrinsic_function_decls): Set it.
481 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
482 (gfc_conv_intrinsic_function): Use it.
483 * trans.h (gfor_fndecl_iargc): Declare.
485 2004-07-04 Matthias Klose <doko@debian.org>
487 * Make-lang.in: Generate and install gfortran man page.
488 * invoke.texi: Remove extra '@c man end'.
490 2004-07-04 Richard Henderson <rth@redhat.com>
492 * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
494 2004-07-04 Paul Brook <paul@codesourcery.com>
496 * decl.c (gfc_match_implicit_range): Don't use typespec.
497 (gfc_match_implicit): Handle character selectors.
498 * gfortran.h (gfc_set_implicit): Remove prototype.
499 (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
500 * parse.c (accept_statement): Don't call gfc_set_implicit.
501 * symbol.c (new_ts): Remove.
502 (gfc_set_implicit_none): Use same loop bounds as other functions.
503 (gfc_set_implicit): Remove.
504 (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
505 (gfc_merge_new_implicit): Combine with gfc_set_implicit.
507 2004-06-30 Richard Henderson <rth@redhat.com>
509 * match.c (var_element): Remove unused variable.
511 * trans-decl.c (gfc_generate_function_code): Don't set
512 x_whole_function_mode_p.
513 (gfc_generate_constructors): Likewise.
515 2004-06-30 Richard Henderson <rth@redhat.com>
517 * trans-decl.c (gfc_generate_function_code): Don't set
518 immediate_size_expand.
519 (gfc_generate_constructors): Likewise.
521 2004-06-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
524 * decl.c (gfc_match_type_spec): Rename second argument to
525 'implicit_flag', reverse meaning. Don't match_char_spec if
526 'implicit_flag' is set. Rename to ...
527 (match_type_spec): ... this.
528 (gfc_match_implicit_none, match_implicit_range): Move here
530 (gfc_match_implicit): Move here from match.c, try to
531 match_char_len if match_implicit_range doesn't succeed for
532 CHARACTER implicits. Call renamed fucntion match_type_spec.
533 (gfc_match_data_decl, match_prefix): Call renamed function
535 * match.c (gfc_match_implicit_none, match_implicit_range,
536 gfc_match_implicit): Move to decl.c.
537 * match.h (gfc_match_implicit_none, gfc_match_implicit):
538 Move protoypes to section 'decl.c'.
539 (gfc_match_type_spec): Remove prototype.
541 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
543 * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
546 2004-06-29 Steven Bosscher <stevenb@suse.de>
548 Make sure types in assignments are compatible. Mostly mechanical.
549 * trans-const.h (gfc_index_one_node): New define.
550 * trans-array.c (gfc_trans_allocate_array_storage,
551 gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
552 gfc_trans_array_constructor_value, gfc_trans_array_constructor,
553 gfc_conv_array_ubound, gfc_conv_array_ref,
554 gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
555 gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
556 gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
557 gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
558 types in assignments, conversions and conditionals for expressions.
559 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
560 gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
561 gfc_conv_function_call, gfc_trans_pointer_assignment,
562 gfc_trans_scalar_assign): Likewise.
563 * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
564 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
565 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
566 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
567 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
568 gfc_conv_allocated, gfc_conv_associated,
569 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
570 * trans-io.c (set_string): Likewise.
571 * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
572 gfc_do_allocate, generate_loop_for_temp_to_lhs,
573 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
574 compute_overall_iter_number, gfc_trans_assign_need_temp,
575 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
576 gfc_evaluate_where_mask, gfc_trans_where_assign,
577 gfc_trans_where_2): Likewise.
578 * trans-types.c (gfc_get_character_type, gfc_build_array_type,
579 gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
581 * trans.c (gfc_add_modify_expr): Add sanity check that types
582 for the lhs and rhs are the same for scalar assignments.
584 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
586 * dump-parse-tree.c (show_common): New function.
587 (gfc_show_namespace): Show commons.
589 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
590 Andrew Vaught <andyv@firstinter.net>
594 * decl.c (gfc_match_save): Adapt to new common structures,
595 don't allow saving USE-associated common.
596 * dump-parse-tree (gfc_show_attr): (saved_)common are not
597 symbol attributes any longer.
598 (gfc_show_symbol): Don't show old-style commons any longer.
599 (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
601 * gfortran.h (symbol_attribute): Remove common and saved_common
603 (gfc_symbol): Remove common_head element.
604 (gfc_common_head): New struct.
605 (gfc_get_common_head): New macro.
606 (gfc_symtree): Add field 'common' to union.
607 (gfc_namespace): Add field 'common_root'; change type of field
608 'blank_common' to blank_common.
609 (gfc_add_data): New prototype.
610 (gfc_traverse_symtree): Expect a symtree as first argument
611 instead of namespace.
612 * match.c (gfc_get_common): New function.
613 (match_common_name): Change to take char * as argument, adapt,
614 fix bug with empty name.
615 (gfc_match_common): Adapt to new data structures. Disallow
616 redeclaration of USE-associated COMMON-block. Fix bug with
618 (var_element): Adapt to new common structures.
619 * match.h (gfc_get_common): Declare.
620 * module.c: Add 2004 to copyright years, add commons to module
621 file layout description.
622 (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
623 for removed attributes.
624 (mio_symbol): Adapt to new way of storing common relations.
625 (load_commons): New function.
626 (read_module): Skip common list on first pass, load_commons at
628 (write_commons): New function.
629 (write_module): Call write_commons().
630 * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
631 functions related to removed attributes.
632 (gfc_add_data): New function.
633 (gfc_clear_attr): Don't set removed attributes.
634 (gfc_copy_attr): Don't copy removed attributes.
635 (traverse_symtree): Remove.
636 (gfc_traverse_symtree): Don't traverse symbol
637 tree of the passed namespace, but require a symtree to be passed
638 instead. Unify with traverse_symtree.
639 (gfc_traverse_ns): Call gfc_traverse_symtree according to new
641 (save_symbol): Remove setting of removed attribute.
642 * trans-common.c (gfc_sym_mangled_common_id): Change to
643 take 'char *' argument instead of 'gfc_symbol'.
644 (build_common_decl, new_segment, translate_common): Adapt to new
645 data structures, add new
647 (create_common): Adapt to new data structures, add new
648 argument name. Fix typo in intialization of derived types.
649 (finish_equivalences): Add second argument in call to
651 (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
652 (gfc_trans_common): Adapt to new data structures.
653 * trans-decl.c (gfc_create_module_variables): Remove test for
656 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
658 * io.c: Add 2004 to copyright years.
660 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
661 Andrew Vaught <andyv@firstinter.net>
663 * gfortran.h (gfc_gsymbol): New typedef.
664 (gfc_gsym_root): New variable.
665 (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
666 * parse.c (global_used): New function.
667 (parse_block_data): Check for double empty BLOCK DATA,
668 use global symbol table.
669 (parse_module): Use global symbol table.
670 (add_global_procedure, add_global_program): New functions.
671 (gfc_parse_file): Use global symbol table.
672 * symbol.c (gfc_gsym_root): New variable.
673 (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
676 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
678 * module.c (mio_gmp_real): Correct writing of negative numbers.
680 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
683 * expr.c (check_intrinsic_op): Allow comparison of characters.
686 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
687 Andrew Vaught <andyv@firstinter.net>
689 * decl.c (contained_procedure): New function.
690 (match_end): Verify correctness of END STATEMENT in
693 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
694 Andrew Vaught <andyv@firstinter.net>
697 * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
698 (decode_statement): Enforce required space in free-form.
700 2004-06-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
702 * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
703 * trans-array.c (gfc_conv_descriptor_data): Add operand
705 (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
706 (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
707 (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
708 * trans-common.c (create_common): Likewise.
709 * trans-expr.c (gfc_conv_component_ref): Likewise.
710 * trans-io.c (set_parameter_value): Likewise.
711 (set_parameter_ref, set_string, set_flag, io_result): Likewise.
712 (transfer_expr): Likewise.
713 * trans-decl.c (gfc_trans_auto_character_variable):
714 Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
715 (gfc_gimplify_function): New function.
716 (gfc_generate_function-code): Properly handle nested functions.
717 * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
719 2004-06-22 Janne Blomqvist <jblomqvi@cc.hut.fi>
722 * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
723 (gfc_resolve_inquire): Resolve the iolength tag. Return
724 SUCCESS at end of function if no failure has occured.
725 * resolve.c (resolve_code): Resolve if iolength is encountered.
726 * trans-io.c: (ioparm_iolength, iocall_iolength,
727 iocall_iolength_done): New variables.
728 (last_dt): Add IOLENGTH.
729 (gfc_build_io_library_fndecls ): Set iolength related variables.
730 (gfc_trans_iolength): Implement.
731 (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
733 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de
736 * scanner.c (load_line): Don't truncate preprocessor lines.
737 Reformat error message.
738 (preprocessor_line): Issue warning in case of malformed
741 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
743 * resolve.c (resolve_symbol): Add comment in function body.
744 (check_data_variable): Change type of mark to ar_type, adapt code
747 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
749 * array.c (gfc_insert_constructor): Avoid redundant call to
750 mpz_comp. Add 2004 to copyright years.
752 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
754 * trans.h (stmtblock_t): Change has_scope to unsigned int.
756 2004-06-20 Steven G. Kargl <kargls@comcast.net>
758 * arith.c (gfc_range_check): correct complex underflow.
760 2004-06-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
763 * match.c (match_case_selector): Call gfc_match_init_expr
764 instead of gfc_match_expr.
765 * resolve.c (validate_case_label_expr): No need to check for
766 constant, since it wouldn't have been matched with the fix to
769 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
772 * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
775 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
778 * trans-deecl.c (generate_local_decl): Do not issue warning for
779 unused variables if they're use associated.
781 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
782 Andrew Vaught <andyv@firstinter.net>
785 * gfortran.h (gfc_check_f): Add new field f3ml.
786 * check.c (gfc_check_minloc_maxloc): Take argument list instead
787 of individual arguments, reorder if necessary.
788 * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
789 * intrinsic.c (add_sym_3ml): New function.
790 (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
791 (check_specific): Catch special case MINLOC, MAXLOC.
793 2004-06-14 Paul Brook <paul@codesourcery.com>
795 * intrinsic.c (add_sym_2s): Use correct function types.
797 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
799 * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize. Move data.c
800 * data.c (gfc_get_section_index): Remove dependency on trans.h.
802 2004-06-12 Steven G. Kargl <kargls@comcast.net>
804 * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
805 gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
806 * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
807 GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
808 * trans-intrinsic.c: Use symbols.
809 * intrinsic.c (add_sym_2s): New function.
810 * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
811 * intrinsic.h: Function prototypes.
812 * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
813 gfc_resolve_srand): New functions.
815 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
818 * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
821 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
824 * interface.c (compare_parameter, compare_actual_formal): Don't
825 check types and array shapes for NULL()
826 * trans-expr.c (conv_function_call): No double indirection for
829 2004-06-09 Toon Moene <toon@moene.indiv.nluug.nl>
831 * trans-expr.c (gfc_conv_cst_int_power): Compute
832 x**(-n) by converting it to (1/x)**n instead of
835 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
838 * module.c (write_symbol, write_symtree): Don't write symbols
839 wrongly added to namespace.
840 * trans-decl.c (gfc_create_module_variable): Don't create a
841 backend decl for a symbol incorrectly added to namespace.
843 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
846 * resolve.c (resolve_symbol): Verify that parameter array has an
847 explicit shape. Fix typos and coding style issues in surrounding
850 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
853 * gfortran.texi: The documentation doesn't contain infomration on
854 how to report bugs, and shouldn't, so remove the line which
857 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
859 * intrinsic.c (sort_actual): Keep track of type of missing
860 arguments. (Missing from previous commit.)
862 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
864 * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
865 * interface.c (compare_actual_formal): Keep type of omitted
867 * trans-expr.c (gfc_conv_function_call): Add string length
868 argument for omitted string argument.
870 2004-06-03 Paul Brook <paul@codesourcery.com>
872 * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
873 lists instead of compound expr chains.
874 (gfc_trans_code): Annotate statement lists.
876 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
878 * trans-array.c: Fix spelling in comments.
880 2004-06-02 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
883 * data.c (assign_substring_data_value): New function.
884 (gfc_assign_data_value): Call the new function if we're dealing
885 with a substring LHS.
887 2004-06-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
890 * gfortran.h (GFC_VERSION): Remove.
891 * gfortran.texi (version-gfortran): Remove, replace by version-GCC
894 2004-05-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
896 * trans-types.c: Fix spelling & layout in comments.
898 2004-05-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
901 * trans-const.c (gfc_conv_string_init): Allow variable string
902 length lower than initialization string length.
904 2004-05-30 Paul Brook <paul@codesourcery.com>
907 * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
908 * trans-expr.c (gfc_trans_string_copy): New function.
909 (gfc_conv_statement_function): Use them. Create temp vars. Enforce
911 (gfc_conv_string_parameter): Use gfc_trans_string_copy.
912 * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
913 * trans.h (struct gfc_saved_var): Define.
914 (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
916 2004-05-30 Steven G. Kargl <kargls@comcast.net>
918 * iresolve.c (gfc_resolve_random_number): Clean up conditional.
920 2004-05-29 Steven G. Kargl <kargls@comcast.net>
922 * simplify.c (gfc_simplify_log): Remove useless line of code.
924 2004-05-29 Paul Brook <paul@codesourcery.com>
926 * trans-common.c (find_equivalence): Find multiple rules.
928 2004-05-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
930 * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
931 (gfc_current_locus): Declare new global variable.
932 * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
933 (gfc_current_locus1): Rename ...
934 (gfc_current_locus): ... to this.
935 (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
936 skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
937 gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
938 gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
939 and gfc_current_locus(), respectively.
940 * array.c (match_subscript, gfc_match_array_ref, match_array_list,
941 match_array_cons_element, gfc_match_array_constructor):
942 Read/modify gfc_current_locus instead of calling gfc_set_locus()
943 and gfc_current_locus().
944 * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
945 match_attr_spec, gfc_match_function_decl, gfc_match_end,
946 attr_decl1, gfc_match_save): Likewise.
947 * error.c (error_print, gfc_internal_error): Likewise.
948 * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
949 * interface.c (gfc_add_interface): Likewise.
950 * io.c (gfc_match_format, match_dt_format, match_dt_element,
951 match_io_iterator, match_io): Likewise.
952 * match.c (gfc_match_space, gfc_match_eos,
953 gfc_match_small_literal_int, gfc_match_st_label,
954 gfc_match_strings, gfc_match_name, gfc_match_iterator,
955 gfc_match_char, gfc_match, gfc_match_assignment,
956 gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
957 gfc_match_nullify, gfc_match_call, match_implicit_range,
958 gfc_match_implicit, gfc_match_data, match_case_selector,
959 gfc_match_case, match_forall_iterator): Likewise.
960 * matchexp.c (gfc_match_defined_op_name, next_operator,
961 match_level_1, match_mult_operand, match_ext_mult_operand,
962 match_add_operand, match_ext_add_operand, match_level_2,
963 match_level_3, match_level_4, match_and_operand, match_or_operand,
964 match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
965 * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
966 * parse.c (match_word, decode_statement, next_free, next_fixed,
967 add_statement, verify_st_order, parse_if_block, gfc_parse_file):
969 * primary.c (match_digits, match_integer_constant,
970 match_boz_constant, match_real_constant, match_substring,
971 next_string_char, match_charkind_name, match_string_constant,
972 match_logical_constant, match_const_complex_part,
973 match_complex_constant, match_actual_arg, match_keyword_arg,
974 gfc_match_actual_arglist, gfc_match_structure_constructor,
975 gfc_match_rvalue, gfc_match_variable): Likewise.
976 * st.c (gfc_get_code): Likewise.
977 * symbol.c (check_conflict, check_used, check_done,
978 duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
979 gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
980 gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
982 2004-05-26 Roger Sayle <roger@eyesopen.com>
984 * io.c (format_asterisk): Silence compiler warnings by correcting
985 the number of elements of a "locus" initializer.
987 2004-05-25 Roger Sayle <roger@eyesopen.com>
990 * matchexp.c: Allow unary operators after arithmetic operators
992 (match_ext_mult_operand, match_ext_add_operand): New functions.
993 (match_mult_operand): Tweak to call match_ext_mult_operand.
994 (match_add_operand): Tweak to call match_ext_mult_operand.
995 (match_level_2): Rearrange to call match_ext_add_operand.
997 2004-05-25 Paul Brook <paul@codesourcery.com>
999 * expr.c (check_inquiry): Remove bogus tests.
1001 2004-05-23 Paul Brook <paul@codesourcery.com>
1004 * expr.c (restricted_args): Remove redundant checks/argument.
1005 (external_spec_function): Update to match.
1006 (restricted_intrinsic): Rewrite.
1008 2004-05-23 Paul Brook <paul@codesourcery.com>
1009 Victor Leikehman <lei@haifasphere.co.il>
1011 * gfortran.h (struct gfc_symbol): Add equiv_built.
1012 * trans-common.c: Change int to HOST_WIDE_INT. Capitalize error
1014 (current_length): Remove.
1015 (add_segments): New function.
1016 (build_equiv_decl): Create initialized common blocks.
1017 (build_common_decl): Always add decl to bindings.
1018 (create_common): Create initializers.
1019 (find_segment_info): Reformat to match coding conventions.
1020 (new_condition): Use add_segments.
1021 (add_condition, find_equivalence, add_equivalences): Move iteration
1022 inside functions. Only process each segment once.
1023 (new_segment, finish_equivalences, translate_common): Simplify.
1025 2004-05-23 Steven G. Kargl <kargls@comcast.net>
1027 * check.c (gfc_check_random_seed): Issue for too many arguments.
1029 2004-05-22 Steven G. Kargl <kargls@comcast.net>
1031 * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
1033 2004-05-22 Paul Brook <paul@codesourcery.com>
1035 * dump-parse-tree.c (gfc_show_equiv): New function.
1036 (gfc_show_namespace): Use it.
1038 2004-05-22 Victor Leikehman <lei@haifasphere.co.il>
1041 * symbol.c (gfc_add_common): Disable checks to work around other more
1042 fundamental inadequacies.
1044 2004-05-22 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1046 * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
1048 (gfc_build_function_decl): Likewise.
1050 2004-05-22 Steven G. Kargl <kargls@comcast.net>
1052 * check.c (gfc_check_system_clock): New function.
1053 * intrinsic.c (add_sym_3s): New function.
1054 (add_subroutines): Use it.
1055 * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
1057 * iresolve.c (gfc_resolve_system_clock): New function.
1059 2004-05-22 Steven G. Kargl <kargls@comcast.net>
1061 * invoke.texi: Document -Wunderflow and spell check.
1062 * lang.opt: Add Wunderflow.
1063 * gfortran.h (gfc_option_t): Add warn_underflow option.
1064 * options.c (gfc_init_options, set_Wall): Use it.
1065 * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
1066 * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
1067 gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
1068 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
1069 * arith.c (common_logarithm): Fix typo in comment.
1071 2004-05-21 Roger Sayle <roger@eyesopen.com>
1073 * io.c (check_format): As a GNU extension, allow the comma after a
1074 string literal to be optional in a format. Use gfc_notify_std to
1075 issue an error/warning as appropriate.
1077 2004-05-21 Roger Sayle <roger@eyesopen.com>
1079 * io.c (check_format): Use gfc_notify_std to determine whether to
1080 issue an error/warning for omitting the digits from the X format.
1082 2004-05-20 Roger Sayle <roger@eyesopen.com>
1084 * io.c (check_format): Allow the number before the X format to
1085 be optional when not -pedantic.
1087 2004-05-18 Feng Wang <fengwang@nudt.edu.cn>
1088 Paul Brook <paul@codesourcery.com>
1090 * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
1091 Create decls for __builtin_pow{,f}.
1092 * gfortran.h (PREFIX_LEN): Define.
1093 * trans-decl.c (gfor_fndecl_math_powi): Add.
1094 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
1095 (gfc_build_intrinsic_function_decls): Create decls for powi.
1096 * trans-expr.c (powi_table): Add.
1097 (gfc_conv_integer_power): Remove.
1098 (gfc_conv_powi): New function.
1099 (gfc_conv_cst_int_power): New function.
1100 (gfc_conv_power_op): Use new powi routines.
1101 * trans.h (struct gfc_powdecl_list): Add.
1102 (gfor_fndecl_math_powi): Add.
1103 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
1105 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1107 * trans.c, trans-decl.c: Fix comment typos.
1109 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1111 * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
1113 2004-05-18 Steve Kargl <kargls@comcast.net>
1115 * arith.c (gfc_int2complex): Fix incorrect range checking.
1117 2004-05-18 Paul Brook <paul@codesourcery.com>
1120 * decl.c (add_init_expr_to_sym): Remove incorrect check.
1121 (default_initializer): Move to expr.c.
1122 (variable_decl): Don't assign default initializer to variables.
1123 * expr.c (gfc_default_initializer): Move to here.
1124 * gfortran.h (gfc_default_initializer): Add prototype.
1125 * resolve.c (resolve_symbol): Check for illegal initializers.
1126 Assign default initializer.
1128 2004-05-17 Steve Kargl <kargls@comcast.net>
1130 * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
1132 2004-05-17 Steve Kargl <kargls@comcast.net>
1134 * arith.c (gfc_real2complex): Range checking wrong part of complex
1137 2004-05-16 Paul Brook <paul@codesourcery.com>
1139 * options.c (gfc_handle_module_path_options): Fix buffer overrun.
1141 2004-05-16 Paul Brook <paul@codesourcery.com>
1143 * arith.c (gfc_range_check): Fix logic error.
1145 2004-05-16 Steve Kargl <sgk@troutmask.apl.washington.edu>
1147 * arith.c: Fix comment typos.
1149 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1152 * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
1153 not initialized in a disallowed fashion.
1154 * match.c (gfc_match_common): Likewise.
1155 (var_element): Verify that variable is not in the blank COMMON,
1156 if it is in a common.
1158 2004-05-15 Joseph S. Myers <jsm@polyomino.org.uk>
1160 * Make-lang.in (f95.generated-manpages): Remove.
1161 (f95.srcextra): New.
1162 (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
1163 f95.maintainer-clean): Generate info and dvi files in objdir/doc.
1166 (f95.install-info): Remove.
1167 (install-info): New.
1169 2004-05-15 Victor Leikehman <lei@haifasphere.co.il>
1171 * decl.c (add_init_expr_to_sym): Check for variable size arrays.
1173 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1175 * primary.c (match_boz_constant): Use gfc_notify_std() for
1176 issuing a warning or an error.
1178 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1181 * primary.c (match_structure_constructor): Rename ...
1182 (gfc_match_structure_constructor): ... to this. Make non-static.
1183 (gfc_match_rvalue): Call renamed function.
1184 * match.h (gfc_match_structure_constructor): Declare.
1185 * match.c (gfc_match_data_constant): Handle structure
1188 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1192 * gfortran.h (gfc_linebuf): New typedef.
1194 (gfc_file): Revamped, use new gfc_linebuf.
1195 (locus): Revamped, use new types.
1196 (gfc_current_file): Remove.
1197 (gfc_current_form, gfc_source_file): New global variables.
1198 * match.c (gfc_match_space, gfc_match_strings): Use
1199 gfc_current_form to find source form.
1200 * module.c (gfc_dump_module): Use gfc_source_file when printing
1202 * error.c (show_locus, show_loci) Use new data structures to print
1204 * scanner.c (first_file, first_duplicated_file, gfc_current_file):
1206 (file_head, current_file, gfc_current_form, line_head, line_tail,
1207 gfc_current_locus1, gfc_source_file): New global variables.
1208 (gfc_scanner_init1): Set new global variables.
1209 (gfc_scanner_done1): Free new data structures.
1210 (gfc_current_locus): Return pointer to gfc_current_locus1.
1211 (gfc_set_locus): Set gfc_current_locus1.
1212 (gfc_at_eof): Set new variables.
1213 (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
1214 to new locus structure.
1215 (gfc_check_include): Remove.
1216 (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
1217 (gfc_skip_comments): Use gfc_current_form, find locus with
1219 (gfc_next_char): Use gfc_current_form.
1220 (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
1221 (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
1223 (get_file): New function.
1224 (preprocessor_line, include_line): New functions.
1225 (load_file): Move down, rewrite to match new data structures.
1226 (gfc_new_file): Rewrite to match new data structures.
1227 * parse.c (next_statement): Remove code which is now useless. Use
1228 gfc_source_form and gfc_source_file where appropriate.
1229 * trans-decl.c (gfc_get_label_decl): adapt to new data structures
1230 when determining locus of frontend code.
1231 * trans-io.c (set_error_locus): Same.
1232 * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
1233 * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
1235 (all): Add missing initializers.
1237 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1239 * Make-lang.in (trans-common.o): Remove redundant dependency.
1240 (data.c): Replace object file name ...
1241 (data.o): ... by the correct one.
1243 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1245 * dump-parse-tree.c (gfc_show_array_ref): Print colon only
1246 for ranges when dumping array references.
1248 2004-05-14 Victor Leikehman <lei@haifasphere.co.il>
1250 * decl.c (variable_decl): Always apply default initializer.
1252 2004-05-08 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1255 * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
1256 handle zero correctly.
1258 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1260 * match.c (gfc_match): Eliminate dead code.
1262 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1264 * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
1265 Detect bad continuation line in fixed form sources.
1267 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1270 * iresolve.c (gfc_resolve_nearest): Add new function.
1271 * intrinsic.h: ... declare it here.
1272 * intrinsic.c (add_functions): ... add it as resolving function
1275 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1278 * match.c (gfc_match_do): Allow infinite loops with
1279 label-do-stmt. Do not enforce space after comma.
1281 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1284 * parse.c (parse_interface): Allow empty INTERFACE, remove
1287 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1289 * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
1290 decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
1291 expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
1292 intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
1293 matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
1294 primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
1295 trans-array.c, trans-array.h, trans-common.c, trans-const.c,
1296 trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
1297 trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
1298 trans-types.h, trans.c, trans.h: Update copyright years and
1300 * data.c: Likewise, also removed two whitespace-only lines.
1301 * gfortranspec.c, lang.opt: Update copyright years.
1303 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1306 * trans-decl.c (generate_local_decl): Don't warn for unused
1307 variables which are in common blocks.
1309 2004-05-13 Diego Novillo <dnovillo@redhat.com>
1311 * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
1312 trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
1313 trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
1315 2004-05-13 Victor Leikehman <lei@haifasphere.co.il>
1318 * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
1320 2004-05-13 Joseph S. Myers <jsm@polyomino.org.uk>
1322 * gfortran.texi: Use @table @emph instead of @itemize @emph.
1323 Remove "set DEVELOPMENT".
1324 (Compiling GFORTRAN): Remove.
1326 2004-05-09 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1328 * array.c (match_subscript, match_array_ref): Add comments
1329 explaining argument 'init'.
1330 * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
1331 trans-expr.c, trans.c: Fix some typos in comments.
1332 * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
1333 * primary.c (match_digits, match_integer_constant): Add comment
1334 explaining signflag.
1336 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1339 * primary.c: Include system.h and flags.h, needed for pedantic.
1340 (match_boz_constant): Allow "x" for hexadecimal constants, warn if
1343 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1346 * match.c (match_data_constant): Handle case where
1347 gfc_find_symbol sets sym to NULL
1349 2004-04-28 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1351 * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
1352 dependency on mathbuiltins.def
1354 2004-04-24 Victor Leikehman <lei@il.ibm.com>
1356 * trans-io.c (transfer_expr): Implemented recursive printing
1359 2004-04-24 Andrew Pinski <pinskia@physics.uc.edu>
1361 * gfortranspec.c: Do not include multilib.h.
1363 2004-04-24 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1365 * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
1366 2004 to copyright years.
1367 * trans-expr.c, trans-decl.c: Comment update, we now generate
1368 GENERIC, not SIMPLE. Add 2004 to copyright years.
1370 2004-04-24 Paul Brook <paul@codesourcery.com>
1372 * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
1374 2004-04-24 Feng Wang <fengwang@nudt.edu.cn>
1377 * arith.c (gfc_arith_divide): Fix complex divide.
1379 2004-04-23 Andrew Pinski <pinskia@physics.uc.edu>
1381 * gfortranspec.c: Include the target headers.
1383 2004-04-18 Feng Wang <fengwang@nudt.edu.cn>
1387 * arith.c (arctangent2): New function.
1388 * arith.h (arctangent2): Add function prototype.
1389 * simplify.c (gfc_simplify_atan2): Use it.
1390 (gfc_simplify_log): Use it.
1392 2004-04-12 Diego Novillo <dnovillo@redhat.com>
1394 * fortran/f95-lang.c (gfc_expand_stmt): Remove.
1395 (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
1397 2004-04-11 Bud Davis <bdavis9659@comcast.net>
1400 * trans-io.c (build_dt): Change REC to value.
1402 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
1405 * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
1406 the real value when converting mpf to string.
1408 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
1411 * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
1414 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
1417 * simplify.c (simplify_min_max): Convert the type of the result.
1419 2004-04-11 Paul Brook <paul@codesourcery.com>
1421 * gfortran.texi: Use full target triplet.
1423 2004-04-11 Paul Brook <paul@codesourcery.com>
1425 * Make-lang.in (GFORTRAN_TEXI): Set it.
1426 (fortran/dfortran.dvi): Use it. Add fortran to include paths.
1427 (fortran/gfortran.info): Ditto.
1428 * gfortran.texi: Major update.
1429 * invoke.texi: New file.
1431 2004-04-10 Paul Brook <paul@codesourcery.com>
1433 * trans-array.c (gfc_trans_allocate_temp_array,
1434 gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
1435 * trans-decl.c (gfc_build_dummy_array_decl,
1436 gfc_get_symbol_decl, gfc_build_function_decl,
1437 gfc_create_module_variable): Ditto.
1438 * trans-expr.c (gfc_conv_variable): Ditto.
1439 * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
1440 * trans.h (GFC_DECL_STRING): Remove.
1441 (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
1442 GFC_DECL_ASSIGN): Renumber flags.
1444 2004-04-05 Paul Brook <paul@codesourcery.com>
1448 * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
1450 * gfortran.h (struct gfc_charlen): Add backend_decl.
1451 * trans-array.c (gfc_trans_allocate_temp_array,
1452 gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
1453 (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
1454 Remove old, broken string handling.
1455 (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
1456 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
1457 gfc_trans_deferred_array): Handle character arrays.
1458 * trans-const.c (gfc_conv_const_charlen): New function.
1459 * trans-const.h (gfc_conv_const_charlen): Add prototype.
1460 * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
1462 (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
1463 (gfc_create_string_length): New function.
1464 (gfc_get_symbol_decl): Create lengths for character variables.
1465 (gfc_get_fake_result_decl): Ditto.
1466 (gfc_build_function_decl): Only set length for assumed length
1467 character arguments.
1468 (gfc_trans_dummy_character): New function.
1469 (gfc_trans_auto_character_variable): Rewrite.
1470 (gfc_trans_deferred_vars): Handle more types of character variable.
1471 (gfc_create_module_variable): String lengths have moved.
1472 (gfc_generate_function_code): Initialize deferred var chain earlier.
1473 * trans-expr.c (gfc_conv_init_string_length): Rename ...
1474 (gfc_trans_init_string_length): ... to this.
1475 (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
1476 gfc_conv_function_call): Update to new format for character variables.
1477 (gfc_conv_string_length): Remove.
1478 (gfc_conv_string_parameter): Update assertion.
1479 * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
1480 * trans-io.c (set_string): Use new macro names.
1481 * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
1482 * trans-types.c (gfc_get_character_type): Use existing length expr.
1483 (gfc_is_nodesc_array): Make public.
1484 (gfc_get_dtype_cst): Rename ...
1485 (gfc_get_dtype): ... to this. Handle unknown size arrays.
1486 (gfc_get_nodesc_array_type): Use new name.
1487 (gfc_sym_type): New character variable code.
1488 (gfc_get_derived_type): Ditto.
1489 (gfc_get_function_type): Evaluate character variable lengths.
1490 * trans-types.h (gfc_strlen_kind): Define.
1491 (gfc_is_nodesc_array): Add prototype.
1492 * trans.h: Update prototypes.
1493 (struct lang_type): Update comments.
1494 (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
1495 (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
1497 2004-04-04 Paul Brook <paul@codesourcery.com>
1499 * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
1500 * options.c (gfc_init.options, gfc_handle_option): Ditto.
1501 * trans-expr.c (gfc_conv_function_call): Ditto.
1502 * trans-types.c (gfc_is_nodesc_array): Ditto
1503 * lang.opt (fg77-calls): Remove.
1505 2004-04-04 Paul Brook <paul@codesourcery.com>
1507 * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
1508 (gfc_conv_descriptor_base): Rename ...
1509 (gfc_conv_descriptor_offset): ... to this.
1510 (gfc_trans_allocate_array_storage): Set offset to zero.
1511 (gfc_conv_array_base): Rename ...
1512 (gfc_conv_array_offset): ... to this.
1513 (gfc_conv_array_index_ref): Add offset parameter.
1514 (gfc_conv_array_ref): Include offset.
1515 (gfc_trans_preloop_setup): Use existing offset.
1516 (gfc_trans_allocate_temp_array, gfc_array_allocate,
1517 gfc_trans_auto_array_allocation, gfc_trans_g77_array,
1518 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
1519 gfc_conf_ss_descriptor): Set offset.
1520 * trans-array.h: Rename prototypes.
1521 * trans-const.h (gfc_index_zero_node): Define.
1522 * trans-decl.c (gfc_build_qualified_array): Change base to offset.
1523 * trans-types.c (gfc_get_array_type_bounds): Ditto.
1524 (gfc_get_nodesc_array_type): Calculate offset before upper bound.
1526 2004-03-25 Diego Novillo <dnovillo@redhat.com>
1528 * convert.c (convert): Don't handle WITH_RECORD_EXPR.
1530 2004-03-24 Bud Davis <bdavis9659@comcast.net>
1533 * arith.c (gfc_convert_integer,gfc_convert_real): Removed leading '+'
1534 before conversion by gmp library call.
1536 2004-03-24 Bud Davis <bdavis9659@comcast.net>
1539 * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
1541 2004-02-24 Richard Henderson <rth@redhat.com>
1543 * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
1545 2004-02-19 Loren J. Rittle <ljrittle@acm.org>
1547 * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
1548 (fortran/gfortran.info): ... to here.
1551 2004-02-16 Richard Henderson <rth@redhat.com>
1553 * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
1554 * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
1555 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
1556 (gfc_expand_function): Rename from expand_function_body, make static,
1557 don't do anything except invoke tree_rest_of_compilation.
1558 (gfc_be_parse_file): Invoke cgraph.
1559 (gfc_expand_decl): Remove.
1560 (gfc_init_builtin_functions): Add __builtin_init_trampoline and
1561 __builtin_adjust_trampoline.
1562 * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
1563 (gfc_finalize): New.
1564 (gfc_generate_function_code): Use it. Lower nested functions.
1565 * trans-expr.c (gfc_conv_function_call): Add static chain operand
1567 * trans.c (gfc_build_function_call): Likewise.
1568 * trans.h (expand_function_body): Remove.
1570 2004-02-15 Victor Leikehman <lei@il.ibm.com>
1573 * trans-decl.c (gfc_build_function_decl) For functions
1574 returning CHARACTER pass an extra length argument,
1575 following g77 calling conventions.
1576 * trans-types.c (gfc_get_function_type) Ditto.
1577 * trans-expr.c (gfc_conv_function_call) Ditto.
1579 2004-02-14 Paul Brook <paul@codesourcery.com>
1581 * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
1583 2004-02-12 Paul Brook <paul@nowt.org>
1587 2004-02-08 Steve Kargl <sgk@troutmask.apl.washington.edu>
1589 * gfortran.texi: Fix typos.
1591 2004-02-07 Bud Davis <bdavis9659@comcast.net>
1594 * intrinsic.c (add_conversions) Use logical conversion instead
1596 * trans-types.c (gfc_get_logical_type) implemented logical*1
1599 2004-01-17 Paul Brook <paul@codesourcery.com>
1601 * lang-specs.h: Remove %<fixed-form.
1603 2004-01-15 Toon Moene <toon@moene.indiv.nluug.nl>
1605 * lang-specs.h: Enable preprocessing of source files
1606 ending in .F, .fpp, .FPP, .F90 and .F95.
1608 2004-01-13 Toon Moene <toon@moene.indiv.nluug.nl>
1611 * lang-specs.h: Enable compilation of files ending
1612 in .f, .for and .FOR.
1614 2004-01-11 Paul Brook <paul@codesourcery.com>
1616 * trans-stmt.c (gfc_trans_if_1): New function.
1617 (gfc_trans_if): Use it.
1619 2004-01-11 Erik Schnetter <schnetter@uni-tuebingen.de>
1621 * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
1622 (gfc_option_t): Add max_identifier_length.
1623 * lang.opt: Add fmax-identifier-length.
1624 * match.c (parse_name): Use limit.
1625 * options.c (gfc_init_options): Set max_identifier_length.
1626 (gfc_handle_option): Ditto.
1628 2004-01-11 Feng Wang <fengwang@nudt.edu.cn>
1630 * intrinsic.c (add_functions): Add resolve function to dcmplx.
1631 * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
1632 * iresolve.c (gfc_resolve_dcmplx): New function.
1634 2004-01-10 Paul Brook <paul@codesourcery.com>
1636 * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
1637 * trans-types.c (gfc_sym_type): Handle external dummy procedures.
1638 (gfc_return_by_reference): Correct condition.
1639 (gfc_get_function_type): Ditto.
1641 2004-01-10 Paul Brook <paul@codesourcery.com>
1643 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
1646 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
1648 * iresolve.c: Use correct kind.
1650 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
1653 * trans-decl.c (gfc_create_module_variable): Output array valued
1656 2004-01-10 Paul Brook <paul@codesourcery.com>
1658 * resolve.c (resolve_branch): Get error message right way round.
1660 2004-01-10 Canqun Yang <canqun@nudt.edu.cn>
1662 * trans-array (gfc_conv_loop_setup): Adjust comment to track
1664 (gfc_array_allocate): Don't count size of element twice.
1666 2004-01-04 Paul Brook <paul@codesourcery.com>
1668 * lang.opt (i8, r8, std=*): Remove RejectNegative.
1670 2004-01-04 Paul Brook <paul@codesourcery.com>
1672 * error.c (gfc_notify_std): New function.
1673 * gfortran.h (gfc_notify_std): Declare.
1674 (GFC_STD_*): Define.
1675 (gfc_option_t): Add warn_std and allow_std.
1676 * intrinsic.c (gfc_init_expr_extensions): Fix logic.
1677 (gfc_intrinsic_func_interface): Use gfc_notify_std.
1678 * check.c (check_rest): Use gfc_notify_std.
1679 * match.c (gfc_match_pause): Ditto.
1680 (gfc_match_assign): Ditto.
1681 (gfc_match_goto): Ditto.
1682 * resolve.c (resolve_branch): Ditto.
1683 * lang.opt: Add std=<foo> and w.
1684 * options.c (gfc_init_options): Set allow_std and warn_std.
1685 (gfc_handle_option): Handle OPT_std_* and OPT_w.
1687 2004-01-01 Paul Brook <paul@codesourcery.com>
1689 * array.c (gfc_append_constructor): Take constructor, not expression.
1690 * data.c (struct gfc_expr_stack): Remove.
1691 (expr_stack): Remove.
1692 (find_con_by_offset): Rename from find_expr_in_con.
1693 (find_con_by_component): Rename from find_component_in_con.
1694 (gfc_get_expr_stack): Remove.
1695 (gfc_assign_data_value): Rewrite.
1696 (gfc_expr_push): Remove.
1697 (gfc_expr_pop): Remove.
1698 (gfc_advance_section): Rename from
1699 gfc_modify_index_and_calculate_offset. Handle unbounded sections.
1700 (gfc_get_section_index): Handle unbounded sections.
1701 * gfortran.h: Update prototypes.
1702 * resolve.c (check_data_variable): Array section maight not be the
1705 2004-01-01 Paul Brook <paul@codesourcery.com>
1708 * resolve.c (resolve_symbol): Allow assumed length function results.
1710 2004-01-01 Steve Kargl <sgk@troutmask.apl.washington.edu>
1712 * match.c (gfc_match_pause): Fix spelling.
1714 2004-01-01 Steven Bosscher <stevenb@suse.de>
1717 * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
1718 reference from the expression.
1720 2003-12-26 Feng Wang <fengwang@nudt.edu.cn>
1722 * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
1724 * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
1725 (gfc_exec_op): New EXEC_LABEL_ASSIGN.
1726 (symbol_attribute):New variable attribute: assign.
1727 * io.c (resolve_tag):Integer variable is allowed.
1728 (match_dt_format): Add ASSIGN statement. Set assign flag.
1729 * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
1730 (gfc_match_assign): Add ASSIGN statement. Set assign flag.
1731 (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
1732 * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
1733 (next_statement): Add ST_LABEL_ASSIGNMENT.
1734 (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
1735 * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
1736 (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
1737 * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
1738 * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
1739 assign. Put them into the stuct lang_decl.
1740 * trans-io.c (set_string): Add the assign statement.
1741 * trans-stmt.c (gfc_trans_label_assign): New function.
1742 (gfc_trans_goto): Translate ASSIGNED GOTO statement.
1743 * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
1744 * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
1745 * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
1746 (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
1747 (GFC_DECL_ASSIGN(node)): New macro to access flag.
1749 2003-12-31 Huang Chun <chunhuang73@hotmail.com>
1752 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
1755 2003-12-22 Toon Moene <toon@moene.indiv.nluug.nl>
1757 * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
1758 that arguments to subroutines/functions can't alias themselves, nor global
1761 2003-12-20 Steven Bosscher <stevenb@suse.de>
1763 * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
1764 * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
1766 2003-12-12 Huang Chun <chunhuang73@hotmail.com>
1768 * primary.c (match_substring): Fix substring bug for start point
1769 or end point is NULL.
1770 * trans-expr.c (gfc_conv_substring): Ditto
1771 * trans-types.c (gfc_sym_type): Get correct type of scalar
1772 character variables.
1773 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
1776 2003-12-10 Richard Henderson <rth@redhat.com>
1778 * options.c (gfc_post_options): Don't ever use rtl inlining.
1780 2003-12-05 Canqun Yang <canqun@nudt.edu.cn>
1782 * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
1783 * trans-equivalence.c: Remove.
1784 * trans-decl.c (gfc_get_symbol_decl): Update to match.
1785 (gfc_generate_function_code): Ditto.
1786 * trans-array.c (gfc_conv_array_parameter): Ditto.
1787 * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
1788 (F95_ADDITIONAL_OBJS): Add stor-layout.o
1789 * trans.h (gfc_trans_equivalence): Remove.
1790 * gfortran.h (struct gfc_equiv): Add used field.
1791 (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
1792 equiv_offset fields.
1794 2003-12-05 Richard Henderson <rth@redhat.com>
1796 * trans.c (gfc_build_addr_expr): New.
1797 (gfc_build_indirect_ref, gfc_build_array_ref): New.
1798 * trans.h: Declare them.
1799 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
1800 trans-stmt.c, trans.c (*): Use them.
1802 * f95-lang.c (gfc_post_options): Remove dead prototype.
1803 * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
1804 * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
1807 2003-12-01 Feng Wang <fengwang@nudt.edu.cn>
1809 * io.c (gfc_match_format): Check for missing format label.
1811 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
1814 * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
1815 from interfaces in modules.
1817 2003-11-30 Paul Brook <paul@nowt.org>
1819 * trans-array.c (gfc_trans_g77_array): Make non-static.
1820 (gfc_trans_assumed_size): Remove.
1821 (gfc_trans_dummy_array_bias): Explicitly free temporary.
1822 * trans-array.h (gfc_trans_g77_array): Add prototype.
1823 (gfc_trans_assumed_size): Remove.
1824 * trans-decls.c (gfor_fndecl_push_context): Remove.
1825 (gfor_fndecl_pop_context): Remove.
1826 (gfc_build_function)decls): Don't create them.
1827 (gfc_trans_deferred_vars): Update to match. Remove dead code.
1828 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
1830 2003-11-30 Kejia Zhao <kejia_zh@nudt.edu.cn>
1832 * trans-array.c (gfc_conv_array_parameter): Simplify
1833 array argument passing for array name actual argument.
1834 * trans-expr.c (gfc_conv_function_call): Ditto
1835 * trans-types.c (gfc_is_nodesc_array):Ditto.
1837 2003-11-30 Paul Brook <paul@nowt.org>
1839 * f95-lang.c (gfc_post_options): Move ...
1840 * options.c (gfc_post_options): .. to here. Handle inlining options.
1841 * gfortran.h (gfc_post_options): Add prototype.
1843 2003-11-28 Richard Henderson <rth@redhat.com>
1845 * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
1847 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
1849 * trans.h (has_alternate_specifier): New global variable.
1850 * match.c (gfc_match_call): Handle actual arguments associated with
1851 alternate return indicators.
1852 * trans-expr.c (gfc_conv_function_call): Ditto
1853 * trans-stmt.c (gfc_trans_call): Ditto
1854 (gfc_trans_return): Handle return statement with value.
1855 * trans-decl.c (gfc_generate_function_code): Handle functions with
1857 (gfc_get_fake_result_decl): Ditto
1858 * trans-types.c (gfc_get_function_type): Ditto
1859 * resolve.c (resolve_actual_arglist): Check alternate return indicators.
1860 (resolve_formal_arglist): Check asterisk dummy.
1862 2003-11-27 Paul Brook <paul@nowt.org>
1864 * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
1865 allocation interface.
1866 (gfc_conv_ array_parameter): Ditto.
1867 (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
1868 * trans-array.c: Update prototype.
1869 * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
1870 (gfc_trans_auto_character_variable): Use new memory alloc interface.
1871 * trans-expr.c (gfc_conv_string_tmp): Ditto.
1872 (gfc_conv_function_call): Use gfc_conv_string_tmp.
1873 * trans-stmt.c (gfc_do_allocate): Use new memory alloc interface.
1874 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
1875 * trans.h (gfc_ss_info): Remove unused pdata field.
1876 * trans.c (gfc_create_var_np): Change T to V.
1878 2003-11-26 Richard Henderson <rth@redhat.com>
1880 * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
1881 * trans-intrinsic.c (gfc_intrinsic_map): ... here. Add SCALE,
1882 FRACTION, NEAREST, SET_EXPONENT.
1883 (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
1884 Fix GTY marking. Remove unnecessary const's.
1885 (LIBM_FUNCTION): Rename from I_LIB.
1886 (LIBF_FUNCTION): New.
1887 (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
1888 conventions. Assume the expr signature is correct. Mark const.
1889 (gfc_conv_intrinsic_exponent): Use library functions.
1890 (gfc_conv_intrinsic_set_exponent): Remove.
1891 (gfc_conv_intrinsic_scale): Remove.
1892 (gfc_conv_intrinsic_nearest): Remove.
1893 (gfc_conv_intrinsic_fraction): Remove.
1894 (gfc_conv_intrinsic_function): Update.
1895 * trans-decl.c (gfor_fndecl_math_exponent4): New.
1896 (gfor_fndecl_math_exponent8): New.
1897 (gfc_build_intrinsic_function_decls): Set them.
1898 * trans.h: Declare them.
1900 2003-11-25 Canqun Yang <canqun@nudt.edu.cn>
1902 * trans-common.c (gfc_layout_global_equiv): Locate the error for
1903 underflow COMMON block.
1904 (gfc_trans_one_common): Fix bug for size of COMMON block containing
1905 EQUIVALENCE object. Also fix typo in an error message.
1907 2003-11-25 Diego Novillo <dnovillo@redhat.com>
1909 * Make-lang.in: Add check-gfortran to lang_checks.
1910 (check-f95): Alias for check-gfortran.
1912 2003-11-25 Jason Merrill <jason@redhat.com>
1914 * Make-lang.in (f95.tags): Create TAGS.sub files in each
1915 directory and TAGS files that include them for each front end.
1917 2003-11-24 Paul Brook <paul@nowt.org>
1920 * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
1922 2003-11-24 Paul Brook <paul@nowt.org>
1924 * expr.c (simplify_const_ref): Return SUCCESS for things we don't
1926 * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
1928 2003-11-24 Paul Brook <paul@nowt.org>
1931 * array.c (gfc_array_ref_shape): Handle elemental dimensions.
1932 * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
1934 2003-11-20 Richard Henderson <rth@redhat.com>
1936 * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
1937 (gfc_conv_array_base): Likewise.
1938 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
1939 * trans-expr.c (gfc_conv_string_tmp): Likewise.
1940 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
1941 * trans-stmt.c (gfc_trans_character_select): Likewise.
1943 2003-11-13 Paul Brook <paul@nowt.org>
1945 * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
1947 2003-11-13 Canqun Yang <canqun@nudt.edu.cn>
1949 * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
1950 (resolve_equivalence): New function.
1951 (resolve_equivalence_derived): New function.
1953 2003-11-12 Richard Henderson <rth@redhat.com>
1955 * trans.c (gfc_trans_code): Use annotate_with_locus instead of
1956 annotate_all_with_locus.
1958 2003-11-11 Canqun Yang <canqun@nudt.edu.cn>
1960 * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
1961 * trans-decl.c (gfc_finish_var_decl): Modified.
1963 2003-11-08 Paul Brook <paul@nowt.org>
1966 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
1969 2003-11-06 Paul Brook <paul@nowt.org>
1971 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
1973 2003-11-02 Canqun Yang <canqun@nudt.edu.cn>
1975 * match.c (gfc_match_stopcode): Assign '0' to stop_code.
1977 2003-10-27 Anthony Green <green@redhat.com>
1979 * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
1980 (f95.stagefeedback): Ditto.
1982 2003-10-27 Andrew Pinski <pinskia@physics.uc.edu>
1985 * Make-lang.in (f95.stageprofile): Add.
1986 (f95.stagefeedback): Add.
1988 2003-10-23 Richard Henderson <rth@redhat.com>
1990 * f96-lang.c (gfc_gimplify_expr): Remove.
1991 (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
1992 (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
1994 2003-10-23 Richard Henderson <rth@redhat.com>
1996 * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
1998 2003-10-20 Paul Brook <paul@nowt.org>
2000 * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
2001 * trans-stmt.c (gfc_trans_do_while): Ditto.
2003 2003-10-17 Paul Brook <paul@nowt.org>
2005 * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
2007 2003-10-17 Paul Brook <paul@nowt.org>
2009 * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
2011 2003-10-17 Feng Wang <wf_cs@yahoo.com>
2013 * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
2014 (gfc_resolve_minloc): Ditto.
2015 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
2016 Return the value after subtracting the lower bound.
2018 2003-10-16 Richard Henderson <rth@redhat.com>
2020 * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
2022 2003-10-16 Steven Bosscher <steven@gcc.gnu.org>
2024 * lang.c: Remove -M option for now, it's in the way for C.
2026 2003-10-14 Jason Merrill <jason@redhat.com>
2028 * Make-lang.in (f95.tags): New rule.
2030 2003-10-13 Richard Henderson <rth@redhat.com>
2032 * trans.c (gfc_trans_code): Use annotate_all_with_locus.
2034 2003-10-13 Paul Brook <paul@nowt.org>
2036 * trans-decl.c (generate_local_decl): Don't create junk variables.
2038 2003-10-13 Paul Brook <paul@nowt.org>
2040 * resolve.c (resolve_formal_arglist): Use function result decl in
2041 preference to function decl.
2043 2003-10-12 Richard Henderson <rth@redhat.com>
2045 * f95-lang.c (gfc_define_builtin): New const_p argument. Set
2046 TREE_READONLY. Update all callers.
2048 2003-10-12 Feng Wang <wf_cs@yahoo.com>
2050 * iresolve.c (gfc_resolve_cshift): Change to match implementation.
2051 * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
2052 (gfc_is_intrinsic_libcall): Add CSHIFT.
2054 2003-10-12 Richard Henderson <rth@redhat.com>
2056 * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
2057 (gfc_trans_array_constructor_value): Likewise.
2058 (gfc_conv_array_initializer): Likewise.
2059 * trans-stmt.c (gfc_trans_character_select): Likewise.
2061 2003-11-12 Kejia Zhao <kejia_zh@yahoo.com.cn>
2063 * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
2065 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
2067 * check.c (gfc_check_repeat): Check arguments are scalar.
2068 (gfc_check_trim): New function.
2069 * intrinsic.h (gfc_check_trim): Add prototype.
2070 * intrinsic.c (add_functions): Use it.
2071 * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
2073 * trans-decl.c: Ditto.
2074 (gfc_build_intrinsic_fucntion_decls): Set them.
2075 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
2076 (gfc_conv_intrinsic_trim): New function.
2077 (gfc_conv_intrinsic_repeat): New function.
2078 (gfc_conv_intrinsic_function): Use them.
2080 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
2082 * trans-types.c (gfc_sym_type): Handle result variables.
2084 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
2086 * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
2087 gfc_get_character_type.
2089 2003-10-11 Feng Wang <wf_cs@yahoo.com>
2091 * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
2093 2003-10-11 Paul Brook <paul@nowt.org>
2095 * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
2096 (gfc_resolve_dprod): New function.
2097 (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
2098 * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
2099 (gfc_resolve_dprod): Declare.
2100 * intrinsic.c (add_functions): Use them.
2101 * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
2103 2003-10-06 Richard Henderson <rth@redhat.com>
2105 * f95-lang.c (gfc_init_builtin_functions): Add clzll.
2106 * trans-intrinsic.c (call_builtin_clz): Use it.
2108 2003-10-05 Paul Brook <paul@nowt.org>
2110 * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
2111 * trans-decl.c (gfc_generate_function_code): Set
2112 cfun->function_end_locus.
2114 2003-09-24 Jason Merrill <jason@redhat.com>
2116 * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
2119 2003-09-21 Lifang Zeng <zlf605@hotmail.com>
2120 Paul Brook <paul@nowt.org>
2122 * Make-lang.in (F95_OBJS): Add fortran/data.o.
2123 * array.c (gfc_inser_constructor): New function.
2124 (gfc_get_constructor): New function.
2125 (gfc_free_constructor): Initialize offset and repeat.
2126 (iterator_stack): Remove.
2127 (expand_info): Add offset, component and repeat fields.
2128 (expand_constructor): Set them.
2129 (expand): Set new fields.
2130 (gfc_copy_constructor): Ditto. Avoid recursion.
2131 * gfortran.h: Add prototypes for new functions.
2132 (gfc_constructor): Add offset, component and repeat.
2133 (iteratio_stack): Move to here.
2134 * resolve.c (check_data_variable): Convert data values into variable
2136 (traverse_data_list): Build implicit loop chain.
2137 (gfc_resolve): Ditto.
2138 * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
2139 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
2140 * trans-expr.c (gfc_conv_structure): Handle array initializers.
2141 (gfc_conv_expr): Update to match.
2142 * trans.h (gfc_conv_structure): Declare.
2145 2003-09-20 Kejia Zhao <kejia_zh@yahoo.com.cn>
2147 * trans.h: Add declarations for gfor_fndecl_si_kind and
2148 gfor_fndecl_sr_kind.
2149 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
2150 * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
2151 (g95_conv_intrinsic_sr_kind): New function.
2152 (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
2155 2003-09-17 Lars Segerlund <Lars.Segerlund@comsys.se>
2157 * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
2158 instead of _4 and _8 as postfix for libgfortran calls.
2160 2003-09-16 Paul Brook <paul@nowt.org>
2162 * array.c (compare_bounds): New function.
2163 (gfc_compare_array_spec): Use it.
2165 2003-09-14 Paul Brook <paul@nowt.org>
2167 * primary.c (gfc_match_rvalue): Make sure sym->result is set.
2168 * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
2170 2003-09-14 Paul Brook <paul@nowt.org>
2172 * check.c (dim_rank_check): Allow assumed bounds if requested.
2173 (gfc_check_lbound): Call it.
2174 (gfc_check_ubound): Ditto.
2175 (gfc_check_size): Change to match.
2176 * simplify.c (gfc_simplify_bound): New function.
2177 (gfc_simplify_lbound): New function.
2178 (gfc_simplify_ubound): New function.
2179 * intrinsic.h: Declare them.
2180 * intrinsic.c (add_functions): Use them.
2182 2003-09-14 Paul Brook <paul@nowt.org>
2184 * io.c (format_lex): Initialize negative_flag.
2185 (check_format): Intialize repeat.
2186 * trans-io.c (gfc_new_nml_name_expr): Declare static.
2187 (gfc_new_var_expr): Ditto.
2189 2003-09-14 Paul Brook <paul@nowt.org>
2191 * trans-array.c (gfc_conv_array_initializer): Handle derived types.
2192 * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
2194 2003-09-12 Paul Brook <paul@nowt.org>
2196 * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
2198 2003-09-12 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
2200 * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
2201 for a correct expression.
2203 2003-09-10 Kejia Zhao <kejia_zh@yahoo.com.cn>
2205 * trans-intrinsic.c (real_compnt_info): New struct.
2206 (prepare_arg_info): New function.
2207 (gfc_conv_intrinsic_set_exponent): New function.
2208 (gfc_conv_intrinsic_scale): New function.
2209 (gfc_conv_intrinsic_nearest): New function.
2210 (gfc_conv_intrinsic_fraction): New function.
2211 (gfc_conv_intrinsic_exponent): New function.
2212 (gfc_conv_intrinsic_spacing): New function.
2213 (gfc_conv_intrinsic_rrspacing): New function.
2214 (gfc_conv_intrinsic_function): Use them.
2216 2003-08-24 XiaoQiang Zhang (zhangapache@yahoo.com>
2218 * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
2219 build_int_2 changed from (high, low) to (low, high).
2220 * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
2221 ioparm_namelist_read_mode, iocall_set_nml_val_int,
2222 iocall_set_nml_val_float, iocall_set_nml_val_char,
2223 iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
2224 (gfc_build_io_library_fndecls): Add variable initialization.
2225 (gfc_new_nml_name_expr, get_new_var_expr): New function.
2226 (build_dt): Add namelist support.
2227 * io.c (value): New variable.
2228 (check_format): Support FMT_H now.
2230 2003-09-07 Paul Brook <paul@nowt.org>
2232 * io.c (gfc_resolve_dt): Error if format label is not defined.
2234 2003-09-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
2236 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
2237 about case_switch's break. The other is about building the condition
2238 statement tree, which judges the argument in the range of the
2239 corresponding integer type.
2240 * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
2241 for the large values.
2243 2003-09-05 Paul Brook <paul@nowt.org>
2245 * f95-lang.c (expand_function_body): Gimplify the function.
2247 2003-09-04 Jeff Law <law@redhat.com>
2249 * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
2252 2003-09-04 Paul Brook <paul@nowt.org>
2254 * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
2255 (gfc_expand_stmt): New function.
2256 (LANG_HOOKS_RTL_EXPAND_STMT): Define.
2257 (expand_function_body): Use tree_rest_of_compilation.
2258 * trans-decl.c (gfc_generate_function_code): Don't free cfun.
2260 2003-09-03 Jeff Law <law@redhat.com>
2262 * f95-lang.c (gfc_init_builtin_functions): C arrays start at
2265 2003-08-30 Paul Brook <paul@nowt.org>
2267 * f95-lang.c (builtin_function): Remove #if 0 code.
2268 (gfc_define_builtin): New function.
2269 (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
2270 * mathbuiltins.def: New file.
2271 * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
2272 (gfc_intrinsic_map): Use mathbuiltins.def.
2273 (gfc_intrinsic_builtin_t): Remove.
2274 (gfc_build_intrinsic_lib_fndecls): Update.
2275 * trans-types.c (gfc_init_types): Remove redundant initilaization of
2276 signed_size_type_node.
2278 2003-08-29 Paul Brook <paul@nowt.org>
2280 * arith.c (gfc_real_kinds): Use correct minimum exponents.
2282 2003-08-22 Kejia Zhao <kejia_zh@yahoo.com.cn>
2284 * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
2285 (gfc_conv_intrinsic_function): Add MODULO.
2287 2003-08-22 Jason Merrill <jason@redhat.com>
2289 * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
2291 2003-08-22 Andreas Jaeger <aj@suse.de>
2293 * Make-lang.in (f95.install-common): Add DESTDIR support.
2294 * (f95.install-info): Likewise.
2295 (f95.uninstall): Likewise.
2297 2003-08-19 Diego Novillo <dnovillo@redhat.com>
2299 * trans-types.c (gfc_init_types): Initialize
2300 signed_size_type_node with size_type_node.
2302 2003-08-18 Paul Brook <paul@nowt.org>
2304 * dependency.c (gfc_dependency): New enum.
2305 (check_another_array_ref): Remove.
2306 (gfc_get_array_from_component): Remove.
2308 (get_range): Remove.
2309 (get_no_of_elements): Use mpz_t, not mpf_t.
2310 (transform_sections): New function.
2311 (gfc_check_range_range): Rename ...
2312 (gfc_check_section_vs_section): ... to this. Use new function.
2313 (gfc_is_inside_range): Rewrite to match.
2314 (gfc_check_element_vs_section): Ditto.
2315 (gfc_check_element_vs_element): Ditto.
2317 (gfc_dep_resolver): Ditto. Remove unused parameter.
2318 * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
2319 gfc_check_element_vs_element, gfc_is_inside_range,
2320 gfc_get_array_from_component): Remove prototypes for static functions.
2321 (gfc_dep_resolver): Update prototype.
2322 * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
2324 2003-08-15 Paul Brook <paul@nowt.org>
2326 * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
2327 return values to parent scope.
2328 (gfc_build_dummy_array_decl): Ditto.
2330 2003-08-14 Paul Brook <paul@nowt.org>
2332 * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
2333 size of the type, not the pointer.
2334 * resolve.c (resolve_symbol): Give more accurate error message.
2336 2003-08-10 Paul Brook <paul@nowt.org>
2338 * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
2340 2003-08-10 Paul Brook <paul@nowt.org>
2342 * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
2345 2003-08-10 Chun Huang <compiler@sohu.com>
2347 * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
2348 (resolve_symbol): Ditto.
2349 * trans-expr.c (gfc_conv_statement_function): New function.
2350 (gfc_conv_function_expr): Use it.
2352 2003-08-10 Paul Brook <paul@nowt.org>
2354 * trans-array.c (gfc_conv_ss_startstride): Handle functions.
2355 (walk_function_expr): Set section rank.
2356 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
2358 2003-08-10 Paul Brook <paul@nowt.org>
2360 * intrinsic.c (add_sym): Prefix names with correct string.
2361 (add_sym_0s): New function.
2362 (add_subroutines): Register abort.
2364 2003-08-10 Erik Schnetter <schnetter@uni-tuebingen.de>
2366 * gfortran.h: Introduce options to control the mangling.
2367 * lang.opt: Likewise.
2368 * options.c (gfc_init_options): Handle the options.
2369 * trans-common.c (gfc_sym_mangled_common_id): New function.
2370 (gfc_build_common_decl): Call it.
2371 * trans-decl.c (gfc_sym_mangled_function_id): New function.
2372 (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
2374 2003-08-09 Paul Brook <paul@nowt.org>
2376 * module.c (mio_symbol): Always ouput a namespace for formal args.
2377 (load_needed): Namespace now belong to their proper symbol.
2378 (gfc_dump_module): Change G95=>GFORTRAN.
2380 2003-08-05 Paul Brook <paul@nowt.org>
2382 * options.c: Force -fg77-calls.
2384 2003-08-02 Paul Brook <paul@nowt.org>
2386 * Makelang.in: Rename G95_* to GFORTRAN_*.
2387 * All sources: Rename G95_* to GFC_*.
2389 2003-08-01 Paul Brook <paul@nowt.org>
2391 * fortran/Make-lang.in: Use GMPLIBS.
2392 * fortran/config-lang.in: Set need_gmp.
2393 * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
2395 2003-07-27 Andreas Jaeger <aj@suse.de>
2397 * trans-decl.c (gfc_generate_constructors): Convert prototype to
2399 * trans-const.c (gfc_init_constants): Likewise.
2400 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
2402 * gfortranspec.c: Convert to ISO C90.
2403 (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
2405 2003-07-26 Paul Brook <paul@nowt.org>
2407 * lang.opt: Add -fdump-parse-tree.
2408 * options.c (gfc_handle_option): Ditto.
2409 * resolve.c (resolve_forall_iterators): Convert to proper type.
2410 * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
2412 2003-07-26 Paul Brook <paul@nowt.org>
2414 * Makefile.in: Add build dependencies on files common with rest of gcc.
2416 2003-07-26 Lifang Zeng <zlf605@hotmail.com>
2418 * trans.h: Declare g95_trans_pointer_assignment.
2419 * trans-expr.c (g95_trans_pointer_assignment): New function.
2420 (g95_trans_pointer_assign): Use it.
2421 * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
2422 (g95_trans_pointer_assign_need_temp): New function.
2424 2003-07-26 Paul Brook <paul@nowt.org>
2426 * gfortran.texi: Replace references to g95.
2428 2003-07-26 Paul Brook <paul@nowt.org>
2430 Rename g95_* to gfc_*.
2432 2003-07-25 Paul Brook <paul@nowt.org>
2434 * gfortran.h: Rename from g95.h.
2435 * trans-types.c (boolean_type_node, booelan_true_node,
2436 boolean_false_node): Remove.
2437 * trans-types.h: Ditto.
2439 2003-07-25 Chun Huang <compiler@sohu.com>
2441 * parse.c (accept_statement): Implement BLOCK DATA statement.
2442 * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
2445 2003-07-24 Lifang Zeng <zlf605@hotmail.com>
2447 * trans-stmt.c (temporary_list): Define.
2448 (g95_trans_assign_need_temp): New function.
2449 (g95_trans_forall_1): Modified for WHERE.
2450 (g95_trans_where_assign): Modified.
2451 (g95_trans_where_2): Modified.
2452 (g95_evaluate_where_mask): Modified.
2453 (g95_trans_where): Modified.
2454 (g95_get_temp_expr): Removed.
2455 (g95_add_to_where_stmt_list): Removed.
2456 (compute_overall_iter_number): Modified for WHERE.
2457 * trans.h: Remove where_stmt_list.
2459 2003-07-24 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2461 * lang.opt: Correct description of options -J and -M.
2463 2003-07-23 Steven Bosscher <steven@gcc.gnu.org>
2465 * lang.opt: Move help text to here.
2466 * lang-options.h: Remove.
2468 2003-07-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2469 * iresolve.c (g95_resolve_transpose): Proper variable in switch.
2470 * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
2473 2003-07-22 Steven Bosscher <steven@gcc.gnu.org>
2474 Paul Brook <paul@nowt.org>
2476 * check.c (check_rest): Use global pedantic flag.
2477 * io.c (data_desc): Ditto.
2478 * error.c (g95_warning, g95_warning_now): Use global flag.
2479 * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
2480 (expand_function_body): Update to new prototypes.
2481 (g95_init): Use new option names.
2482 * g95.h (g95_option_t): Standardize names.
2483 (g95_init_options, g95_handle_option): Update prototypes.
2484 * interface.c: Use new option names.
2491 * simplify.c: Ditto.
2493 * trans-array.c: Ditto.
2494 * trans-expr.c: Ditto.
2495 * trans-types.c: Ditto.
2496 * trans-decl.c: Ditto.
2497 (g95_build_library_function_decl): Remove obsolete VPARAMS.
2499 * options.c (g95_display_help): Remove.
2500 (g95_init_options): Convert to new scheme.
2502 (g95module_option): Ditto, rename from g95_parse_arg.
2503 (g95_handle_module_path_options): New function.
2504 * trans-equivalence.c: Fix error message.
2505 * lang.opt: Corrections.
2507 2003-07-21 Steven Bosscher <steven@gcc.gnu.org>
2509 * lang.opt: New file.
2511 2003-07-21 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2513 * decl.c (match_attr_spec): Set colon_seen.
2515 2003-07-14 Paul Brook <paul@nowt.org>
2517 * trans-array.c: Update comment.
2518 (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
2519 * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
2520 minmaxloc,minmaxval): Ditto.
2521 * trans-io.c (g95_trans_transfer): Ditto.
2522 * trans-stmt.c: Remove unneeded prototypes.
2523 (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
2524 (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
2525 (compute_inner_temp_size): Remove bits of dead code. Add comments.
2526 Don't share loopinfo.
2527 (compute_overall_iter_number): Declare as static.
2528 (allocate_temp_for_forall_nest): Ditto.
2529 (g95_trans_forall_1): Don't pass shared loopinfo.
2530 * trans.c (g95_start_block): Expand comment.
2532 2003-07-12 Paul Brook <paul@nowt.org>
2534 * arith.c (g95_index_integer_kind): Remove unused initializer.
2535 * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
2536 index by size of element.
2537 (generate_loop_for_rhs_to_temp): Ditto.
2538 (allocate_temp_for_forall_nest): Use element size, not index size.
2540 2003-07-11 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2542 * arith.c (g95_index_integer_kind): Add a TODO.
2543 * simplify.c (g95_simplify_nearest): Add a TODO.
2545 2003-07-09 Chun Huang <compiler@sohu.com>
2547 * trans.h: Add declarations for gfor_fndecl_string_scan and
2548 gfor_fndecl_string_verify.
2549 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
2550 * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
2551 (g95_conv_intrinsic_verify): New function.
2552 (g95_conv_intrinsic_function): Add SCAN and VERIFY.
2553 * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
2554 of parameter 'BACK=.TRUE.'
2556 2003-07-05 Lifang Zeng <zlf605@hotmail.com>
2558 * trans-stmt.c (iter_info, forall_info): Define.
2559 (g95_trans_forall_block): Remove.
2560 (g95_trans_forall_loop): Use forall info blocks.
2561 (g95_trans_nested_forall_loop): New function.
2562 (g95_do_allocate): Handle things other than logical masks.
2563 (generate_loop_for_temp_to_lhs): New function.
2564 (generate_loop_for_rsh_to_temp): New function.
2565 (compute_inner_temp_size): New function.
2566 (compute_overall_iter_number): New function.
2567 (allocate_temp_for_forall_nest): New function.
2568 (g95_trans_forall): Move body ...
2569 (g95_trans_forall_1): ... to here. Handle loops with temporaries.
2571 2003-07-02 Paul Brook <paul@nowt.org>
2573 * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
2574 in correct scope. Change callers to match.
2575 * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
2576 * iresolve.c (g95_resolve_reshape): Only use constant shapes.
2578 2003-07-02 Paul Brook <paul@nowt.org>
2580 * trans-array.c (g95_conv_loop_setup): Remove dead var. Use
2581 expression shape for all expressions.
2582 * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
2584 2003-07-03 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2586 * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
2587 g95_parse_arg), intrinsic.c (g95_convert_type): support of
2589 * intrinsic.c, g95.h: Add g95_convert_type_warn,
2590 * resolve.c (g95_resolve_index): Call it.
2592 2003-07-02 Paul Brook <paul@nowt.org>
2594 * iresolve.c (g95_resolve_reshape): Set expression shape.
2595 (g95_resolve_shape): Ditto.
2596 * simplify.c (g95_simplify_shape): Move common code outside condition.
2597 * trans-array.c (g95_conv_array_initializer): Teach it how to count.
2599 2003-07-01 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2601 * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
2604 2003-06-29 Paul Brook <paul@nowt.org>
2606 * array.c (g95_simplify_iterator_var): Don't bother with return value.
2607 * expr.c (find_array_element, find_component_ref): New functions.
2608 (remove_subobject_ref): New function.
2609 (simplify_const_ref): Use them. Rename from simplify_component_ref.
2610 (simplify_ref_chain): New function.
2611 (g95_simplify_expr): Use it. Simplify parameter variable subobjects.
2612 (g95_specification_expr): Simplify the expression.
2613 * resolve.c (resolve_operator): Check simplifications return code.
2614 (g95_resolve_expr): Ditto.
2616 2003-06-26 Paul Brook <paul@nowt.org>
2618 * expr.c (simplify_component_ref): New function.
2619 (g95_simplify_expr): Use it.
2620 * resolve.c (resolve_structure_cons): Handle references.
2622 2003-06-25 Paul Brook <paul@nowt.org>
2624 * trans-io.c (build_dt): Handle internal units.
2626 2003-06-25 Canqun Yang <canqun@yahoo.com.cn>
2628 * trans-common.c (g95_build_common_decl): Array index range starts at 0.
2629 (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
2630 Use g95_array_index_type instead of integer_type_node.
2631 (g95_build_common_decl, g95_set_common_master_type): Use
2632 g95_character1_type_node instead of char_type_node.
2633 * trans-equivalence.c (g95_layout_local_equiv): As above.
2635 2003-06-24 Steven G. Kargl <kargls@attbi.com>
2637 * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
2638 remove last remains of -fquiet.
2640 2003-06-22 Paul Brook <paul@nowt.org>
2642 * resolve.c (resolve_operator): Don't fail if we can't simplify.
2643 (g95_resolve_expr): Ditto.
2644 (resolce_code): Mark as static.
2645 * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
2646 gimplifer doesn't (yet).
2648 2003-06-20 Paul Brook <paul@nowt.org>
2650 * g95.h: Add ST_PAUSE and EXEC_PAUSE.
2651 * match.c (g95_match_if): Add ST_PAUSE.
2652 (g95_match_stopcode): New function.
2653 (g95_match_pause, g95_match_stop): Use it.
2654 * parse.c (g95_ascii_statement): Handle ST_PAUSE.
2655 (decode_stmt, next_statement, parse_executable): Ditto.
2656 * resolve.c (resolve_code): Ditto.
2657 * st.c (g95_free_statement): Ditto.
2658 * trans-stmt.c (g95_trans_pause): New function.
2659 * trans-stmt.h: Declare it.
2660 * trans.c (g95_trans_code): Use it.
2661 * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
2663 (g95_build_builtin_function_decls): Initialize them.
2665 * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
2667 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2669 * io.c (g95_match_open , g95_match_close, g95_match_inquire,
2670 match_filepos): Fix error handling.
2672 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2674 * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
2675 Add assertions on arguments.
2676 * resolve.c (expression_shape): Remove useless &.
2677 * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
2678 g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
2679 g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
2680 g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
2681 g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
2682 g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
2683 (g95_simplify_not, g95_simplify_scale): Add assertions.
2685 2003-06-15 Paul Brook <paul@nowt.org>
2687 Clean up stuff to work with the ssa optimizers.
2688 * convert.c (convert): Handle BOOLEAN_TYPEs.
2689 * f95-lang.c (g95_truthvalue_conversion): Implement.
2690 * trans-array.c (g95_trans_array_constructor_value): Group multiple
2692 * trans.h (g95_truthvalue_conversion): Declare.
2693 * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
2694 * trans-stmt.c (g95_trans_character_select): Don't create array
2695 assignments. Mark labels as indirect jump targets.
2696 * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
2697 (g95_get_dtype_cst): Handle LOGICAL types.
2699 2003-06-14 Paul Brook <paul@nowt.org>
2701 * f95-lang.c (g95_gimplify_expr): New function.
2702 * trans-array.c (g95_trans_array_constructor_value): Don't create
2704 (g95_conv_expr_descriptor): Rename simple->gimple.
2705 * trans-expr.c (conv_expr_op): Use proper logical operators.
2706 * trans-intrinsic.c (build_fixbound_expr): New function.
2707 (build_fix_expr): Ditto.
2708 (g95_conv_intinsic_aint): Use them. Use builtin functions.
2709 (g95_conv_intrinsic_function): Add FLOOR and CEILING.
2711 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2713 * array.c (g95_compare_array_spec): Remove unreachable code.
2714 * expr.c (g95_copy_expr): Likewise.
2715 * intrinsic.c (g95_convert_type): Likewise.
2716 * misc.c (g95_code2string): Likewise.
2717 * simplify.c (g95_simplify_ishft, g95_simplify_real,
2718 g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
2719 * trans-stmt.c (g95_trans_select): Likewise.
2720 * primary.c (extend_ref): Add an assertion.
2721 * simplify.c (g95_convert_constant): Add const.
2722 * intrinsic.h: Remove g95_check_x_ni.
2723 * f95-lang.c (g95_finish): Call g95_release_include_path.
2725 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2727 * resolve.c (resolve_contained_functions): Fix typo introduced on
2730 2003-06-09 Paul Brook <paul@nowt.org>
2732 * g95.h: Include system.h not hwint.h.
2733 * many: use safe-ctype.h not ctype.h. Change isalpha -> ISALPHA, etc.
2734 * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
2736 2003-06-09 Paul Brook <paul@nowt.org>
2738 * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
2739 * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
2740 * trans-decl.c (g95_add_decl_to_functions): Make non-static.
2741 (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
2742 (g95_generate_function_code): Translate COMMON and EQUIVALENCE
2744 * trans.h (g95_trans_equivalence, g95_trans_common,
2745 g95_add_decl_to_function): Declare.
2746 * trans-common.c, trans-equivalence.c: New files.
2748 2003-06-08 Steven Bosscher <steven@gcc.gnu.org>
2750 * intrinsic.c (g95_intrinsic_extension): Remove.
2751 (add_functions): Substitute g95_check_x for g95_check_x_ni
2753 (g95_init_expr_extensions): New function.
2754 (g95_intrinsic_func_interface): Use it.
2755 * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
2756 * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
2757 g95_check_precision, g95_check_present, g95_check_radix,
2758 g95_check_range, g95_check_selected_real_kind): Do not set
2759 g95_intrinsic_extension.
2760 (g95_check_x_ni): Remove now duplicate of g95_check_x.
2762 * expr.c (check_inquiry): Add FIXME, fixup some code style.
2764 2003-06-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2766 * g95.h (ref_type): Name this type explicitly.
2767 * module.c (MIO_NAME): Add specialisations of mio_name.
2768 (mio_symbol_attribute, mio_typespec, mio_array_ref,
2769 mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
2770 (ab_attribute): Name this type explicitly.
2771 (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
2773 2003-06-05 Kejia Zhao <kejia_zh@yahoo.com.cn>
2775 * trans-intrinsic.c (g95_conv_allocated): New function.
2776 (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
2778 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
2780 * f95-lang.c: Don't include g95-support.h
2781 (g95_mark_addressable): Add prototype.
2782 (g95_init_decl_processing): Remove C front end hack.
2783 * f95-tree.c: Remove file.
2784 * support.c: Remove file.
2785 * g95-support.h: Remove file.
2786 * trans-types.c (g95_init_types): Set up boolean
2787 type related tree nodes.
2788 * Make-lang.in: Remove rules for dead files and
2789 dependencies on them.
2791 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
2793 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
2794 C front end dependency. Also, convert.c does not depend on
2795 g95-support.h anymore.
2796 * convert.c: Don't include c-common.h and g95-support.h
2797 * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
2798 (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
2799 stmts_are_full_exprs_p, current_stmt_tree,
2800 current_scope_stmt_stack): Remove.
2801 * g95-support.h (unsigned_conversion_warning): Kill proto.
2802 (boolean_type_node, boolean_true_node, boolean_false_node):
2803 Don't define here. Instead, make then true tree nodes in
2805 * support.c (c_global_trees): Die, C front end, die!!!
2806 (g95_init_c_decl_hacks): Don't touch intmax_type_node,
2807 uintmax_type_node, string_type_node and const_string_type_node.
2808 (decl_constant_value, overflow_warning): Make static functions.
2809 They are in death row too, though.
2810 (default_conversion, c_expand_asm_operands): Remove.
2811 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
2812 trans.c: Don't include c-common.h.
2813 * trans-types.c (boolean_type_node, boolean_true_node,
2814 boolean_false_node): Make them real tree nodes.
2815 * trans-types.h (intmax_type_node, string_type_node,
2816 const_string_type_node): Hack to work around C dependencies
2817 in builtin-types.def.
2819 2003-06-04 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2821 * decl.c (decl_types): Add some iterators-like sentinels.
2822 * decl.c (match_attr_spec): Use them.
2823 Use "decl_types" instead of "int".
2824 Add cast in call to g95_match_strings.
2825 * dump-parse-tree.c (g95_show_namespace): Use "g95_intrinsic_op"
2827 * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
2828 (g95_interface_info): Use "g95_intrinsic_op".
2829 * dump-parse-tree.c (g95_show_namespace): Use them.
2830 * interface.c (g95_check_interfaces): Use them.
2831 * module.c (read_module, write_module): Use them.
2832 * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
2833 Use "g95_intrinsic_op".
2834 * interface.c (check_operator_interface): Use "g95_intrinsic_op".
2835 Add a default case in switch statement.
2836 * intrinsic.h (g95_generic_isym_id): Moved to...
2837 * g95.h (g95_generic_isym_id): here.
2838 (g95_intrinsic_sym): Use "g95_generic_isym_id".
2839 * intrinsic.c (make_generic): Use "g95_generice_isym_id".
2840 * trans-intrinsic.c (g95_intrinsic_map_t,
2841 g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
2842 * match.c (g95_match_intrinsic_op): Add cast in call to
2845 2003-06-03 Steven Bosscher <steven@gcc.gnu.org>
2847 * support.c (skip_evaluation, warn_conversion, lvalue_p,
2848 lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
2849 constant_fits_type_p, convert_and_check,
2850 unsigned_conversion_warning): Remove these ugly remnants
2851 we inherited from the C front end.
2852 (function_types_compatible): Remove '#if 0'-edcode.
2853 (build_modify_expr): Likewise.
2854 (convert_for_assignment): Don't use the deceased functions.
2855 The parameter fundecl is now unused.
2856 (decl_constant_value): Always just return decl. In fact
2857 this function is not used at present, but it might be in
2858 the future, when we start using the tree inliner.
2859 (overflow_warning, default_conversion, c_expand_asm_operands):
2860 Abort when these are called, they are part of the C type
2861 checking implementation and therefore poison to Fortran.
2863 2003-06-04 Steven Bosscher <steven@gcc.gnu.org>
2865 * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
2866 c-pretty-print.o and c-dump.o. Add a comment on why we
2867 depend on c-semantics.c.
2868 * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
2869 Don't use the C front end tree dumper hook to dump the
2870 language specific tree representation -- we don't have
2871 one. So instead, inherit the default langhook.
2873 2003-06-02 Paul Brook <paul@nowt.org>
2875 * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
2877 2003-06-02 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2879 * check.c (g95_check_associated): Use proper types. Remove
2880 extraneous argument in call to g95_error().
2882 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
2884 * resolve.c (resolve_operator): Make logical operands convert to the
2885 type with higher kind.
2887 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
2889 * check.c (g95_check_associated): Make sure both pointer and target has
2890 the same type and rank. Null pointer or array section with vector
2891 subscript as target are not allowed.
2892 * trans.h: Declare gfor_fndecl_associated.
2893 * trans-decl.c: (g95_build_builtin_function_decls): Initialize
2894 gfor_fndecl_associated.
2895 * trans-intrinsic.c (g95_conv_associated): New function.
2896 (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
2898 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
2900 * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
2901 according to POINTER itself rather than TARGET.
2902 (g95_conv_expr_descriptor): Make lbound start at 1.
2903 * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
2905 2003-06-01 Paul Brook <paul@nowt.org>
2907 * expr.c (g95_type_convert_binary): Make it match the standard.
2908 * g95.texi: Remove dead link.
2910 2003-06-01 Steven Bosscher <steven@gcc.gnu.org>
2912 * g95.texi: Cleanup somewhat in preparation for inclusion
2915 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2916 Canqun Yang <canqun@yahoo.com.cn>
2918 * resolve.c (compare_bound_int, resolve_where_shape): Proper return
2920 (g95_find_forall_index): Return proper value.
2921 (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
2922 compare the return value from g95_find_forall_index.
2924 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2925 * g95.h, io.c (g95_st_label): Remove "length".
2926 (g95_symtree): Remove "link".
2927 (g95_case): Remove "code".
2928 * arith.c, arith.h (g95_compare_string, g95_convert_integer,
2929 g95_convert_real): Make an argument pointer to const.
2930 * decl.c (colon_seen): Add a TODO.
2931 * interface.c (g95_compare_types): Fix typo.
2932 * interface.c (compare_interfaces): Preserve value of "p".
2933 * intrinsic.c (sort_actual): Remove "i".
2934 * match.c (g95_match_assign): Proper type in call to g95_match().
2935 * parse.c (next_free): Avoid duplicate call due to macro.
2936 * parse.c (check_statement_label): wrong type in call to g95_error.
2937 * primary.c (match_real_constant): Add a TODO.
2938 * resolve.c (resolve_select): Remove useless conditional.
2939 * simplify.c (g95_simplify_repeat): Proper assignment to
2940 "value.character.string".
2941 * simplify.c (g95_simplify_reshape): Wrong variable in call to
2944 2003-05-20 Canqun Yang <canqun@yahoo.com.cn>
2946 * trans-stmt.c: Remove unnecessary include file defaults.h.
2948 2003-05-19 Lifang Zeng <zlf605@hotmail.com>
2950 * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
2952 (g95_trans_forall): Allow arbitrary number of FORALL indexes and
2953 actual variables used as FORALL indexes.
2955 2003-05-15 Paul Brook <paul@nowt.org>
2957 * trans-array.c (g95_trans_static_array_pointer): Use
2959 (g95_trans_deferred_array): Initialize static array pointers.
2960 * trans-expr.c (g95_conv_function_call): Use formal arglist to
2961 correctly pass POINTER and absent CHARACTER arguments.
2963 2003-05-14 Lifang Zeng <zlf605@hotmail.com>
2965 * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
2966 (g95_resolve_forall_body): Resolve FORALL body.
2967 (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
2968 (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
2969 (g95_find_forall_index): Check whether the FORALL index appears in
2970 the expression or not.
2971 (resolve_code): Modified.
2973 2003-05-14 Paul Brook <paul@nowt.org>
2975 * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
2977 2003-05-13 Paul Brook <paul@nowt.org>
2979 * trans-types.c (g95_max_array_element_size): Now a tree node.
2980 (g95_init_types): Work out max size properly.
2981 (g95_get_dtype_cst): Modify to match.
2983 2003-05-11 Paul Brook <paul@nowt.org>
2985 * trans-io.c (add_case): Create a label decl for case labels.
2987 2003-05-11 Paul Brook <paul@nowt.org>
2989 * arith.c (g95_integer_index_kind): New variable.
2990 * f95-lang.c (g95_init): Move frontend initialization here ...
2991 (g95_post_options): ... from here.
2992 * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
2993 * intrinsic.c (add_functions): Use index kinds.
2994 * iresolve.c: Convert to index_kind where needed.
2995 * resolve.c (g95_resolve_index): Make public, use index_kind.
2996 (resolve_array_ref): Adjust to match.
2997 * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
2998 * trans-stmt.c: Ditto.
2999 * trans-types.c: Ditto.
3000 * trans-types.h (g95_array_index_kind): Remove declaration.
3001 * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
3003 2003-05-07 Paul Brook <paul@nowt.org>
3005 * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
3006 * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
3009 2003-05-07 Paul Brook <paul@nowt.org>
3011 * trans-array.c (trans_static_array_pointer,
3012 g95_trans_array_constructor_value, g95_conv_array_initializer,
3013 g95_conv_structure): CONSTRUCTOR nodes only have one operand.
3014 (g95_add_loop_ss_code): Convert subscripts to the correct type.
3015 * trans-stmt.c (g95_trans_character_select): Ditto.
3016 * trans-types.c (g95_init_types): Ditto.
3018 2003-05-07 Steven Bosscher <steven@gcc.gnu.org>
3020 * f95-lang.c (expand_function_body): Use input_line, not lineno.
3021 * trans-decl.c (g95_generate_function_code,
3022 g95_generate_constructors): Likewise.
3023 * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
3024 g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
3027 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
3028 * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
3029 with components point to the DERIVED type itself, and two DERIVED
3030 type with components point to each other.
3031 * trans-expr.c (g95_conv_componet_ref): Modified
3033 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
3034 * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
3036 (g95_trans_pointer_assign): Implement Nullify.
3038 2003-05-01 Paul Brook <paul@nowt.org>
3040 * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
3041 * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
3043 2003-05-01 Paul Brook <paul@nowr.org>
3045 * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
3046 trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
3049 2003-05-01 Canqun Yang <canqun@yahoo.com.cn>
3051 * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
3054 2003-04-28 Paul Brook <paul@nowt.org>
3056 * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
3057 as their kind suggests.
3058 (g95_resolve_reshape): Ditto.
3060 2003-04-28 Chun Huang <compiler@sohu.com>
3062 * trans-expr.c (g95_conv_substring_expr): New function.
3063 (g95_conv_expr): Use it.
3065 2003-04-28 Paul Brook <paul@nowt.org>
3067 * iresolve.c (g95_resolve_transpose): Make it match the
3069 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
3071 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
3073 * trans-types.c (g95_add_field_to_struct): New function to
3074 add a field to a UNION_TYPE or RECORD_TYPE.
3075 * trans-types.h (g95_add_field_to_struct): Prototype.
3076 (g95_get_derived_type): Use g95_add_field_to_struct to add
3078 * trans-io.c (g95_add_field): Remove.
3079 (ADD_FIELD): Use new g95_add_field_to_struct function.
3080 (ADD_STRING): Likewise.
3081 * trans-stmt.c (g95_trans_select): Likewise.
3082 (g95_add_field): Remove duplicated function.
3084 2003-04-18 Canqun Yang <canqun@yahoo.com.cn>
3086 Port implementation for CHARACTER SELECT from Andy's tree.
3087 * trans-stmt.c (g95_trans_character_select): Implement character
3088 select. (g95_add_field): New function.
3089 * trans-decl.c: Declare 'gfor_gndecl_select_string'.
3090 (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
3091 * g95.h (struct g95_case): Add field 'int n'.
3092 * trans.h: Declare 'gfor_fndecl_select_string'.
3094 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
3096 * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
3097 (g95_insert_bbd): Die on duplicates.
3098 * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
3100 2003-04-14 Steven Bosscher <steven@gcc.gnu.org>
3102 * g95.texi: Require GMP 4.0 -- like we actually
3103 do. Explain the testsuite and what-goes-where.
3104 Don't use undefined texinfo symbol. Break very
3105 long line. Remove finished item from the list
3108 2003-04-11 Canqun Yang <canqun@yahoo.com.cn>
3110 * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
3113 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
3115 * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
3116 (g95_trans_forall_body): New function.
3118 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
3120 * resolve.c (resove_where): New function.
3121 (resolve_where_shape): New function.
3122 (resolve_code): Add call to 'resolve_where'
3123 * trans-stmt.c (g95_trans_where): Modified.
3124 (g95_trans_where_2): New function.
3125 (g95_trans_where_assign): New function.
3126 (g95_evaluate_where_mask): New function.
3127 (g95_add_to_stmt_list): New function.
3128 (g95_get_temp_expr): New function.
3129 * trans.h (where_stmt_list): New structure.
3131 2003-04-10 Paul Brook <paul@nowt.org>
3133 * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
3134 (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
3136 2003-04-10 Steven Bosscher <steven@gcc.gnu.org>
3138 Update after mainline -> tree-ssa-branch merge.
3139 * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
3141 (g95_init): Update for new lang_hooks definition.
3142 (g95_post_options): New langhook.
3143 (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
3144 * scanner.c (g95_new_file): Comment update.
3146 2003-04-09 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3148 * g95.h, lang-options.h: Add -Wimplicit-interface.
3149 * options.c (g95_init_options, g95_parse_arg): Set it.
3150 * interface.c (check_intents): Warn about call with implicit
3152 * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
3155 2003-04-05 Paul Brook <paul@nowt.org>
3157 * iresolve.c (g95_resolve_spread): Don't resole based on type.
3158 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
3160 2003-03-29 Paul Brook <paul@nowt.org>
3162 * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
3163 (g95_resolve_unpack): Ditto.
3164 * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
3165 (g95_conv_intrinsic_function): Use it. Remove PACK and UNPACK.
3166 (g95_is_intrinsic_libcall): Add PACK and UNPACK.
3168 2003-03-25 Paul Brook <paul@nowt.org>
3170 * arith.c (g95_unary_user, g95_user): Remove dead functions.
3172 * array.c (g95_free_array_ref): Ditto.
3174 * symbol.c (g95_use_derived_tree): Ditto.
3175 * intrinsic.c (add_functions): Use simplification for SCALE.
3176 * primary.c (g95_match_rvalue): Test sym, not symtree.
3178 2003-03-25 Paul Brook <paul@nowt.org>
3180 * trans-decl.c (build_function_decl): Add parameter before it gets
3181 turned into a constant.
3182 * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
3183 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
3184 * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
3186 2003-03-22 Paul Brook <paul@nowt.org>
3188 * trans-array.c (g95_conv_array_initializer): Allow scalar
3190 * trans-decl.c (g95_finish_var_decl): Result variables are not
3192 * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
3193 (g95_conv_intrinsic_function): Use it.
3194 * trans-types.h (g95_type_spec): Remove dead declaration.
3196 2003-03-21 Paul Brook <paul@nowt.org>
3198 * trans-decl.c (g95_build_function_decl): Mark string parameters.
3200 2003-03-20 Paul Brook <paul@nowt.org>
3202 * trans-decl.c (g95_build_function_decl): Put character length
3203 parameters at the end of the function declaration.
3204 * trans-expr.c (g95_conv_function_call): Ditto.
3205 * trans-types.c (g95_get_function_type): Ditto.
3207 2003-03-20 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3209 * resolve.c (resolve_formal_arglist): Don't impose intent for
3210 procedure arguments of pure functions.
3211 (resolve_select): Remove redundant assignment.
3213 2003-03-19 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3215 * arith.c (validate_logical), g95.h, options.c (g95_init_options):
3217 * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
3218 * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
3220 * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
3222 * symbol.c (g95_add_type): Fix typo in comment.
3225 2003-03-16 Paul Brook <paul@nowt.org>
3227 * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
3228 * expr.c (g95_build_call): Remove.
3229 * f95-lang.c (puchdecl_top_level): New function.
3230 * g95.h (g95_code): Store resolved symbol, not just the name.
3231 * intrinsic.c (g95_intrinsic_namespace): New global namespace.
3232 (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
3233 (g95_get_intrinsic_sub_symbol): New function.
3234 * iresolve.c (g95_resolve_cpu_time): Use it.
3235 (g95_resolve_random_number): Ditto.
3236 * resolve.c: Set code->resolved_sym instead of code->sub_name.
3237 * trans-decl.c (g95_get_extern_function_decl): Give external decls
3238 the correct DECL_CONTEXT. Add global symbold to the global scope.
3239 * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
3242 2003-03-16 Paul Brook <paul@nowt.org>
3244 * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
3245 * options.c (g95_parse_arg): Ditto.
3246 * module.c (mio_symbol_attribute): Handle the always_explicit bit.
3247 * resolve.c (resolve_formal_arglist): The always_explicit sould be set
3248 for the procedure, not the parameter.
3249 * trans-array.c (g95_trans_g77_array): New function.
3250 (g95_trans_assumed_size): Use it.
3251 (g95_trans_dummy_array_bias): Ditto.
3252 (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
3253 (g95_conv_expr_descriptor): ... to here. Update callers.
3254 * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
3255 (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
3256 * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
3257 * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
3258 * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
3259 (g95_sym_type): Ditto.
3261 2003-03-15 Paul Brook <paul@nowt.org>
3263 * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
3265 * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
3267 2003-03-14 Paul Brook <paul@nowt.org>
3269 * trans-array.c (g95_array_is_packed): Remove.
3270 (g95_conv_array_base): Correctly handle all descriptorless cases.
3271 (g95_conv_array_stride): Use descriptorless strides.
3272 (g95_trans_dummy_array_bias): Don't always repack the array.
3273 (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
3275 * trans-types.c (g95_get_nodesc_array_type): Differentiate between
3276 dummy and non-dummy arrays...
3277 (g95_sym_type, g95_get_derived_type): ... like these.
3278 (g95_get_array_type_bounds): Allow discontiguous arrays.
3280 2003-03-12 Paul Brook <paul@nowt.org>
3282 * array.c (g95_resolve_array_spec): Fix comment.
3283 * g95.h (symbol_attributes): New flag always_explicit.
3284 * resolve.c (resolve_formal_arglist): Set it always_explicit.
3285 * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
3286 * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
3287 (g95_trans_array_bounds): Allow assumed shape arrays.
3288 (g95_trans_repack_array): Remove.
3289 (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
3290 * trans-decl.c (g95_build_qualified_array): Only ignore absent
3291 bounds for assumed size arrays.
3292 (g95_build_dummy_array_decl): Use descriptorless arrays.
3293 * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
3294 (g95_trans_pointer_assign): Fix typo.
3295 * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
3297 (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
3298 * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
3299 Also modify callers.
3300 * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
3302 2003-03-08 Paul Brook <paul@nowt.org>
3304 * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
3305 (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
3306 * resolve.c (compare_spec_to_ref): Allow full array sections.
3308 2003-03-08 Paul Brook <paul@nowt.org>
3310 * expr.c (g95_simplify_expr): Also simplify array index and
3311 substring expressions.
3312 * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
3313 * trans-array.c (g95_trans_array_bounds): New function.
3314 (g95_trans_auto_array_allocation): Use it.
3315 (g95_trans_assumed_size): Rewrite.
3316 * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
3317 (gfor_fndecl_repack): Remove.
3318 (g95_build_qualified_array): Handle absent upper bounds.
3319 (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
3320 (g95_get_symbol_decl): Update.
3321 (g95_build_intrinsic_function_decls): Initialize new decls.
3322 * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
3323 (gfor_fndecl_repack): Remove.
3324 * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
3325 * trans-types.c: (g95_build_array_type): Merge duplicated code..
3326 (g95_get_nodesc_array_type): Handle absent bounds.
3327 * trans-types.h (g95_get_nodesc_array_type): Declare.
3329 2003-03-04 Paul Brook <paul@nowt.org>
3331 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
3334 2003-03-02 Paul Brook <paul@nowt.org>
3336 * options.c (g95_init_options): Drfault to 1.
3337 (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
3338 * trans-array.c (g95_conv_array_data, g95_conv_array_base,
3339 g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
3340 Handle non-constant size automatic arrays.
3341 (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
3342 generic bound functions.
3343 (g95_trans_auto_array_allocation): Don't create a descriptor.
3344 (g95_trans_assumed_size): New function (broken).
3345 (g95_trans_dummy_array_bias): Remove unused var.
3346 * trans-array.h (g95_trans_assumed_size): Declare.
3347 * trans-decl.c (create_index_var): New fuction.
3348 (g95_build_qualified_array): New function.
3349 (g95_get_symbol_decl): Use it.
3350 (g95_trans_deferred_vars): Handle assumed shape seperately.
3351 * trans-types.c (get_element_type): Handle heap allocated arrays.
3352 (g95_is_nodesc_array): Include non-const size arrays.
3353 (g95_get_nodesc_array_type): Ditto.
3355 2003-02-23 Paul Brook <paul@nowt.org>
3357 * trans-array.c (g95_array_init_size): Should use stride, not size of
3360 2003-02-18 Paul Brook <paul@nowt.org>
3362 * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
3363 after intrinsic function check.
3365 2003-02-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3367 * io.c (match_io): Fix missing return value and remove useless
3369 * match.c (g95_match): Remove useless assignment.
3370 * module.c (parse_string): Remove useless post increment.
3371 * simplify.c (g95_simplify_verify): Remove useless assignment.
3373 2003-02-15 Paul Brook <paul@nowt.org>
3375 * expr.c (restricted_intrinsic): Handle bad values gracefully.
3376 * g95.h (symbol_attribute): Add referenced member.
3377 (g95_symbol): Add dummy_order member.
3378 (g95_set_sym_referenced): Declare.
3379 * match.c (g95_match_assignment, g95_match_call): Use it
3380 * primary.c (match_actual_arg, g95_match_rvalue,
3381 g95_match_variable): Ditto.
3382 * symbol.c (next_dummy_order): New variable.
3383 (g95_set_sym_referenced): New function.
3384 (check_done): New function.
3385 (g95_add_*): Use it.
3386 * trans-decl.c: Make formatting conform to GCC standards.
3387 (g95_defer_symbol_init): Add dummy variables in the right order.
3388 (g95_get_symbol_decl): Only accept referenced variables.
3389 (g95_create_module_variable): Module variables are always required.
3390 (generatr_local_decls): New function.
3391 (generate_local_vars): New function.
3392 (g95_generate_function_code): Use it.
3394 2003-02-13 Paul Brook <paul@nowt.org>
3396 * trans-decl.c (g95_conv_struct_cons): Remove.
3397 (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
3398 * trans-expr.c (g95_conv_structure): New function.
3399 (g95_conv_expr): Use it.
3401 2003-02-09 Paul Brook <paul@nowt.org>
3403 * trans-array.c (g95_array_init_size): Don't evaluate the linit
3404 expressions multiple times.
3405 (g95_trans_auto_arry_allocation): Use pointer not tmp.
3407 2003-02-08 Paul Brook <paul@nowt.org>
3409 * module.c (mio_symtree_ref): Declare as static.
3410 (mio_expr): Remove dead code.
3411 (read_module): Set the symtree link for fixups.
3412 * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
3413 (build_round_expr): ... to this.
3414 (g95_conv_intrinsic_aint): New function.
3415 (g95_conv_intrinsic_function): Use it.
3417 2003-02-08 Paul Brook <paul@nowt.org>
3419 * trans-array.c (g95_trans_array_constructor_value): Use the acutal
3420 offset after modificaton, not the increment expression.
3421 * dependency.c: Kill excess whitespace.
3423 2003-02-07 Sanjiv Gupta <sanjivg@noida.hcltech.com>
3425 * dependency.h: Remove some function declarations.
3426 * dependency.c (get_no_of_elements): Change this function not to
3428 * other: Add comments for all modified functions.
3430 2003-02-06 Paul Brook <paul@nowt.org>
3432 * g95spec.c (lang_specific_functions): Fix initializer warning.
3433 * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
3434 for structure type names.
3435 * trans-decl.c (g95_cons_structure_cons): New function.
3436 (g95_get_symbol_decl): Use it.
3437 * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
3440 2003-02-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3442 * resolve.c (compare_cases): Add const to casts.
3444 2003-01-30 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3446 * g95.h (g95_check_f): Change a1 to f1m.
3447 * intrinsic.c (add_sym_1m, check_specific,
3448 g95_intrinsic_func_interface): Use it.
3450 * module.c (init_pi_tree): Remove useless cast.
3451 (fp2): Fix argument type.
3453 * parse.c (parse_select_block): Add comment.
3455 2003-02-05 Toon Moene <toon@moene.indiv.nluug.nl>
3457 * lang-options.h: Fix warning involving C90 concatenated
3460 2003-02-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
3461 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3463 * io.c (format_asterisk): Complete initializer to kill warning.
3464 * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
3465 DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
3466 (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
3467 new defines to complete initializers. Kills all warnings.
3469 * Make-lang.in: Comment cleanup.
3471 2003-02-05 Paul Brook <paul@nowt.org>
3473 * array.c (g95_free_constructor): Handle NULL expressions.
3474 * resolve.c (resolve_structure_cons): Ditto.
3475 * decl.c (g95_match_null): New Function.
3476 (variable_decl): Use it.
3477 * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
3478 * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
3479 * trans-types.c (g95_set_decl_attributes): Remove empty function.
3481 2003-02-05 Paul Brook <paul@nowt.org>
3483 * trans.h (build1_v): New macro.
3484 (build_v): Remove pointless and incorrect prototype.
3485 * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
3486 * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
3488 2003-02-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
3490 * Make-lang.in (F95_OBJS): Remove one more dead file.
3492 2003-02-01 Paul Brook <paul@nowt.org>
3494 * lang-specs.h: Don't pass -ffixed-form to the linker.
3495 * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
3497 2003-02-01 Paul Brook <paul@nowt.org>
3499 * Make-lang.in (F95_OBJS): Remove dead files.
3500 * trans-array.c (g95_array_init_size): Do the right thing when
3502 * trans-decl.c (g95_generate_function_code): Initialize deffered
3503 symbol list before translating contained subroutines.
3504 * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
3505 scalar invariant values here...
3506 (g95_conv_variable, g95_conv_function_call): ... instead of here ...
3507 * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
3509 2003-01-29 Paul Brook <paul@nowt.org>
3511 * trans-array.c (g95_add_loop_code): Put pre code in the right block.
3512 (g95_walk_elemental_function_args): Reverse chains before adding.
3513 (g95_reverse_ss): Move about a bit.
3514 * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
3517 2003-01-28 Paul Brook <paul@nowt.org>
3519 * intrinsic.c (resolve_intrinsic): Use correct union member.
3520 * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
3522 * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
3523 use associated variables.
3524 * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
3525 * trans-expr.c (g95_conv_expr_present): ... to here.
3526 * trans.h: Declare it.
3527 * trans-types.c (g95_sym_type): Assume subroutine if not specified.
3529 2003-01-28 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3531 * array.c (expand_iterator): Suppress useless assignment.
3532 * decl.c (match_char_spec): Ditto.
3533 * io.c (match_io_iterator): Ditto.
3534 * primary.c (match_real_constant): Ditto.
3535 * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
3536 Ditto. Also, use g95_intrinsic_op not int for intrinsic operators.
3537 * matchexp.c (match_add_operand, match_level_5): Likewise.
3538 * module.c (parse_atom, find_enum): Likewise.
3539 * resolve.c: move #include <string.h>
3540 (resolve_select): Fix serious typo.
3542 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.n>
3544 * Make-lang.in: Don't build with broken tree-ssa-pre.
3546 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.nl>
3548 * resolve.c (resolve_index): Add a TODO.
3549 * symbol.c: Remove useless "#include <ctype.h>".
3551 2003-01-27 Paul Brook <paul@nowt.org>
3553 * check.c (check_rest): Allow different type kinds as an extension.
3554 * g95.h (g95_resolve_f): Add f1m.
3555 * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
3556 * intrinsic.h: Chenge prototypes for MIN and MAX.
3557 * iresolve.c (g95_resolve_minmax): New function.
3558 (g95_resolve_min, g95_resolve_max): Use it.
3559 * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
3561 (g95_conv_intrinsic_present): Fix logic.
3563 2003-01-27 Steven Bossche <s.bosscher@student.tudelft.nl>
3565 * g95.h (g95_case): Don't be a tree, be a double linked list.
3566 * match.c (match_case_selector): Remove redundant semantics check.
3567 Clean up a few goto's to make it a tiny little bit faster.
3568 * resolve.c (case_tree): Die.
3569 (compare_cases): Accept and compare unbounded cases too.
3570 (check_case_overlap): Don't build a tree. Instead, merge-sort the
3571 whole list of g95_cases passed from resolve_select.
3572 (sane_logical_select): Die.
3573 (check_case_expr): Return FAILURE if a CASE label is of the wrong
3575 (resolve_select): Fixup case expression for computed GOTOs, put it
3576 in expr, not expr2, for easier handing in the parse tree dumper and
3577 the code generator. Rewrite the rest of the function: Kill
3578 unreachable case labels and unreachable case blocks.
3579 * dump-parse-tree.c (g95_show_code_node): Always dump expr for
3580 an EXEC_SELECT, not case2 anymore.
3581 * trans-const.c (g95_conv_constant_to_tree): New function.
3582 (g95_conv_constant): Use it.
3583 * trans-const.h: Declare prototype for the new function.
3584 * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
3585 g95_trans_character_select): New static functions.
3586 (g95_trans_select): Rewrite.
3588 2003-01-26 Paul Brook <paul@nowt.org>
3590 * intrinsic.c (add_fnctions): Properly add dreal.
3591 * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
3592 (g95_conv_intrinsic_function): Use it.
3593 * trans-io.c (build_dt): Abort on internal files (unimplemented).
3595 2003-01-26 Paul Brook <paul@nowt.org>
3597 Widespread changes to the handling of symbols in expressions. These
3598 are now linked via g95_symtree nodes.
3599 * parse.c (g95_fixup_sibling symbols): New function.
3600 (parse_contained): Use it.
3601 * g95.h (symbol_attribute): Add contained. Indicates a symbol is a
3602 contained procedure that has bee correctly fixed up.
3603 (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
3605 2003-01-24 Paul Brook <paul@nowt.org>
3607 * trans-array.c (g95_walk_expr): Function result attributes are in
3609 * trans-expr.c (g95_conv_function_call,
3610 g95_trans_arrayfunc_assign): Ditto.
3611 * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
3613 2003-01-23 Steven Bosscher <s.bosscher@student.tudelft.nl>
3615 * expr.c (check_restricted): Fix error message.
3616 * symbol.c (free_st_labels): Plug memleak.
3618 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
3620 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
3621 reduce_binary_aa, reduce_binary, eval_intrinsic,
3622 eval_intrinsic_f2): Use typesafe prototypes for eval functions.
3623 * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
3624 for typesafe intrinsics helper functions.
3625 (g95_intrinsic_sym): Use them.
3626 * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
3627 add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
3628 add_sym_5, add_conv, resolve_intrinsic, do_simplify,
3629 check_specific, g95_intrinsic_func_interface,
3630 g95_intrinsic_sub_interface): Adjust all calls to intrinsics
3632 * trans-decl.c (g95_get_extern_function_decl): Likewise.
3633 * Make-lang.in: Don't disable warnings for strict prototypes
3634 any longer, everything is typesafe now.
3636 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
3638 * bbt.c (duplicate_node): Make static.
3639 * module.c (module_name): Make static.
3640 * scanner.c (include_dirs): Make static.
3642 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
3644 Hard coded _gfor_'s should not show up anymore.
3645 * g95.h (PREFIX): New macro.
3646 * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
3648 (g95_resolve_random_number): Likewise.
3649 * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
3650 * trans-io.c: Remove 'prefix' macro. Replace all uses with
3651 the new PREFIX macro from g95.h.
3653 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
3655 The troubles of forking... Andy implemented this just now too.
3656 Let's stick to that and keep the trees close.
3657 * g95.h (g95_st_label): 'format' member is now a g95_expr.
3658 * io.c: Revert previous changes.
3659 (g95_match_format): Match the format string as a character
3661 * match.h (g95_statement_label): Declare external.
3662 * parse.c: Revert previous changes.
3663 * symbol.c (g95_free_st_label): Free a g95_expr instead
3665 * trans-io.c: Revert previous changes.
3666 (build_dt): Use set_string to set the format string.
3668 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
3670 * io.c (format_string): Make non-static.
3671 (g95_match_format): Remember the format string.
3672 (terminate_io): Add I/O termination for empty I/O lists.
3673 * match.h: Declare external format_string.
3674 * parse.c (check_statement_label): Attack the format string
3675 to a format label for FORMAT statements.
3676 * trans-io.c (g95_add_field): Define prefix macro. Replace
3677 all uses of PREFIX define with a use of this macro.
3678 (build_dt): Implement formatted I/O for format labels.
3680 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
3682 * lang-options.h: Kill "-std=F".
3683 * options.c: Remove unimplemented "-std=F". Modify
3685 * misc.c (g95_terminal_width): New function.
3686 * error.c (g95_error_init_1): Use g95_terminal_width.
3687 * g95.h: Add prototype for g95_terminal_width, remove
3690 2003-01-19 Steven Bosscher <s.bosscher@student.tudelft.nl>
3692 * Make-lang.in: Fix typo.
3694 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
3696 * g95.h (struct g95_case): Remove unused cruft, new member
3697 'where' to keep track of the locus of the default case.
3698 * match.c (g95_match_case): Add locus to the current case.
3699 (match_case_selector): Likewise.
3700 * parse.c (parse_select_block): Move semantics check for
3701 multiple DEFAULT cases out of here to...
3702 * resolve.c (check_case_overlap): ...here. Return sooner
3704 (check_case_expr): Take two g95_cases now, use to sure the
3705 expression kinds are the same.
3706 (resolve_select): Cleanup.
3708 2003-01-18 Paul Brook <paul@nowt.org>
3710 * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
3711 * trans-decl.c (g95_set_symbol_decl): Handle non-array result
3713 (g95_get_extern_function_decl): Put decls in the correct context.
3715 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
3717 * trans-io.c: Port changes from Andy to set ERR flag.
3719 2003-01-17 Paul Brook <paul@nowt.org>
3721 * trans-array.c: Add various comments.
3722 (g95_ss_terminator): Declare as const.
3723 (g95_walk_expr): Remove first parameter and update all callers.
3724 (g95_walk_op_expr): Initialize scalar SS properly.
3725 * trans-array.h (g95_walk_expr): Update prototype.
3726 * trans-expr.c: Update for new g95_walk_expr.
3727 * trans-intrinsic.c: Ditto.
3728 * trans-io.c: Ditto.
3729 * trans.h: Various comments for SS chains.
3731 2003-01-17 Paul Brook <paul@nowt.org>
3733 * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
3735 * intrinsic.c (add_functions): Use them.
3736 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
3737 * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
3739 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
3741 Fallout of a small merge conflict:
3742 * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
3744 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
3746 * initrinsic.c: New add_sym_* functions for strong typing.
3747 (add_conv): Make prototype strict.
3748 * dump-parse-tree.c, dependency.c: Include config.h
3749 * resolve.c, trans-io.c: Fix typos.
3751 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
3753 * dump-parse-tree.c (g95_show_code_node): Show the
3754 condition for a computed GOTO that was transformed
3755 to a SELECT CASE construct.
3756 * resolve.c (check_case_overlap): Revert previous switch
3757 to treaps, it was too slow and didn't catch all trouble.
3758 (resolve_symbol): Be more flexible about module procedures.
3759 * symbol.c (check_conflict): Point to relevant section in
3760 the standard for dubious conflict. Allow procedure
3761 dummy arguments to be optional again.
3762 * trans-io (add_field): Rename to g95_add_field. Change
3764 * trans-stmt (trans_select): Handle unbounded cases for
3765 integer SELECT CASE constructs. Fix/add more comment.
3767 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
3769 * g95.h: Uses GCC's function attribute macros.
3770 * error.c, module.c, parse.c, g95.h: More function attributes.
3772 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
3774 * trans-decl.c (get_label_decl): Use TREE_LINENO instead
3775 of DECL_SOURCE_LINE, and TREE_FILENAME instead of
3778 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
3780 * f95-lang.c (pushdecl): Use TREE_LINENO instead of
3782 * trans.c (g95_trans_code): Use annotate_all_with_file_line
3783 instead of nowdead wrap_all_with_wfl.
3785 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
3787 * parse.c (g95_parse_file): In verbose mode, dump the parse tree
3788 before generating code, so we can still see it even if the code
3789 generation phase dies.
3791 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
3793 * decl.c (build_sym): Split out initialization expression parts...
3794 (add_init_expr_to_sym): ...to here.
3795 (variable_decl): Add the symbol following an attribute list to the
3796 symbol tree before parsing the optional initialization expression
3797 if the symbol is not of a derived type.
3798 * primary.c (g95_match_rvalue): Don't assume a symbol always has
3799 a value if it is a PARAMETER.
3801 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
3803 * misc.c: Don't #include <mcheck.h>
3804 * module.c: Ditto. Kill uses of mtrace, muntrace. If there
3805 ever was a glibc bug, then either this was never reported to
3806 glibc people, or it has been fixed for so long that there's
3807 no information you can find about it, anywhere.
3809 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
3812 * module.c (attr_bits, bt_types, array_spec_types):
3813 Switch 'const' and 'static'.
3814 * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
3816 GNU'ify source code:
3817 * trans-io.c: Numerous fixes, one fixed warning and a few
3818 TODO markers so that we don't forget about them.
3820 2003-01-13 Paul Brook <paul@nowt.org>
3822 * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
3823 * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
3825 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
3826 * match.c (g95_match_stop): Fix dumb == -> != error.
3828 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
3830 * dump-parse-tree.c (show_indent): Add line breaks. This
3831 whole dumping process needs cleanups.
3832 * f95-lang.c (g95_mark_addressable): Fix prototype to match
3833 the langhook. Fix 'return's accordingly.
3834 * g95-support.h: Adjust prototype.
3835 * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
3836 * lang-options.h: Add '-fsyntax-only'.
3837 * options.c (g95_init_options): Init 'no_backend'.
3838 (g95_parse_arg): Deal with '-fsyntax-only'.
3839 * parse.c (g95_parse_file): Do not generate code if 'no_backend'
3842 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
3844 * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
3845 arguments. Also make sure that if a symbol is marked INTRINSIC,
3846 an intrinsic with the symbol's name actually exists.
3847 (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
3848 Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
3849 ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
3851 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
3853 * resolve.c (resolve_contained_functions): Fix condition, don't
3854 throw internal_error if a child namespace has no name. Apparently
3855 this can be the case?
3857 2003-01-11 Paul Brook <paul@nowt.org>
3859 Port changes from Andy's tree:
3860 * g95.h (g95_code): Add stop_code.
3861 * match.c (g95_match_stop): Detter syntax checking.
3862 * resolve.c (resolve_generic_f0): Return match type.
3863 (resolve_generic_f): Remove dead/duplicated code.
3864 (resolve_specific_f): Ditto.
3865 * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
3866 * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
3867 * trans-stmt.c (g95_trans_stop): Handle new STOP format.
3869 2003-01-11 Paul Brook <paul@nowt.org>
3871 * trans-array.c: Various documentation/comment changes.
3872 * trans-stmt.c: Ditto.
3875 2003-01-10 Paul Brook <paul@nowt.org>
3877 * options.c/h: Add -fdump-parse-tree as alias of -v.
3879 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3881 * dump-parse-tree.c (g95_show_namespace): Fixed another
3882 typo. Sorry, it's Friday...
3884 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3887 * trans-array.c, trans-array.h, trans.c, trans-const.c,
3888 trans-const.h, trans-decl.c, trans-expr.c, trans.h
3889 trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
3890 trans-types.c: Fix bogus copyright years, add 2003.
3891 * trans-types.h: Give copyright header.
3893 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3895 * dump-parse-tree.c (g95_show_namespace): Fixed typo.
3896 * expr.c, options.c, scanner.c: Add some more 'const' markers.
3897 * intrinsic.c: Some constant strings moved to read-only memory.
3898 * io.c (format_asterisk): Move to...
3901 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3903 * dump-parse-tree.c (g95_show_namespace): Dump implicit
3904 types for ranges instead of per-letter. Indent the
3905 'CONTAINS' just like everything else.
3906 * resolve.c (resolve_contained_functions): Clarify comment.
3907 Explain non-obvious conditional expression. Improve
3908 diagnostics if tyoe cannot be resolved.
3909 Port semi-fix from Andy's tree:
3910 (was_declared): Move up before first use.
3911 (generic_sym, specific_sym): New functions. Code moved
3912 out if procedure_kind.
3913 (procedure_kind): Simplify using new functions.
3914 (resolve_generic_f): Make sure the functions we find in
3915 a parent namespace is generic.
3916 (resolve_specific_f): Ditto for specific functions.
3918 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3920 * trans-stmt.c, trans.c: Fix some code style issues. Add
3921 some more comment (but still not enough!).
3923 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3925 * symbol.c (flavors, procedures, intents, acces_types,
3926 access_types, ifsrc_types): Make const.
3927 * misc.c (g95_string2code): Make 'm' param 'const'.
3928 * module.c (find_enum, write_atom, mio_name): Make
3930 (attr_bits, bt_types, array_spec_types, array_ref_types,
3931 ref_types, expr_types): Make const.
3932 * g95.h: Adjust external decls.
3934 2003-01-09 Paul Brook <paul@nowt.org>
3936 * Testsuite: Add a load of new cases.
3938 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
3940 * Make-file.in: Add dependency on back end header files;
3941 a parallel build should work now.
3942 * f95-lang-c (lang_identifier): Remove bogus comment.
3943 (g95_be_parse_file): Fix prototype.
3944 (g95_init): Make static.
3945 (g95_finish): Make static.
3946 * error.c (g95_syntax_error): Kill. Make define in...
3947 * g95.h (g95_syntax_error): Define.
3948 (g95.options): Make 'source' member 'const'.
3949 * interface.c (g95_match_interface): Explain
3950 hard-to-read condition.
3951 (g95_match_end_interface): Ditto.
3952 * trans_const.c (g95_build_string_const): Make 's' parameter
3954 * trans_const.h: Adjust protoype accordingly.
3955 * trans-decl.c: Include tree-dump.h
3956 (g95_generate_function_code): Build fixes for recent changes
3957 in the tree-ssa branch.
3959 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
3961 * format.c: Kill, move code from here...
3963 * Make-lang.in: Adjust.
3966 * BUGS: Mention where to submit bugs. Move old content...
3967 * TODO: ...to here. New file.
3969 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
3970 Fix most warnings, and suppress the ones we can't fix for now.
3971 * Make-lang.in: Suppress warnings about bad proto's in g95.h,
3972 these warnings just clutter the screen and there's not much
3973 we can do about them for now anyway.
3974 * check.c, iresolve.c: Mark unused function parameters.
3975 * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
3976 they should be resolved before they get here.
3977 * error.c: Remove unused FILE *status_out.
3978 * f95-lang.c (g95_init): Remove bogus cast.
3979 * Many files: Make things 'const' where required.
3980 * g95.h: Fix prototypes for all modified functions above.
3981 (g95_options): Remove 'object' member.
3983 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
3985 * Make-file.in: Cleanup bogus targets. Add more comment.
3986 * lang-options.h: New option '-w'.
3987 * g95.h: add no_options field to struct g95_options.
3988 * options.c (g95_init_options): Default no_warnings to off.
3989 (g95_parse_arg): Recognise the '-w' switch and its alias,
3991 * error.c (g95_warning, g95_warning_now): Don't emit warning if
3992 no_warning option is set.
3993 * iresolve.c (g95_resolve_shape): Fix warning.
3995 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
3997 * primary.c (g95_next_string_char): Rename next_string_char, and
3998 make static. Adjust callers accordingly.
3999 * resolve.c (resolve_generic_f0): Return try, not match. Adjust
4000 callers accordingly.
4001 * g95.h: Split out all g95_match* functions to...
4002 * match.h: ...here. New file.
4003 * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
4004 matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
4006 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
4008 * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
4009 g95_merge_new_implicit): New functions.
4010 (g95_match_implicit_none, g95_match_implicit): Move from here...
4011 * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
4012 Modify to use the new functions in symbol.c.
4013 * g95.h: Add and move prototypes.
4015 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
4017 * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
4018 node compare function.
4019 (g95_insert_bbt): Likewise.
4020 (g95_insert_bbt_with_overlap): Likewise.
4021 (g95_delete_bbt): Likewise.
4022 (delete_treap): Likewise. Also fix a potential bug when calling it.
4023 * module.c (compare_pointers): Change proto to compare_fn.
4024 (compare_integers): Likewise.
4025 (compare_true_names): Likewise.
4026 (find_true_name): Adjust call to compare_true_names to match proto.
4027 (require_atom, write_atom, mio_name): Fix 'const' warnings.
4028 (init_pi_tree): Make compare a compare_fn instead of (int *).
4029 * resolve.c (compare_cases): Change proto to compare_fn.
4030 * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
4031 it static, and rename to compare_symtree.
4032 (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
4034 * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
4035 of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
4037 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
4038 * Make-lang.in: Fix spaces/tabs issues from previous patch.
4039 * patch.options: Blow away Paul's checkin mistake :-)
4040 * io.c (terminate_io): Fix memory leak (Arnaud).
4042 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
4044 * Make-lang.in: Teach about building DVI, info manual.
4045 * g95.texi: New file.
4047 2003-01-02 Paul Brook <paul@nowt.org>
4049 * trans-array.c (g95_reverse_ss): Make static and don't use.
4050 (g95_conv_ss_descriptor): Don't use g95_loopinfo
4051 (g95_conv_array_parameters): Modify for pointer assignments.
4052 (g95_walk_subexpr): New function.
4053 (g95_walk_expr*): Use it.
4054 * trans-array.h (g95_reverse_ss): Remove prototype.
4055 * trans-expr.c (g95_trans_pointer_assign): Implement.
4056 (Many): Set se.want_pointer before calling g95_conv_array_parameter.
4057 * trans-intrinsic.c: Sync with scalarizer changes.
4058 * trans-io.c: Ditto.
4060 2002-12-29 Paul Brook <paul@nowt.org>
4062 * trans-array.c: Document calling convention for arrays.
4064 2002-12-19 Paul Brook <paul@nowt.org>
4066 * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
4067 assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
4068 optional parameters for some intrinsics.
4069 (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
4070 * trans-expr.c (g95_conv_function_call): Pass NULL for absent
4071 optional parameters.
4072 * trans.h (g95_se): Add ignore_optional flag.
4074 2002-12-15 Paul Brook <paul@nowt.org>
4076 * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
4077 * trans-decl.c (g95_generate_function_code): Use TDI_original.
4079 2002-12-14 Paul Brook <paul@nowt.org>
4081 * trans-stmt.c (g95_trans_call): Use resolved symbol name.
4083 2002-12-12 Paul Brook <paul@nowt.org>
4085 * trans-array.c (g95_trans_array_constructor_subarray): Fully
4086 initialize the scalarizer.
4087 (various): Update to new format of g95_expr->value.constructor.
4089 2002-12-08 Paul Brook <paul@nowt.org>
4091 * trans-array.c (g95_put_offset_into_var): New function.
4092 (g95_trans_array_constructor_subarray): New function.
4093 (g95_trans_array_constructor_value): Use it.
4094 (g95_array_cons_size): Don't abort() on array components.
4096 2002-12-08 Paul Brook <paul@nowt.org>
4098 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
4099 * support.c: Update #includes.
4100 (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
4101 * trans-array.c: Update #includes.
4103 * trans-const.c: Ditto.
4104 * trans-io.c: Ditto.
4105 * trans-types.c: Ditto.
4106 (g95_init_types): Set size_type_node.
4107 * trans-decl.c: Update #includes.
4108 (gfor_fndecl_adjust{l,r}): Declare and initialize.
4109 * trans-stmt.c: Update #includes.
4110 (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
4111 (g95_trans_select): Fix check for unbounded ranges.
4112 * trans-expr.c: Update #includes.
4113 (g95_conv_string_tmp): New function.
4114 (g95_conv_concat_op): Use it.
4115 * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
4116 * Trans-intrisic.c: Update #includes.
4117 (g95_conv_intrinsic_strcmp): New function.
4118 (g95_conv_intrinsic_adjust): Ditto.
4119 (g95_conv_intrinsic_function: Use them.
4121 2002-11-30 Paul Brook <paul@nowt.org>
4123 * trans-array.c (g95_walk_function_expr): Handle non-array return by
4125 * trans-dec.c (g95_build_function_decl): Handle character return
4127 (g95_get_fake_result_decl): Ditto.
4128 (g95_trans_deferred_vars): Ditto.
4129 * trans-expr.c (g95_conv_function_call): Ditto.
4130 (g95_trans_arrayfunc_assign) Limit to array valued functions.
4131 * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
4132 (g95_conv_intrinsic_function): Use it.
4133 * trans-types.c (g95_sym_type): Handle functions returning strings.
4134 (g95_return_by_reference): Ditto.
4135 (g95_get_function_type): Ditto.
4137 2002-11-18 Paul Brook <paul@nowt.org>
4139 * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
4140 requires a temporary.
4141 (g95_trans_select): Handle computed gotos.
4142 * trans-types.c (g95_build_array_type): Warn about non-functional
4143 assumed shape arrays.
4144 * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
4146 * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
4147 (g95_conv_intrinsic_int): New function.
4148 (g95_conv_intrinsic_mod): New function.
4149 (g95_conv_intrinsic_ichar): New function.
4150 (g95_conv_intrinsic_function): Use them.
4151 (g95_conv_intrinsic_dim): Use g95_evaluate_now.
4153 2002-11-17 Toon Moene <toon@moene.indiv.nluug.nl>
4155 * trans-types.c (g95_build_array_type): Assumed
4156 sized arrays can have rank > 1.
4157 * trans.c (g95_trans_code): Remove erroneous
4158 warning about CONTINUE.
4159 * trans-expr.c (g95_conv_variable): Remove
4162 2002-11-15 Paul Brook <paul@nowt.org>
4164 * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
4166 2002-10-31 Paul Brook <paul@nowt.org>
4168 * f95-tree.c: Remove tree copying stuff that's now in gimple.c
4169 * trans-expr.c (g95_conv_component_ref): Handle character string
4171 (g95_conv_string_parameter): Ditto.
4172 * trans-types.c (g95_get_derived_type): Add length decl to caracter
4175 2002-10-10 Paul Brook <paul@nowt.org>
4177 * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
4178 * trans-expr.c (g95_conv_function_call): Remove unreliable return value
4180 * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
4181 (g95_conv_intrinsic_function): Handle size and shape intrinsics.
4182 (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
4183 * trans-types.c (pvoid_type_node): Declare and initialize.
4184 * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
4185 (g95_array_allocate): Fix when base==data.
4186 (g95_conv_array_parameter): Correctly handle reduced rank sections.
4187 * trans-io.c (g95_trans_write): Correctly handle string modifiers.
4189 2002-10-09 Paul Brook <paul@nowt.org>
4191 * (g95_conv_expr_reference): Handle character strings correctly.
4193 2002-10-07 Paul Brook <paul@nowt.org>
4195 (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
4197 * trans-array.c (g95_build_array_initializer): Remove.
4198 (g95_conv_array_initializer): New Function.
4199 (g95_trans_auto_arry_allocation): Cleanup.
4200 (g95_trans_init_character_array): Remove.
4201 * g95spec.c: Link in libgforbegin.
4202 * trans.c (g95_generate_code): Rename main function to MAIN__.
4203 (g95_create_var): New function.
4204 (g95_create_var_np): New function.
4205 (g95_evaluate_now): New function.
4206 (g95_start_block): New function.
4207 (g95_finish_block): New function.
4208 (g95_add_expr_to_block): New function.
4209 (g95_add_block_to_block): New function.
4210 * trans-expr.c (g95_conv_componen_ref): New function.
4211 * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
4212 (F95_OBJS): Add dependency.o.
4213 * f95-lang.c (g95_is_simple_stmt): Remove.
4214 * f95-tree.c (mark_not_simple): New function.
4215 (unshare_all_trees): New function.
4216 (create_tmp_var, create_tmp_alias_var): Remove.
4217 * support.c (declare_tmp_vars, tree_last_decl): Remove.
4218 * trans*: Convert to new IR using GENERIC trees. Don't bother about
4219 SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
4221 2002-10-01 Paul Brook <paul@nowt.org>
4223 * trans-array.c: Add support for descriptorless arrays.
4224 (g95_conv_array_data): New function.
4225 (g95_conv_array_base): New function.
4226 * trans-array.h: Declare these here.
4227 * trans-decl.c(g95_create_mopdule_variable): Perform variable
4228 initialization and creation here.
4229 (g95_create_module_vars): Instead of here.
4230 * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
4231 * trans-intrinsic.c: Ditto.
4232 * trans-types.c (g95_is_nodesc_array): New function.
4233 (g95_get_nodesc_array_type): New function.
4234 (g95_sym_type, g95_get_derived_type): Use them.
4235 * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
4237 2002-09-28 Paul Brook <paul@nowt.org>
4239 * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
4240 * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
4243 2002-09-24 Paul Brook <paul@nowt.org>
4245 * f95-lang.c (listify): Remove declaration.
4246 (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
4248 * f95-tree.c (get_name): New function.
4249 * trans.c (module_namespace): Remove.
4250 * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
4251 * trans-types.c: Ditto.
4253 2002-09-19 Paul Brook <paul@nowt.org>
4255 * trans-array.c (g95_get_array_cons_size): New Function.
4256 (g95_con_ss_startstride): Handle Array constructors.
4257 (g95_conv_loop_setup): Ditto.
4258 (g95_conv_array_parameter): Ditto.
4259 * tras-decl.c (g95_finish_var_decl): Make initializes variables
4262 2002-09-19 Paul Brook <paul@nowt.org>
4264 * trans.c (g95_simple_fold_tmp): Detect variables inside
4266 * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
4268 2002-09-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
4270 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
4272 2002-09-14 Paul Brook <paul@nowt.org>
4274 * trans.c (g95_create_module_variable): Move to trans-decl.c.
4275 * trans-const.c (g95_conv_string_init): New Function.
4276 * trans-const.h: Declare it.
4277 * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
4278 variables. Don't bail on intrinsic symbols.
4279 (get_extern_function_decl): Handle specific intrinsic functions.
4280 * trans-types.c (g95_sym_type): Dummy functions don't return
4282 * trans-array.c (g95_build_array_initializer): New Function.
4283 (g95_trans_auto_array_allocation): Build initializer for static decls.
4284 Don't use mpz_addmul, it's GMP4 only.
4286 2002-09-12 Paul Brook <paul@nowt.org>
4288 * trans-decl.c (g95_generate_code): Fix thinko with return variable.
4289 (g95_get_extern_function_decl, g95_build_function_decl): Mangle
4290 assembler names for module procedures.
4292 2002-09-11 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
4294 * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
4297 2002-09-10 Paul Brook <paul@nowt.org>
4299 * trans-array.c: Change format of G95_SS_TEMP strictures.
4300 (g95_check_fncall_dependancy): New function.
4301 (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
4303 * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
4305 (g95_build_function_decl): Don't assume result arrays are packed.
4306 (g95_trans-deferred-vars): Handle array result variables.
4307 (g95_generate_fuction_code): Clear saved_function_decls.
4308 * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
4310 (g95_trans_arrayfunc_assign): New function.
4311 (g95_trans_assignment): Use it.
4312 * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
4313 (g95_se): Add direct_byref.
4314 * trans-types.c: Use sym->result rather than sym where appropriate.
4315 * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
4316 Update other functions to use this.
4317 (g95_is_intrinsic_libcall): New function.
4318 (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
4319 (g95_walk_intrinsic_function): Ditto.
4321 2002-09-08 Paul Brook <paul@nowt.org>
4323 * trans-types.c: Change rank field to dtype field in array descriptor.
4324 * trans-array.c: Implement filling of dtype array descriptor field.
4325 * trans-intrinsic.c: Fix broken LEN intrinsic.
4327 2002-09-07 Paul Brook <paul@nowt.org>
4329 * trans-intrinsic.c: Remove outdated todo intrinsic list.
4330 (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
4331 (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
4333 2002-09-06 Paul Brook <paul@nowt.org>
4335 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
4336 (gt-f95-trans-types.h): Add dependancy information.
4337 * config-lang.in (gtfiles): Add trans-types.c
4338 * f95-lang.c (g95_be_parse_file): Pass error and warning counts
4339 back to top-level code.
4340 * trans-array.c, trans-types.c: Change format of array descriptor.
4341 (g95_conv_descriptor_dimension): New function.
4342 * trans-types.h (g95_conv_descriptor_rank): define.
4343 * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
4346 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
4348 * trans-array.c, trans-types.c: Add rank information to descriptor.
4350 2002-09-06 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
4352 * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
4354 2002-09-04 Paul Brook <paul@nowt.org>
4356 * f95-lang.c (g95_create_decls): New function.
4357 (g95_init): Move initialization of external decls to above, and call
4358 from g95_be_parse_file.
4359 * trans.c (g95_finish_stmt): Don't amputate the decl chain.
4360 * trans-types.c (g95_init_types): Always name integer and char types.
4361 (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
4363 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
4365 * Make-lang.in: Add options.c to F95_PARSER_OBJS
4367 2002-09-02 Paul Brook <paul@nowt.org>
4369 * g95_generate_code: Clear the attr for __fortran_main.
4370 * trans-types.c (g95_finish_type): New function.
4371 * g95_init_io_state_type: Use g95_finish_type.
4372 * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
4374 2002-09-01 Paul Brook <paul@nowt.org>
4376 * README.backend: Warn about the dangers of extra config.h files.
4377 Remove obsolete libgfor stuff.
4378 * config-lang.in: Add target-libgfor dependancy.
4379 * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
4381 2002-09-01 Toon Moene <toon@moene.indiv.nluug.nl>
4383 * g95_conv_mpz_to_tree: Free storage pointed to by q,
4386 2002-08-30 Paul Brook <paul@nowt.org>
4388 * trans-intrinsic.c (g95_conv_intrinsic_function,
4389 g95_walk_intrinsic_function): Added ANY and ALL.
4390 (g95_conv_intrinsic_anyall): New function.
4391 * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in