1 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3 * trans-const.c (gfc_conv_mpz_to_tree): Change call to
4 build_int_cst to build_int_cst_wide in accordance to Nathan's
7 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
9 * trans-array.c (gfc_trans_array_constructor_value): Adjust
11 * trans-const.c (gfc_build_string_const, gfc_init_constants,
12 gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise.
13 * trans-decl.c (gfc_get_symbol_decl, build_entry_thunks,
14 gfc_trans_entry_master_switch): Likewise.
15 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
16 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
17 * trans-io.c (add_case, set_error_locus,
18 transfer_namelist_element, transfer_expr): Likewise.
19 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
20 gfc_trans_stop, gfc_trans_character_select): Likewise.
21 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
22 * trans.c (gfc_trans_runtime_check): Likewise.
24 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
26 * trans-decl.c, trans-types.c: Add and remove blank lines as
29 2004-08-24 Richard Henderson <rth@redhat.com>
31 * trans-const.c (gfc_conv_mpz_to_tree): Fix 64-bit shift warning.
33 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
35 * resolve.c (merge_argument_lists): Revert unintentionally
38 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
40 * trans-decl.c (build_function_decl): Fix spelling in comment.
41 (build_entry_thunks): Remove code with no function.
42 (gfc_build_intrinsic_function_decls): Remove empty line.
44 * resolve.c (resolve_entries): Fix a bunch of comment typos.
46 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
48 * f95-lang.c (gfc_init_decl_processing): Adjust
49 build_common_tree_nodes call.
51 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
53 * trans-types.c: Spelling and formatting fixes.
55 2004-08-23 Richard Henderson <rth@redhat.com>
57 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_getlimbn instead
58 of going through an intermediate string. Fix 32/64 int/long bug.
60 2004-08-23 Eric Christopher <echristo@redhat.com>
62 * trans-types.c (gfc_type_for_mode): Remove VECTOR_TYPE_SUPPORTED_P
63 usage. Use build_vector_type_for_mode for vector types.
65 2004-08-22 Richard Henderson <rth@redhat.com>
68 * data.c (find_con_by_offset): Search ordered list; handle
69 elements with repeat counts.
70 (gfc_assign_data_value_range): New.
71 * gfortran.h (struct gfc_data_value): Make repeat unsigned.
72 (gfc_assign_data_value_range): Declare.
73 * match.c (top_val_list): Extract repeat count into a temporary.
74 * resolve.c (values): Make left unsigned.
75 (next_data_value): Don't decrement left.
76 (check_data_variable): Use gfc_assign_data_value_range.
78 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
80 * trans-const.c, trans-decl.c, trans-expr.c: Spelling fixes.
82 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
84 * check.c (gfc_check_reduction): Rename to ...
85 (check_reduction): ... this. Make static. Don't check type of
87 (gfc_check_minval_maxval, gfc_check_prodcut_sum): New functions.
88 * intrinsic.c (add_functions): Change MAXVAL, MINVAL, PRODUCT and
89 SUM to use new check functions.
90 (check_specific): Change logic to call new functions.
91 * intrinsic.h (gfc_check_minval_maxval, gfc_check_product_sum):
93 (gfc_check_reduction): Remove prototype.
95 2004-08-20 Paul Brook <paul@codesourcery.com>
96 Canqun Yang <canqun@nudt.edu.cn>
99 * trans-array.c (gfc_conv_array_parameter): Pass correct pointer
100 for automatic arrays.
101 * trans-types.c (gfc_get_nodesc_array_type): Add comment.
103 2004-08-19 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
107 * match.c (match_simple_forall, match_simple_where): Forward-declare.
108 (gfc_match_if): Order statement list alphabetically, add WHERE and
109 FORALL, remove double PAUSE.
110 (gfc_match_simple_where, match_forall_header,
111 gfc_match_simple_forall): New functions.
112 (gfc_match_forall): Use match_forall_header.
114 2004-08-19 Paul Brook <paul@codesourcery.com>
117 * gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0.
118 * symbol.c (gfc_clear_attr): Use memset.
120 2004-08-19 Paul Brook <paul@codesourcery.com>
124 * data.c (assign_substring_data_value): Remove.
125 (create_character_intializer): New function.
126 (gfc_assign_data_value): Track the typespec for the current
127 subobject. Use create_character_intializer.
129 2004-08-19 Erik Schnetter <schnetter@aei.mpg.de>
132 * check.c (gfc_check_reduction): New function.
133 (gfc_check_minval_maxval): Removed.
134 (gfc_check_product): Removed.
135 (gfc_check_sum): Removed.
136 * intrinsic.h: Add/remove declarations for these.
137 * gfortran.h: Add field f3red to union gfc_check_f.
138 * intrinsic.c (add_sym_3red): New function.
139 (add_functions): Register maxval, minval, product, and sum intrinsics
140 through add_sym_3red.
141 (check_specific): Handle f3red union field.
142 * iresolve.c: Whitespace change.
144 2004-08-18 Paul Brook <paul@codesourcery.com>
146 * trans-types.c (gfc_sym_type): Use pointer types for optional args.
148 2004-08-18 Victor Leikehman <lei@il.ibm.com>
151 * trans-io.c (transfer_namelist_element): New. Recursively handle
152 derived-type variables. Pass string lengths.
153 (build_dt): Code moved to build_namelist, with some
154 changes and additions.
155 (gfc_build_io_library_fndecls): Declare the fifth
156 argument in st_set_nml_var_char -- string_length.
158 2004-08-17 Paul Brook <paul@codesourcery.com>
159 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
162 * decl.c (get_proc_name): Update mystery comment.
163 (gfc_match_entry): Check for errors earlier. Add entry point to list.
164 * dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes.
165 * gfortran.h (symbol_attribute): Add entry_master. Document entry.
166 (struct gfc_entry_list): Define.
167 (gfc_get_entry_list): Define.
168 (struct gfc_namespace): Add refs and entries.
169 (enum gfc_exec_op): Add EXEC_ENTRY.
170 (struct gfc_code): Add ext.entry.
171 * module.c (ab_attribute, attr_bits): Remove AB_ENTRY.
172 (mio_symbol_attribute): Don't save/reture addr->entry.
173 (mio_namespace_ref): Refcount namespaces.
174 * parse.c (accept_statement): Handle ST_ENTRY.
175 (gfc_fixup_sibling_symbols): Mark symbol as referenced.
176 (parse_contained): Fixup sibling references to entry points
177 after parsing the procedure body.
178 * resolve.c (resolve_contained_fntype): New function.
179 (merge_argument_lists, resolve_entries): New functions.
180 (resolve_contained_functions): Use them.
181 (resolve_code): Handle EXEC_ENTRY.
182 (gfc_resolve): Call resolve_entries.
183 * st.c (gfc_free_statement): Handle EXEC_ENTRY.
184 * symbol.c (gfc_get_namespace): Refcount namespaces.
185 (gfc_free_namespace): Ditto.
186 * trans-array.c (gfc_trans_dummy_array_bias): Treat all args as
187 optional when multiple entry points are present.
188 * trans-decl.c (gfc_get_symbol_decl): Remove incorrect check.
189 (gfc_get_extern_function_decl): Add assertion. Fix coment.
190 (create_function_arglist, trans_function_start, build_entry_thunks):
192 (gfc_build_function_decl): Rename ...
193 (build_function_decl): ... to this.
194 (gfc_create_function_decl): New function.
195 (gfc_generate_contained_functions): Use it.
196 (gfc_trans_entry_master_switch): New function.
197 (gfc_generate_function_code): Use new functions.
198 * trans-stmt.c (gfc_trans_entry): New function.
199 * trans-stmt.h (gfc_trans_entry): Add prototype.
200 * trans-types.c (gfc_get_function_type): Add entry point argument.
201 * trans.c (gfc_trans_code): Handle EXEC_ENTRY.
202 (gfc_generate_module_code): Call gfc_create_function_decl.
203 * trans.h (gfc_build_function_decl): Remove.
204 (gfc_create_function_decl): Add prototype.
206 2004-08-15 Andrew Pinski <apinski@apple.com>
209 * f95-lang.c (gfc_init_builtin_functions): Initialize the builtins
210 for cabs{,f} and copysign{,f}.
211 * trans-decl.c (gfor_fndecl_math_cabsf): Delete.
212 (gfor_fndecl_math_cabs): Delete.
213 (gfor_fndecl_math_sign4): Delete.
214 (gfor_fndecl_math_sign8): Delete.
215 (gfc_build_intrinsic_function_decls): Remove the
216 initializing of cabs{,f} and copysign{,f} functions.
217 * trans-intrinsic.c (gfc_conv_intrinsic_abs): Use the builtins
218 instead of the functions definitions.
219 (gfc_conv_intrinsic_sign): Likewise.
220 * trans.h (gfor_fndecl_math_cabsf): Delete.
221 (gfor_fndecl_math_cabs): Delete.
222 (gfor_fndecl_math_sign4): Delete.
223 (gfor_fndecl_math_sign8): Delete.
225 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
227 * trans-array.c (gfc_trans_array_constructor_value): Use
229 * trans-const.c (gfc_build_string_const,
230 gfc_init_constants, gfc_conv_mpz_to_tree,
231 gfc_conv_constant_to_tree): Likewise.
232 * trans-decl.c (gfc_get_symbol_decl): Likewise.
233 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
234 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
235 * trans-io.c (add_case, set_error_locus, build_dt,
236 transfer_expr): Likewise.
237 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
238 gfc_trans_stop, gfc_trans_character_select): Likewise.
239 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
240 * trans.c (gfc_trans_runtime_check): Likewise.
242 2004-08-14 Paul Brook <paul@codesourcery.com>
244 * trans-decl.c (gfc_build_function_decl): Remove dead code.
246 2004-08-14 Paul Brook <paul@codesourcery.com>
248 * trans-arry.c (gfc_trans_auto_array_allocation): Remove unused var.
250 2004-08-13 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
252 * gfortran.h: Add comments.
253 * parse.c (parse_contained): Fix comment typo.
254 * resolve.c (was_declared): Ditto.
257 2004-08-11 Paul Brook <paul@codeourcery.com>
260 * intrinsic.c (add_functions): Add dfloat as an alias for dble.
262 2004-08-10 Richard Henderson <rth@redhat.com>
264 * f95-lang.c (gfc_init_builtin_functions): Remove
265 __builtin_stack_alloc, add __builtin_alloca.
266 * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR.
267 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
269 2004-08-10 Paul Brook <paul@codesourcery.com>
271 * trans-io.c (transfer_expr): Handle pointters.
273 2004-08-10 Paul Brook <paul@codesourcery.com>
276 * trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT.
277 (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta.
278 (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary):
279 Handle GFC_SS_COMPONENT.
280 (gfc_conv_ss_startstride): Ditto. Set ss->shape.
281 (gfc_conv_loop_setup): Tweak commends. Remove dead code.
283 (gfc_conv_array_initializer): Call specific initializer routines.
284 * trans-expr.c (gfc_trans_structure_assign): New function.
285 (gfc_trans_subarray_assign): New function.
286 (gfc_trans_subcomponent_assign): New fucntion
287 (gfc_conv_structure): Use them.
288 * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT.
291 2004-08-08 Victor Leikehman <lei@il.ibm.com>
293 * simplify.c (gfc_simplify_shape): Bugfix.
294 * expr.c (gfc_copy_shape_excluding): New function.
295 * gfortran.h (gfc_get_shape): Bugfix.
296 (gfc_copy_shape_excluding): Added declaration.
297 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
298 gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound,
299 gfc_resolve_ubound, gfc_resolve_transpose): Added compile
300 time resolution of shape.
302 2004-08-06 Janne Blomqvist <jblomqvi@cc.hut.fi>
304 * intrinsic.c (add_subroutines): Add getenv and
305 get_environment_variable. (add_sym_5s): New function.
306 * intrinsic.h (gfc_resolve_get_environment_variable): Add
308 * iresolve.c (gfc_resolve_get_environment_variable): New
311 2004-08-06 Feng Wang <fengwang@nudt.edu.cn>
313 * f95-lang.c (gfc_init_builtin_functions): Fix the number of
314 __builtin_pow[f] arguments.
316 2004-08-06 Steven G. Kargl <kargls@comcast.net>
318 * arith.c: Add #define for model numbers. Remove global GMP variables.
319 (natural_logarithm,common_logarithm,exponential,sine,
320 cosine,arctangent,hypercos,hypersine ): Remove.
321 (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions.
322 (arctangent2,gfc_arith_init_1,gfc_arith_done_1
323 gfc_check_real_range, gfc_constant_result, gfc_range_check,
324 gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times,
325 gfc_arith_divide,complex_reciprocal,complex_pow_ui,
326 gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real,
327 gfc_convert_complex,gfc_int2real,gfc_int2complex,
328 gfc_real2int,gfc_real2real,gfc_real2complex,
329 gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP
330 to MPFR, use new functions.
331 * arith.h: Remove extern global variables.
332 (natural_logarithm,common_logarithm,exponential, sine, cosine,
333 arctangent,hypercos,hypersine): Remove prototypes.
334 (arctangent2): Update prototype from GMP to MPFR.
335 (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes.
336 * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR.
337 * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR.
338 * gfortran.h (GFC_REAL_BITS): Remove.
339 (arith): Add ARITH_NAN.
340 Include mpfr.h. Define GFC_RND_MODE.
341 Rename GCC_GFORTRAN_H GFC_GFC_H.
342 (gfc_expr): Convert GMP to MPFR.
343 * module.c: Add arith.h, correct type in comment.
344 (mio_gmp_real): Convert GMP to MPFR.
345 (mio_expr): Use gfc_set_model_kind().
346 * primary.c: Update copyright date with 2004.
347 (match_real_constant,match_const_complex_part): Convert GMP to MPFR.
348 * simplify.c: Remove global GMP variables
349 (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag,
350 gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint,
351 gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan,
352 gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx,
353 gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh,
354 gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon,
355 gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor,
356 gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int,
357 gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log,
358 gfc_simplify_log10,simplify_min_max,gfc_simplify_mod,
359 gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint,
360 gfc_simplify_rrspacing,gfc_simplify_scale,
361 gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin,
362 gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt,
363 gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny,
364 gfc_simplify_init_1,gfc_simplify_done_1): Convert GMP to MPFR.
366 * trans-const.c (gfc_conv_mpfr_to_tree): Rename from
367 gfc_conv_mpf_to_tree. Convert it to use MPFR
368 (gfc_conv_constant_to_tree): Use it.
369 * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree().
370 * trans-intrinsic.c: Add arith.h, remove gmp.h
371 (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR.
373 2004-08-06 Victor Leikehman <lei@il.ibm.com>
374 Paul Brook <paul@codesourcery.com>
376 * trans-array.c (gfc_trans_allocate_array_storage,
377 gfc_trans_allocate_temp_array, gfc_add_loop_ss_code,
378 gfc_conv_loop_setup): For functions, if the shape of the result
379 is not known in compile-time, generate an empty array descriptor for
380 the result and let the callee to allocate the memory.
381 (gfc_trans_dummy_array_bias): Do nothing for pointers.
382 (gfc_conv_expr_descriptor): Use function return values directly.
383 * trans-expr.c (gfc_conv_function_call): Always add byref call
385 (gfc_trans_pointer_assignment): Add comments.
386 (gfc_trans_arrayfunc_assign): Don't chain on expression.
388 2004-08-01 Roger Sayle <roger@eyesopen.com>
390 * options.c (gfc_init_options): Don't warn about the use GNU
391 extensions by default.
392 (gfc_post_options): Warn about GNU extensions with -pedantic.
393 (gfc_handle_option): Don't warn about GNU extensions with -std=gnu.
395 2004-07-30 Richard Henderson <rth@redhat.com>
397 * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL
400 2004-07-25 Richard Henderson <rth@redhat.com>
402 * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL
403 and DECL_IGNORED_P on RESULT_DECL.
404 (gfc_generate_constructors): Likewise.
406 2004-07-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
409 * lang.opt (ffixed-line-length-none, ffixed-line-length-): New
411 (ffixed-line-length-80, ffixed-line-length-132): Remove.
412 * options.c (gfc_handle_options): Deal with changed options.
413 * scanner.c (load_line): Change second arg to 'char **',
414 allocate if pointing to NULL. Keep track of buffer's length.
415 Adapt buffer size to overlong lines. Pad lines to full length
417 (load_file): Adapt to new interface of load_line.
419 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
421 * trans.h (builtin_function): Declare.
423 2004-07-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
426 (parts ported from g95)
427 * parse.h (gfc_state_data): New field do_variable.
428 (gfc_check_do_variable): Add prototype.
429 * parse.c (push_state): Initialize field 'do_variable'.
430 (gfc_check_do_variable): New function.
431 (parse_do_block): Remember do iterator variable.
432 (parse_file): Initialize field 'do_variable'.
433 * match.c (gfc_match_assignment, gfc_match_do,
434 gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate):
435 Add previously missing checks.
436 (gfc_match_return): Reformat error message.
437 * io.c (match_out_tag): New function.
438 (match_open_element, match_close_element,
439 match_file_element, match_dt_element): Call match_out_tag
440 instead of match_vtag where appropriate.
441 (match_io_iterator, match_io_element): Add missing check.
442 (match_io): Reformat error message.
443 (match_inquire_element): Call match_out_tag where appropriate.
445 * parse.c (gfc_check_do_variable): Fix error locus.
447 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
450 * trans-decl.c (gfc_build_function_decl): Create a new chardecl
451 for every assumed length character dummy argument.
454 * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion.
457 * simplify.c (gfc_simplify_bound): Copy the bound expression.
459 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
462 * trans-array.c gfc_trans_g77_array,
463 gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init
464 for assumed length characters.
465 (gfc_conv_expr_descriptor): Set se->string_length if dealing
466 with a character expression.
467 (gfc_cvonv_array_parameter): Pass string length when passing
468 character array according to g77 conventions.
470 2004-07-12 Paul Brook <paul@codesourcery.com>
472 * expr.c (gfc_check_assign_symbol): Handle pointer assignments.
473 * trans-array.c (gfc_trans_auto_array_allocation): Remove
475 * trans-common.c (create_common): Use gfc_conv_initializer.
476 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer.
477 * trans-expr.c (gfc_conv_initializer): New function.
478 (gfc_conv_structure): Use it.
479 * trans.h (gfc_conv_initializer): Add prototype.
481 2004-07-11 Paul Brook <paul@codesourcery.com>
484 * parse.c (gfc_fixup_sibling_symbols): Also look for untyped
486 (parse_contained): Mark contained symbols as referenced.
488 2004-07-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
491 * module.c (gfc_dump_module, gfc_use_module): Print locus
492 when opening of module file fails.
495 * io.c (match_io): Flag 'WRITE(...), ...' as extension.
498 * match.c (gfc_match_program): A program name is obligatory.
499 (gfc_match_return): RETURN in main program is an extension.
500 (gfc_match_block_data): A space is required before a block data
504 * primary.c (match_boz_constant): Call gfc_notify_std only if
505 we actually have a non-standard boz-literal-constant.
508 * expr.c (gfc_check_assign): Print ranks if incompatible. Issue
509 warning if assigning NULL().
511 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
513 * f95-lang.c (set_block): Remove.
514 (gfc_clear_binding_stack): New.
515 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
516 (struct binding_level): Remove block_created_by_back_end.
517 (clear_binding_level): Likewise.
518 (poplevel): Don't handle block_created_by_back_end.
520 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
522 * trans-decl.c (gfc_create_module_variable): Nothing to do if
523 symbol is in common, because we ...
524 (gfc_generate_module_vars): Call gfc_trans_common.
526 2004-07-10 Paul Brook <paul@codesourcery.com>
528 * trans-array.c (gfc_build_null_descriptor): New function.
529 (gfc_trans_static_array_pointer): Use it.
530 * trans-array.h (gfc_build_null_descriptor): Add prototype.
531 * trans-expr.c (gfc_conv_structure): Handle array pointers.
533 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
536 * decl.c (gfc_match_save): Use-associated common block
538 * gfortran.h (gfc_common_head): Add new field 'name'.
539 Fix typo in comment after #endif.
540 * match.c (gfc_get_common): Add new argument from_common,
541 mangle name if flag is set, fill in new field in structure
543 (match_common): Set new arg in call to gfc_get_common,
544 use-associated common block doesn't collide.
545 * match.h (gfc_get_common): Adapt prototype.
546 * module.c (load_commons): Set new arg in call to
548 * symbol.c (free_common_tree): New function.
549 (gfc_free_namespace): Call new function.
550 * trans-common.c (several functions): Remove argument
551 'name', use name from gfc_common_head instead.
553 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
555 * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
556 and RHS match. Return early if the RHS is NULL().
559 * match.c (match_common): Fix error reporting for used common.
562 * trans-expr.c (gfc_conv_structure): Handle initialization
563 of scalar pointer components.
565 * parse.c (decode_statement): Fix matching of BLOCK DATA.
567 * trans-decl.c (generate_local_decl): Remove workaround obsoleted
570 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
572 * trans-common.c: Fix whitespace issues, make variable names
574 (create_common): Additionally, make loop logic more obvious.
576 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
577 Paul Brook <paul@codesourcery.com>
580 * trans-common.c (calculate_length): Remove ...
581 (get_segment_info): Merge into here. Save field type.
582 (build_field): Use saved type.
583 (create_common, new_condition, new_segment, finish_equivalences):
584 Use new get_segment_info.
585 * trans-types.c: Update comment.
587 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
590 * moduele.c (mio_symbol): Don't I/O initial values unless
591 symbol is a parameter.
593 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
596 * resolve.c (resolve_symbol): Verify that the shape of a
597 parameter array is not only explicit, but also constant.
598 * array.c (gfc_is_compile_time_shape): New function.
599 * gfortran.h (gfc_is_compile_time_shape): Add prototype.
601 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
607 * module.c (write_symbol, write_symtree): Remove workaround.
608 * primary.c (match_actual_arglist): Enhance comment.
609 (gfc_match_rvalue): Handle function call with first argument
610 a keyword argument correctly.
611 * resolve.c (resolve_symbol): Change call to
612 gfc_set_default_type to issue error if no implicit type
614 * trans-decl.c (gfc_create_module_variable): Remove workaround.
616 2004-07-08 Paul Brook <paul@codesourcery.com>
618 * intrinsic.c (add_sym_4s): New function.
619 (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
621 2004-07-04 Janne Blomqvist <jblomqvi@cc.hut.fi>
622 Paul Brook <paul@codesourcery.com>
626 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
627 GFC_ISYM_COMMAND_ARGUMENT_COUNT.
628 * intrinsic.c (add_functions): Identify iargc. Add
629 command_argument_count.
630 (add_subroutines): Resolve getarg. Add get_command and
631 get_command_argument.
632 * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
633 gfc_resolve_get_command_argument): Add prototypes.
634 * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
635 gfc_resolve_get_command_argument): New functions.
636 * trans-decl.c (gfor_fndecl_iargc): New variable.
637 (gfc_build_intrinsic_function_decls): Set it.
638 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
639 (gfc_conv_intrinsic_function): Use it.
640 * trans.h (gfor_fndecl_iargc): Declare.
642 2004-07-04 Matthias Klose <doko@debian.org>
644 * Make-lang.in: Generate and install gfortran man page.
645 * invoke.texi: Remove extra '@c man end'.
647 2004-07-04 Richard Henderson <rth@redhat.com>
649 * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
651 2004-07-04 Paul Brook <paul@codesourcery.com>
653 * decl.c (gfc_match_implicit_range): Don't use typespec.
654 (gfc_match_implicit): Handle character selectors.
655 * gfortran.h (gfc_set_implicit): Remove prototype.
656 (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
657 * parse.c (accept_statement): Don't call gfc_set_implicit.
658 * symbol.c (new_ts): Remove.
659 (gfc_set_implicit_none): Use same loop bounds as other functions.
660 (gfc_set_implicit): Remove.
661 (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
662 (gfc_merge_new_implicit): Combine with gfc_set_implicit.
664 2004-06-30 Richard Henderson <rth@redhat.com>
666 * match.c (var_element): Remove unused variable.
668 * trans-decl.c (gfc_generate_function_code): Don't set
669 x_whole_function_mode_p.
670 (gfc_generate_constructors): Likewise.
672 2004-06-30 Richard Henderson <rth@redhat.com>
674 * trans-decl.c (gfc_generate_function_code): Don't set
675 immediate_size_expand.
676 (gfc_generate_constructors): Likewise.
678 2004-06-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
681 * decl.c (gfc_match_type_spec): Rename second argument to
682 'implicit_flag', reverse meaning. Don't match_char_spec if
683 'implicit_flag' is set. Rename to ...
684 (match_type_spec): ... this.
685 (gfc_match_implicit_none, match_implicit_range): Move here
687 (gfc_match_implicit): Move here from match.c, try to
688 match_char_len if match_implicit_range doesn't succeed for
689 CHARACTER implicits. Call renamed fucntion match_type_spec.
690 (gfc_match_data_decl, match_prefix): Call renamed function
692 * match.c (gfc_match_implicit_none, match_implicit_range,
693 gfc_match_implicit): Move to decl.c.
694 * match.h (gfc_match_implicit_none, gfc_match_implicit):
695 Move protoypes to section 'decl.c'.
696 (gfc_match_type_spec): Remove prototype.
698 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
700 * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
703 2004-06-29 Steven Bosscher <stevenb@suse.de>
705 Make sure types in assignments are compatible. Mostly mechanical.
706 * trans-const.h (gfc_index_one_node): New define.
707 * trans-array.c (gfc_trans_allocate_array_storage,
708 gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
709 gfc_trans_array_constructor_value, gfc_trans_array_constructor,
710 gfc_conv_array_ubound, gfc_conv_array_ref,
711 gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
712 gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
713 gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
714 gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
715 types in assignments, conversions and conditionals for expressions.
716 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
717 gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
718 gfc_conv_function_call, gfc_trans_pointer_assignment,
719 gfc_trans_scalar_assign): Likewise.
720 * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
721 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
722 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
723 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
724 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
725 gfc_conv_allocated, gfc_conv_associated,
726 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
727 * trans-io.c (set_string): Likewise.
728 * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
729 gfc_do_allocate, generate_loop_for_temp_to_lhs,
730 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
731 compute_overall_iter_number, gfc_trans_assign_need_temp,
732 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
733 gfc_evaluate_where_mask, gfc_trans_where_assign,
734 gfc_trans_where_2): Likewise.
735 * trans-types.c (gfc_get_character_type, gfc_build_array_type,
736 gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
738 * trans.c (gfc_add_modify_expr): Add sanity check that types
739 for the lhs and rhs are the same for scalar assignments.
741 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
743 * dump-parse-tree.c (show_common): New function.
744 (gfc_show_namespace): Show commons.
746 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
747 Andrew Vaught <andyv@firstinter.net>
751 * decl.c (gfc_match_save): Adapt to new common structures,
752 don't allow saving USE-associated common.
753 * dump-parse-tree (gfc_show_attr): (saved_)common are not
754 symbol attributes any longer.
755 (gfc_show_symbol): Don't show old-style commons any longer.
756 (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
758 * gfortran.h (symbol_attribute): Remove common and saved_common
760 (gfc_symbol): Remove common_head element.
761 (gfc_common_head): New struct.
762 (gfc_get_common_head): New macro.
763 (gfc_symtree): Add field 'common' to union.
764 (gfc_namespace): Add field 'common_root'; change type of field
765 'blank_common' to blank_common.
766 (gfc_add_data): New prototype.
767 (gfc_traverse_symtree): Expect a symtree as first argument
768 instead of namespace.
769 * match.c (gfc_get_common): New function.
770 (match_common_name): Change to take char * as argument, adapt,
771 fix bug with empty name.
772 (gfc_match_common): Adapt to new data structures. Disallow
773 redeclaration of USE-associated COMMON-block. Fix bug with
775 (var_element): Adapt to new common structures.
776 * match.h (gfc_get_common): Declare.
777 * module.c: Add 2004 to copyright years, add commons to module
778 file layout description.
779 (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
780 for removed attributes.
781 (mio_symbol): Adapt to new way of storing common relations.
782 (load_commons): New function.
783 (read_module): Skip common list on first pass, load_commons at
785 (write_commons): New function.
786 (write_module): Call write_commons().
787 * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
788 functions related to removed attributes.
789 (gfc_add_data): New function.
790 (gfc_clear_attr): Don't set removed attributes.
791 (gfc_copy_attr): Don't copy removed attributes.
792 (traverse_symtree): Remove.
793 (gfc_traverse_symtree): Don't traverse symbol
794 tree of the passed namespace, but require a symtree to be passed
795 instead. Unify with traverse_symtree.
796 (gfc_traverse_ns): Call gfc_traverse_symtree according to new
798 (save_symbol): Remove setting of removed attribute.
799 * trans-common.c (gfc_sym_mangled_common_id): Change to
800 take 'char *' argument instead of 'gfc_symbol'.
801 (build_common_decl, new_segment, translate_common): Adapt to new
802 data structures, add new
804 (create_common): Adapt to new data structures, add new
805 argument name. Fix typo in intialization of derived types.
806 (finish_equivalences): Add second argument in call to
808 (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
809 (gfc_trans_common): Adapt to new data structures.
810 * trans-decl.c (gfc_create_module_variables): Remove test for
813 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
815 * io.c: Add 2004 to copyright years.
817 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
818 Andrew Vaught <andyv@firstinter.net>
820 * gfortran.h (gfc_gsymbol): New typedef.
821 (gfc_gsym_root): New variable.
822 (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
823 * parse.c (global_used): New function.
824 (parse_block_data): Check for double empty BLOCK DATA,
825 use global symbol table.
826 (parse_module): Use global symbol table.
827 (add_global_procedure, add_global_program): New functions.
828 (gfc_parse_file): Use global symbol table.
829 * symbol.c (gfc_gsym_root): New variable.
830 (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
833 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
835 * module.c (mio_gmp_real): Correct writing of negative numbers.
837 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
840 * expr.c (check_intrinsic_op): Allow comparison of characters.
843 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
844 Andrew Vaught <andyv@firstinter.net>
846 * decl.c (contained_procedure): New function.
847 (match_end): Verify correctness of END STATEMENT in
850 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
851 Andrew Vaught <andyv@firstinter.net>
854 * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
855 (decode_statement): Enforce required space in free-form.
857 2004-06-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
859 * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
860 * trans-array.c (gfc_conv_descriptor_data): Add operand
862 (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
863 (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
864 (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
865 * trans-common.c (create_common): Likewise.
866 * trans-expr.c (gfc_conv_component_ref): Likewise.
867 * trans-io.c (set_parameter_value): Likewise.
868 (set_parameter_ref, set_string, set_flag, io_result): Likewise.
869 (transfer_expr): Likewise.
870 * trans-decl.c (gfc_trans_auto_character_variable):
871 Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
872 (gfc_gimplify_function): New function.
873 (gfc_generate_function-code): Properly handle nested functions.
874 * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
876 2004-06-22 Janne Blomqvist <jblomqvi@cc.hut.fi>
879 * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
880 (gfc_resolve_inquire): Resolve the iolength tag. Return
881 SUCCESS at end of function if no failure has occured.
882 * resolve.c (resolve_code): Resolve if iolength is encountered.
883 * trans-io.c: (ioparm_iolength, iocall_iolength,
884 iocall_iolength_done): New variables.
885 (last_dt): Add IOLENGTH.
886 (gfc_build_io_library_fndecls ): Set iolength related variables.
887 (gfc_trans_iolength): Implement.
888 (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
890 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de
893 * scanner.c (load_line): Don't truncate preprocessor lines.
894 Reformat error message.
895 (preprocessor_line): Issue warning in case of malformed
898 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
900 * resolve.c (resolve_symbol): Add comment in function body.
901 (check_data_variable): Change type of mark to ar_type, adapt code
904 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
906 * array.c (gfc_insert_constructor): Avoid redundant call to
907 mpz_comp. Add 2004 to copyright years.
909 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
911 * trans.h (stmtblock_t): Change has_scope to unsigned int.
913 2004-06-20 Steven G. Kargl <kargls@comcast.net>
915 * arith.c (gfc_range_check): correct complex underflow.
917 2004-06-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
920 * match.c (match_case_selector): Call gfc_match_init_expr
921 instead of gfc_match_expr.
922 * resolve.c (validate_case_label_expr): No need to check for
923 constant, since it wouldn't have been matched with the fix to
926 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
929 * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
932 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
935 * trans-deecl.c (generate_local_decl): Do not issue warning for
936 unused variables if they're use associated.
938 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
939 Andrew Vaught <andyv@firstinter.net>
942 * gfortran.h (gfc_check_f): Add new field f3ml.
943 * check.c (gfc_check_minloc_maxloc): Take argument list instead
944 of individual arguments, reorder if necessary.
945 * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
946 * intrinsic.c (add_sym_3ml): New function.
947 (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
948 (check_specific): Catch special case MINLOC, MAXLOC.
950 2004-06-14 Paul Brook <paul@codesourcery.com>
952 * intrinsic.c (add_sym_2s): Use correct function types.
954 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
956 * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize. Move data.c
957 * data.c (gfc_get_section_index): Remove dependency on trans.h.
959 2004-06-12 Steven G. Kargl <kargls@comcast.net>
961 * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
962 gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
963 * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
964 GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
965 * trans-intrinsic.c: Use symbols.
966 * intrinsic.c (add_sym_2s): New function.
967 * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
968 * intrinsic.h: Function prototypes.
969 * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
970 gfc_resolve_srand): New functions.
972 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
975 * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
978 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
981 * interface.c (compare_parameter, compare_actual_formal): Don't
982 check types and array shapes for NULL()
983 * trans-expr.c (conv_function_call): No double indirection for
986 2004-06-09 Toon Moene <toon@moene.indiv.nluug.nl>
988 * trans-expr.c (gfc_conv_cst_int_power): Compute
989 x**(-n) by converting it to (1/x)**n instead of
992 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
995 * module.c (write_symbol, write_symtree): Don't write symbols
996 wrongly added to namespace.
997 * trans-decl.c (gfc_create_module_variable): Don't create a
998 backend decl for a symbol incorrectly added to namespace.
1000 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1003 * resolve.c (resolve_symbol): Verify that parameter array has an
1004 explicit shape. Fix typos and coding style issues in surrounding
1007 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1010 * gfortran.texi: The documentation doesn't contain infomration on
1011 how to report bugs, and shouldn't, so remove the line which
1014 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1016 * intrinsic.c (sort_actual): Keep track of type of missing
1017 arguments. (Missing from previous commit.)
1019 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1021 * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
1022 * interface.c (compare_actual_formal): Keep type of omitted
1024 * trans-expr.c (gfc_conv_function_call): Add string length
1025 argument for omitted string argument.
1027 2004-06-03 Paul Brook <paul@codesourcery.com>
1029 * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
1030 lists instead of compound expr chains.
1031 (gfc_trans_code): Annotate statement lists.
1033 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1035 * trans-array.c: Fix spelling in comments.
1037 2004-06-02 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1040 * data.c (assign_substring_data_value): New function.
1041 (gfc_assign_data_value): Call the new function if we're dealing
1042 with a substring LHS.
1044 2004-06-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1047 * gfortran.h (GFC_VERSION): Remove.
1048 * gfortran.texi (version-gfortran): Remove, replace by version-GCC
1051 2004-05-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1053 * trans-types.c: Fix spelling & layout in comments.
1055 2004-05-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1058 * trans-const.c (gfc_conv_string_init): Allow variable string
1059 length lower than initialization string length.
1061 2004-05-30 Paul Brook <paul@codesourcery.com>
1064 * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
1065 * trans-expr.c (gfc_trans_string_copy): New function.
1066 (gfc_conv_statement_function): Use them. Create temp vars. Enforce
1068 (gfc_conv_string_parameter): Use gfc_trans_string_copy.
1069 * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
1070 * trans.h (struct gfc_saved_var): Define.
1071 (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
1073 2004-05-30 Steven G. Kargl <kargls@comcast.net>
1075 * iresolve.c (gfc_resolve_random_number): Clean up conditional.
1077 2004-05-29 Steven G. Kargl <kargls@comcast.net>
1079 * simplify.c (gfc_simplify_log): Remove useless line of code.
1081 2004-05-29 Paul Brook <paul@codesourcery.com>
1083 * trans-common.c (find_equivalence): Find multiple rules.
1085 2004-05-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1087 * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
1088 (gfc_current_locus): Declare new global variable.
1089 * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
1090 (gfc_current_locus1): Rename ...
1091 (gfc_current_locus): ... to this.
1092 (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
1093 skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
1094 gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
1095 gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
1096 and gfc_current_locus(), respectively.
1097 * array.c (match_subscript, gfc_match_array_ref, match_array_list,
1098 match_array_cons_element, gfc_match_array_constructor):
1099 Read/modify gfc_current_locus instead of calling gfc_set_locus()
1100 and gfc_current_locus().
1101 * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
1102 match_attr_spec, gfc_match_function_decl, gfc_match_end,
1103 attr_decl1, gfc_match_save): Likewise.
1104 * error.c (error_print, gfc_internal_error): Likewise.
1105 * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
1106 * interface.c (gfc_add_interface): Likewise.
1107 * io.c (gfc_match_format, match_dt_format, match_dt_element,
1108 match_io_iterator, match_io): Likewise.
1109 * match.c (gfc_match_space, gfc_match_eos,
1110 gfc_match_small_literal_int, gfc_match_st_label,
1111 gfc_match_strings, gfc_match_name, gfc_match_iterator,
1112 gfc_match_char, gfc_match, gfc_match_assignment,
1113 gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
1114 gfc_match_nullify, gfc_match_call, match_implicit_range,
1115 gfc_match_implicit, gfc_match_data, match_case_selector,
1116 gfc_match_case, match_forall_iterator): Likewise.
1117 * matchexp.c (gfc_match_defined_op_name, next_operator,
1118 match_level_1, match_mult_operand, match_ext_mult_operand,
1119 match_add_operand, match_ext_add_operand, match_level_2,
1120 match_level_3, match_level_4, match_and_operand, match_or_operand,
1121 match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
1122 * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
1123 * parse.c (match_word, decode_statement, next_free, next_fixed,
1124 add_statement, verify_st_order, parse_if_block, gfc_parse_file):
1126 * primary.c (match_digits, match_integer_constant,
1127 match_boz_constant, match_real_constant, match_substring,
1128 next_string_char, match_charkind_name, match_string_constant,
1129 match_logical_constant, match_const_complex_part,
1130 match_complex_constant, match_actual_arg, match_keyword_arg,
1131 gfc_match_actual_arglist, gfc_match_structure_constructor,
1132 gfc_match_rvalue, gfc_match_variable): Likewise.
1133 * st.c (gfc_get_code): Likewise.
1134 * symbol.c (check_conflict, check_used, check_done,
1135 duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
1136 gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
1137 gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
1139 2004-05-26 Roger Sayle <roger@eyesopen.com>
1141 * io.c (format_asterisk): Silence compiler warnings by correcting
1142 the number of elements of a "locus" initializer.
1144 2004-05-25 Roger Sayle <roger@eyesopen.com>
1147 * matchexp.c: Allow unary operators after arithmetic operators
1149 (match_ext_mult_operand, match_ext_add_operand): New functions.
1150 (match_mult_operand): Tweak to call match_ext_mult_operand.
1151 (match_add_operand): Tweak to call match_ext_mult_operand.
1152 (match_level_2): Rearrange to call match_ext_add_operand.
1154 2004-05-25 Paul Brook <paul@codesourcery.com>
1156 * expr.c (check_inquiry): Remove bogus tests.
1158 2004-05-23 Paul Brook <paul@codesourcery.com>
1161 * expr.c (restricted_args): Remove redundant checks/argument.
1162 (external_spec_function): Update to match.
1163 (restricted_intrinsic): Rewrite.
1165 2004-05-23 Paul Brook <paul@codesourcery.com>
1166 Victor Leikehman <lei@haifasphere.co.il>
1168 * gfortran.h (struct gfc_symbol): Add equiv_built.
1169 * trans-common.c: Change int to HOST_WIDE_INT. Capitalize error
1171 (current_length): Remove.
1172 (add_segments): New function.
1173 (build_equiv_decl): Create initialized common blocks.
1174 (build_common_decl): Always add decl to bindings.
1175 (create_common): Create initializers.
1176 (find_segment_info): Reformat to match coding conventions.
1177 (new_condition): Use add_segments.
1178 (add_condition, find_equivalence, add_equivalences): Move iteration
1179 inside functions. Only process each segment once.
1180 (new_segment, finish_equivalences, translate_common): Simplify.
1182 2004-05-23 Steven G. Kargl <kargls@comcast.net>
1184 * check.c (gfc_check_random_seed): Issue for too many arguments.
1186 2004-05-22 Steven G. Kargl <kargls@comcast.net>
1188 * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
1190 2004-05-22 Paul Brook <paul@codesourcery.com>
1192 * dump-parse-tree.c (gfc_show_equiv): New function.
1193 (gfc_show_namespace): Use it.
1195 2004-05-22 Victor Leikehman <lei@haifasphere.co.il>
1198 * symbol.c (gfc_add_common): Disable checks to work around other more
1199 fundamental inadequacies.
1201 2004-05-22 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1203 * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
1205 (gfc_build_function_decl): Likewise.
1207 2004-05-22 Steven G. Kargl <kargls@comcast.net>
1209 * check.c (gfc_check_system_clock): New function.
1210 * intrinsic.c (add_sym_3s): New function.
1211 (add_subroutines): Use it.
1212 * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
1214 * iresolve.c (gfc_resolve_system_clock): New function.
1216 2004-05-22 Steven G. Kargl <kargls@comcast.net>
1218 * invoke.texi: Document -Wunderflow and spell check.
1219 * lang.opt: Add Wunderflow.
1220 * gfortran.h (gfc_option_t): Add warn_underflow option.
1221 * options.c (gfc_init_options, set_Wall): Use it.
1222 * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
1223 * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
1224 gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
1225 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
1226 * arith.c (common_logarithm): Fix typo in comment.
1228 2004-05-21 Roger Sayle <roger@eyesopen.com>
1230 * io.c (check_format): As a GNU extension, allow the comma after a
1231 string literal to be optional in a format. Use gfc_notify_std to
1232 issue an error/warning as appropriate.
1234 2004-05-21 Roger Sayle <roger@eyesopen.com>
1236 * io.c (check_format): Use gfc_notify_std to determine whether to
1237 issue an error/warning for omitting the digits from the X format.
1239 2004-05-20 Roger Sayle <roger@eyesopen.com>
1241 * io.c (check_format): Allow the number before the X format to
1242 be optional when not -pedantic.
1244 2004-05-18 Feng Wang <fengwang@nudt.edu.cn>
1245 Paul Brook <paul@codesourcery.com>
1247 * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
1248 Create decls for __builtin_pow{,f}.
1249 * gfortran.h (PREFIX_LEN): Define.
1250 * trans-decl.c (gfor_fndecl_math_powi): Add.
1251 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
1252 (gfc_build_intrinsic_function_decls): Create decls for powi.
1253 * trans-expr.c (powi_table): Add.
1254 (gfc_conv_integer_power): Remove.
1255 (gfc_conv_powi): New function.
1256 (gfc_conv_cst_int_power): New function.
1257 (gfc_conv_power_op): Use new powi routines.
1258 * trans.h (struct gfc_powdecl_list): Add.
1259 (gfor_fndecl_math_powi): Add.
1260 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
1262 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1264 * trans.c, trans-decl.c: Fix comment typos.
1266 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1268 * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
1270 2004-05-18 Steve Kargl <kargls@comcast.net>
1272 * arith.c (gfc_int2complex): Fix incorrect range checking.
1274 2004-05-18 Paul Brook <paul@codesourcery.com>
1277 * decl.c (add_init_expr_to_sym): Remove incorrect check.
1278 (default_initializer): Move to expr.c.
1279 (variable_decl): Don't assign default initializer to variables.
1280 * expr.c (gfc_default_initializer): Move to here.
1281 * gfortran.h (gfc_default_initializer): Add prototype.
1282 * resolve.c (resolve_symbol): Check for illegal initializers.
1283 Assign default initializer.
1285 2004-05-17 Steve Kargl <kargls@comcast.net>
1287 * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
1289 2004-05-17 Steve Kargl <kargls@comcast.net>
1291 * arith.c (gfc_real2complex): Range checking wrong part of complex
1294 2004-05-16 Paul Brook <paul@codesourcery.com>
1296 * options.c (gfc_handle_module_path_options): Fix buffer overrun.
1298 2004-05-16 Paul Brook <paul@codesourcery.com>
1300 * arith.c (gfc_range_check): Fix logic error.
1302 2004-05-16 Steve Kargl <sgk@troutmask.apl.washington.edu>
1304 * arith.c: Fix comment typos.
1306 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1309 * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
1310 not initialized in a disallowed fashion.
1311 * match.c (gfc_match_common): Likewise.
1312 (var_element): Verify that variable is not in the blank COMMON,
1313 if it is in a common.
1315 2004-05-15 Joseph S. Myers <jsm@polyomino.org.uk>
1317 * Make-lang.in (f95.generated-manpages): Remove.
1318 (f95.srcextra): New.
1319 (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
1320 f95.maintainer-clean): Generate info and dvi files in objdir/doc.
1323 (f95.install-info): Remove.
1324 (install-info): New.
1326 2004-05-15 Victor Leikehman <lei@haifasphere.co.il>
1328 * decl.c (add_init_expr_to_sym): Check for variable size arrays.
1330 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1332 * primary.c (match_boz_constant): Use gfc_notify_std() for
1333 issuing a warning or an error.
1335 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1338 * primary.c (match_structure_constructor): Rename ...
1339 (gfc_match_structure_constructor): ... to this. Make non-static.
1340 (gfc_match_rvalue): Call renamed function.
1341 * match.h (gfc_match_structure_constructor): Declare.
1342 * match.c (gfc_match_data_constant): Handle structure
1345 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1349 * gfortran.h (gfc_linebuf): New typedef.
1351 (gfc_file): Revamped, use new gfc_linebuf.
1352 (locus): Revamped, use new types.
1353 (gfc_current_file): Remove.
1354 (gfc_current_form, gfc_source_file): New global variables.
1355 * match.c (gfc_match_space, gfc_match_strings): Use
1356 gfc_current_form to find source form.
1357 * module.c (gfc_dump_module): Use gfc_source_file when printing
1359 * error.c (show_locus, show_loci) Use new data structures to print
1361 * scanner.c (first_file, first_duplicated_file, gfc_current_file):
1363 (file_head, current_file, gfc_current_form, line_head, line_tail,
1364 gfc_current_locus1, gfc_source_file): New global variables.
1365 (gfc_scanner_init1): Set new global variables.
1366 (gfc_scanner_done1): Free new data structures.
1367 (gfc_current_locus): Return pointer to gfc_current_locus1.
1368 (gfc_set_locus): Set gfc_current_locus1.
1369 (gfc_at_eof): Set new variables.
1370 (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
1371 to new locus structure.
1372 (gfc_check_include): Remove.
1373 (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
1374 (gfc_skip_comments): Use gfc_current_form, find locus with
1376 (gfc_next_char): Use gfc_current_form.
1377 (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
1378 (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
1380 (get_file): New function.
1381 (preprocessor_line, include_line): New functions.
1382 (load_file): Move down, rewrite to match new data structures.
1383 (gfc_new_file): Rewrite to match new data structures.
1384 * parse.c (next_statement): Remove code which is now useless. Use
1385 gfc_source_form and gfc_source_file where appropriate.
1386 * trans-decl.c (gfc_get_label_decl): adapt to new data structures
1387 when determining locus of frontend code.
1388 * trans-io.c (set_error_locus): Same.
1389 * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
1390 * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
1392 (all): Add missing initializers.
1394 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1396 * Make-lang.in (trans-common.o): Remove redundant dependency.
1397 (data.c): Replace object file name ...
1398 (data.o): ... by the correct one.
1400 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1402 * dump-parse-tree.c (gfc_show_array_ref): Print colon only
1403 for ranges when dumping array references.
1405 2004-05-14 Victor Leikehman <lei@haifasphere.co.il>
1407 * decl.c (variable_decl): Always apply default initializer.
1409 2004-05-08 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1412 * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
1413 handle zero correctly.
1415 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1417 * match.c (gfc_match): Eliminate dead code.
1419 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1421 * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
1422 Detect bad continuation line in fixed form sources.
1424 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1427 * iresolve.c (gfc_resolve_nearest): Add new function.
1428 * intrinsic.h: ... declare it here.
1429 * intrinsic.c (add_functions): ... add it as resolving function
1432 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1435 * match.c (gfc_match_do): Allow infinite loops with
1436 label-do-stmt. Do not enforce space after comma.
1438 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1441 * parse.c (parse_interface): Allow empty INTERFACE, remove
1444 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1446 * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
1447 decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
1448 expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
1449 intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
1450 matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
1451 primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
1452 trans-array.c, trans-array.h, trans-common.c, trans-const.c,
1453 trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
1454 trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
1455 trans-types.h, trans.c, trans.h: Update copyright years and
1457 * data.c: Likewise, also removed two whitespace-only lines.
1458 * gfortranspec.c, lang.opt: Update copyright years.
1460 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1463 * trans-decl.c (generate_local_decl): Don't warn for unused
1464 variables which are in common blocks.
1466 2004-05-13 Diego Novillo <dnovillo@redhat.com>
1468 * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
1469 trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
1470 trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
1472 2004-05-13 Victor Leikehman <lei@haifasphere.co.il>
1475 * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
1477 2004-05-13 Joseph S. Myers <jsm@polyomino.org.uk>
1479 * gfortran.texi: Use @table @emph instead of @itemize @emph.
1480 Remove "set DEVELOPMENT".
1481 (Compiling GFORTRAN): Remove.
1483 2004-05-09 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1485 * array.c (match_subscript, match_array_ref): Add comments
1486 explaining argument 'init'.
1487 * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
1488 trans-expr.c, trans.c: Fix some typos in comments.
1489 * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
1490 * primary.c (match_digits, match_integer_constant): Add comment
1491 explaining signflag.
1493 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1496 * primary.c: Include system.h and flags.h, needed for pedantic.
1497 (match_boz_constant): Allow "x" for hexadecimal constants, warn if
1500 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1503 * match.c (match_data_constant): Handle case where
1504 gfc_find_symbol sets sym to NULL
1506 2004-04-28 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1508 * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
1509 dependency on mathbuiltins.def
1511 2004-04-24 Victor Leikehman <lei@il.ibm.com>
1513 * trans-io.c (transfer_expr): Implemented recursive printing
1516 2004-04-24 Andrew Pinski <pinskia@physics.uc.edu>
1518 * gfortranspec.c: Do not include multilib.h.
1520 2004-04-24 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1522 * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
1523 2004 to copyright years.
1524 * trans-expr.c, trans-decl.c: Comment update, we now generate
1525 GENERIC, not SIMPLE. Add 2004 to copyright years.
1527 2004-04-24 Paul Brook <paul@codesourcery.com>
1529 * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
1531 2004-04-24 Feng Wang <fengwang@nudt.edu.cn>
1534 * arith.c (gfc_arith_divide): Fix complex divide.
1536 2004-04-23 Andrew Pinski <pinskia@physics.uc.edu>
1538 * gfortranspec.c: Include the target headers.
1540 2004-04-18 Feng Wang <fengwang@nudt.edu.cn>
1544 * arith.c (arctangent2): New function.
1545 * arith.h (arctangent2): Add function prototype.
1546 * simplify.c (gfc_simplify_atan2): Use it.
1547 (gfc_simplify_log): Use it.
1549 2004-04-12 Diego Novillo <dnovillo@redhat.com>
1551 * fortran/f95-lang.c (gfc_expand_stmt): Remove.
1552 (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
1554 2004-04-11 Bud Davis <bdavis9659@comcast.net>
1557 * trans-io.c (build_dt): Change REC to value.
1559 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
1562 * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
1563 the real value when converting mpf to string.
1565 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
1568 * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
1571 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
1574 * simplify.c (simplify_min_max): Convert the type of the result.
1576 2004-04-11 Paul Brook <paul@codesourcery.com>
1578 * gfortran.texi: Use full target triplet.
1580 2004-04-11 Paul Brook <paul@codesourcery.com>
1582 * Make-lang.in (GFORTRAN_TEXI): Set it.
1583 (fortran/dfortran.dvi): Use it. Add fortran to include paths.
1584 (fortran/gfortran.info): Ditto.
1585 * gfortran.texi: Major update.
1586 * invoke.texi: New file.
1588 2004-04-10 Paul Brook <paul@codesourcery.com>
1590 * trans-array.c (gfc_trans_allocate_temp_array,
1591 gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
1592 * trans-decl.c (gfc_build_dummy_array_decl,
1593 gfc_get_symbol_decl, gfc_build_function_decl,
1594 gfc_create_module_variable): Ditto.
1595 * trans-expr.c (gfc_conv_variable): Ditto.
1596 * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
1597 * trans.h (GFC_DECL_STRING): Remove.
1598 (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
1599 GFC_DECL_ASSIGN): Renumber flags.
1601 2004-04-05 Paul Brook <paul@codesourcery.com>
1605 * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
1607 * gfortran.h (struct gfc_charlen): Add backend_decl.
1608 * trans-array.c (gfc_trans_allocate_temp_array,
1609 gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
1610 (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
1611 Remove old, broken string handling.
1612 (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
1613 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
1614 gfc_trans_deferred_array): Handle character arrays.
1615 * trans-const.c (gfc_conv_const_charlen): New function.
1616 * trans-const.h (gfc_conv_const_charlen): Add prototype.
1617 * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
1619 (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
1620 (gfc_create_string_length): New function.
1621 (gfc_get_symbol_decl): Create lengths for character variables.
1622 (gfc_get_fake_result_decl): Ditto.
1623 (gfc_build_function_decl): Only set length for assumed length
1624 character arguments.
1625 (gfc_trans_dummy_character): New function.
1626 (gfc_trans_auto_character_variable): Rewrite.
1627 (gfc_trans_deferred_vars): Handle more types of character variable.
1628 (gfc_create_module_variable): String lengths have moved.
1629 (gfc_generate_function_code): Initialize deferred var chain earlier.
1630 * trans-expr.c (gfc_conv_init_string_length): Rename ...
1631 (gfc_trans_init_string_length): ... to this.
1632 (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
1633 gfc_conv_function_call): Update to new format for character variables.
1634 (gfc_conv_string_length): Remove.
1635 (gfc_conv_string_parameter): Update assertion.
1636 * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
1637 * trans-io.c (set_string): Use new macro names.
1638 * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
1639 * trans-types.c (gfc_get_character_type): Use existing length expr.
1640 (gfc_is_nodesc_array): Make public.
1641 (gfc_get_dtype_cst): Rename ...
1642 (gfc_get_dtype): ... to this. Handle unknown size arrays.
1643 (gfc_get_nodesc_array_type): Use new name.
1644 (gfc_sym_type): New character variable code.
1645 (gfc_get_derived_type): Ditto.
1646 (gfc_get_function_type): Evaluate character variable lengths.
1647 * trans-types.h (gfc_strlen_kind): Define.
1648 (gfc_is_nodesc_array): Add prototype.
1649 * trans.h: Update prototypes.
1650 (struct lang_type): Update comments.
1651 (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
1652 (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
1654 2004-04-04 Paul Brook <paul@codesourcery.com>
1656 * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
1657 * options.c (gfc_init.options, gfc_handle_option): Ditto.
1658 * trans-expr.c (gfc_conv_function_call): Ditto.
1659 * trans-types.c (gfc_is_nodesc_array): Ditto
1660 * lang.opt (fg77-calls): Remove.
1662 2004-04-04 Paul Brook <paul@codesourcery.com>
1664 * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
1665 (gfc_conv_descriptor_base): Rename ...
1666 (gfc_conv_descriptor_offset): ... to this.
1667 (gfc_trans_allocate_array_storage): Set offset to zero.
1668 (gfc_conv_array_base): Rename ...
1669 (gfc_conv_array_offset): ... to this.
1670 (gfc_conv_array_index_ref): Add offset parameter.
1671 (gfc_conv_array_ref): Include offset.
1672 (gfc_trans_preloop_setup): Use existing offset.
1673 (gfc_trans_allocate_temp_array, gfc_array_allocate,
1674 gfc_trans_auto_array_allocation, gfc_trans_g77_array,
1675 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
1676 gfc_conf_ss_descriptor): Set offset.
1677 * trans-array.h: Rename prototypes.
1678 * trans-const.h (gfc_index_zero_node): Define.
1679 * trans-decl.c (gfc_build_qualified_array): Change base to offset.
1680 * trans-types.c (gfc_get_array_type_bounds): Ditto.
1681 (gfc_get_nodesc_array_type): Calculate offset before upper bound.
1683 2004-03-25 Diego Novillo <dnovillo@redhat.com>
1685 * convert.c (convert): Don't handle WITH_RECORD_EXPR.
1687 2004-03-24 Bud Davis <bdavis9659@comcast.net>
1690 * arith.c (gfc_convert_integer,gfc_convert_real): Removed leading '+'
1691 before conversion by gmp library call.
1693 2004-03-24 Bud Davis <bdavis9659@comcast.net>
1696 * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
1698 2004-02-24 Richard Henderson <rth@redhat.com>
1700 * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
1702 2004-02-19 Loren J. Rittle <ljrittle@acm.org>
1704 * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
1705 (fortran/gfortran.info): ... to here.
1708 2004-02-16 Richard Henderson <rth@redhat.com>
1710 * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
1711 * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
1712 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
1713 (gfc_expand_function): Rename from expand_function_body, make static,
1714 don't do anything except invoke tree_rest_of_compilation.
1715 (gfc_be_parse_file): Invoke cgraph.
1716 (gfc_expand_decl): Remove.
1717 (gfc_init_builtin_functions): Add __builtin_init_trampoline and
1718 __builtin_adjust_trampoline.
1719 * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
1720 (gfc_finalize): New.
1721 (gfc_generate_function_code): Use it. Lower nested functions.
1722 * trans-expr.c (gfc_conv_function_call): Add static chain operand
1724 * trans.c (gfc_build_function_call): Likewise.
1725 * trans.h (expand_function_body): Remove.
1727 2004-02-15 Victor Leikehman <lei@il.ibm.com>
1730 * trans-decl.c (gfc_build_function_decl) For functions
1731 returning CHARACTER pass an extra length argument,
1732 following g77 calling conventions.
1733 * trans-types.c (gfc_get_function_type) Ditto.
1734 * trans-expr.c (gfc_conv_function_call) Ditto.
1736 2004-02-14 Paul Brook <paul@codesourcery.com>
1738 * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
1740 2004-02-12 Paul Brook <paul@nowt.org>
1744 2004-02-08 Steve Kargl <sgk@troutmask.apl.washington.edu>
1746 * gfortran.texi: Fix typos.
1748 2004-02-07 Bud Davis <bdavis9659@comcast.net>
1751 * intrinsic.c (add_conversions) Use logical conversion instead
1753 * trans-types.c (gfc_get_logical_type) implemented logical*1
1756 2004-01-17 Paul Brook <paul@codesourcery.com>
1758 * lang-specs.h: Remove %<fixed-form.
1760 2004-01-15 Toon Moene <toon@moene.indiv.nluug.nl>
1762 * lang-specs.h: Enable preprocessing of source files
1763 ending in .F, .fpp, .FPP, .F90 and .F95.
1765 2004-01-13 Toon Moene <toon@moene.indiv.nluug.nl>
1768 * lang-specs.h: Enable compilation of files ending
1769 in .f, .for and .FOR.
1771 2004-01-11 Paul Brook <paul@codesourcery.com>
1773 * trans-stmt.c (gfc_trans_if_1): New function.
1774 (gfc_trans_if): Use it.
1776 2004-01-11 Erik Schnetter <schnetter@uni-tuebingen.de>
1778 * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
1779 (gfc_option_t): Add max_identifier_length.
1780 * lang.opt: Add fmax-identifier-length.
1781 * match.c (parse_name): Use limit.
1782 * options.c (gfc_init_options): Set max_identifier_length.
1783 (gfc_handle_option): Ditto.
1785 2004-01-11 Feng Wang <fengwang@nudt.edu.cn>
1787 * intrinsic.c (add_functions): Add resolve function to dcmplx.
1788 * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
1789 * iresolve.c (gfc_resolve_dcmplx): New function.
1791 2004-01-10 Paul Brook <paul@codesourcery.com>
1793 * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
1794 * trans-types.c (gfc_sym_type): Handle external dummy procedures.
1795 (gfc_return_by_reference): Correct condition.
1796 (gfc_get_function_type): Ditto.
1798 2004-01-10 Paul Brook <paul@codesourcery.com>
1800 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
1803 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
1805 * iresolve.c: Use correct kind.
1807 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
1810 * trans-decl.c (gfc_create_module_variable): Output array valued
1813 2004-01-10 Paul Brook <paul@codesourcery.com>
1815 * resolve.c (resolve_branch): Get error message right way round.
1817 2004-01-10 Canqun Yang <canqun@nudt.edu.cn>
1819 * trans-array (gfc_conv_loop_setup): Adjust comment to track
1821 (gfc_array_allocate): Don't count size of element twice.
1823 2004-01-04 Paul Brook <paul@codesourcery.com>
1825 * lang.opt (i8, r8, std=*): Remove RejectNegative.
1827 2004-01-04 Paul Brook <paul@codesourcery.com>
1829 * error.c (gfc_notify_std): New function.
1830 * gfortran.h (gfc_notify_std): Declare.
1831 (GFC_STD_*): Define.
1832 (gfc_option_t): Add warn_std and allow_std.
1833 * intrinsic.c (gfc_init_expr_extensions): Fix logic.
1834 (gfc_intrinsic_func_interface): Use gfc_notify_std.
1835 * check.c (check_rest): Use gfc_notify_std.
1836 * match.c (gfc_match_pause): Ditto.
1837 (gfc_match_assign): Ditto.
1838 (gfc_match_goto): Ditto.
1839 * resolve.c (resolve_branch): Ditto.
1840 * lang.opt: Add std=<foo> and w.
1841 * options.c (gfc_init_options): Set allow_std and warn_std.
1842 (gfc_handle_option): Handle OPT_std_* and OPT_w.
1844 2004-01-01 Paul Brook <paul@codesourcery.com>
1846 * array.c (gfc_append_constructor): Take constructor, not expression.
1847 * data.c (struct gfc_expr_stack): Remove.
1848 (expr_stack): Remove.
1849 (find_con_by_offset): Rename from find_expr_in_con.
1850 (find_con_by_component): Rename from find_component_in_con.
1851 (gfc_get_expr_stack): Remove.
1852 (gfc_assign_data_value): Rewrite.
1853 (gfc_expr_push): Remove.
1854 (gfc_expr_pop): Remove.
1855 (gfc_advance_section): Rename from
1856 gfc_modify_index_and_calculate_offset. Handle unbounded sections.
1857 (gfc_get_section_index): Handle unbounded sections.
1858 * gfortran.h: Update prototypes.
1859 * resolve.c (check_data_variable): Array section maight not be the
1862 2004-01-01 Paul Brook <paul@codesourcery.com>
1865 * resolve.c (resolve_symbol): Allow assumed length function results.
1867 2004-01-01 Steve Kargl <sgk@troutmask.apl.washington.edu>
1869 * match.c (gfc_match_pause): Fix spelling.
1871 2004-01-01 Steven Bosscher <stevenb@suse.de>
1874 * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
1875 reference from the expression.
1877 2003-12-26 Feng Wang <fengwang@nudt.edu.cn>
1879 * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
1881 * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
1882 (gfc_exec_op): New EXEC_LABEL_ASSIGN.
1883 (symbol_attribute):New variable attribute: assign.
1884 * io.c (resolve_tag):Integer variable is allowed.
1885 (match_dt_format): Add ASSIGN statement. Set assign flag.
1886 * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
1887 (gfc_match_assign): Add ASSIGN statement. Set assign flag.
1888 (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
1889 * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
1890 (next_statement): Add ST_LABEL_ASSIGNMENT.
1891 (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
1892 * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
1893 (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
1894 * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
1895 * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
1896 assign. Put them into the stuct lang_decl.
1897 * trans-io.c (set_string): Add the assign statement.
1898 * trans-stmt.c (gfc_trans_label_assign): New function.
1899 (gfc_trans_goto): Translate ASSIGNED GOTO statement.
1900 * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
1901 * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
1902 * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
1903 (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
1904 (GFC_DECL_ASSIGN(node)): New macro to access flag.
1906 2003-12-31 Huang Chun <chunhuang73@hotmail.com>
1909 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
1912 2003-12-22 Toon Moene <toon@moene.indiv.nluug.nl>
1914 * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
1915 that arguments to subroutines/functions can't alias themselves, nor global
1918 2003-12-20 Steven Bosscher <stevenb@suse.de>
1920 * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
1921 * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
1923 2003-12-12 Huang Chun <chunhuang73@hotmail.com>
1925 * primary.c (match_substring): Fix substring bug for start point
1926 or end point is NULL.
1927 * trans-expr.c (gfc_conv_substring): Ditto
1928 * trans-types.c (gfc_sym_type): Get correct type of scalar
1929 character variables.
1930 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
1933 2003-12-10 Richard Henderson <rth@redhat.com>
1935 * options.c (gfc_post_options): Don't ever use rtl inlining.
1937 2003-12-05 Canqun Yang <canqun@nudt.edu.cn>
1939 * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
1940 * trans-equivalence.c: Remove.
1941 * trans-decl.c (gfc_get_symbol_decl): Update to match.
1942 (gfc_generate_function_code): Ditto.
1943 * trans-array.c (gfc_conv_array_parameter): Ditto.
1944 * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
1945 (F95_ADDITIONAL_OBJS): Add stor-layout.o
1946 * trans.h (gfc_trans_equivalence): Remove.
1947 * gfortran.h (struct gfc_equiv): Add used field.
1948 (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
1949 equiv_offset fields.
1951 2003-12-05 Richard Henderson <rth@redhat.com>
1953 * trans.c (gfc_build_addr_expr): New.
1954 (gfc_build_indirect_ref, gfc_build_array_ref): New.
1955 * trans.h: Declare them.
1956 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
1957 trans-stmt.c, trans.c (*): Use them.
1959 * f95-lang.c (gfc_post_options): Remove dead prototype.
1960 * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
1961 * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
1964 2003-12-01 Feng Wang <fengwang@nudt.edu.cn>
1966 * io.c (gfc_match_format): Check for missing format label.
1968 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
1971 * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
1972 from interfaces in modules.
1974 2003-11-30 Paul Brook <paul@nowt.org>
1976 * trans-array.c (gfc_trans_g77_array): Make non-static.
1977 (gfc_trans_assumed_size): Remove.
1978 (gfc_trans_dummy_array_bias): Explicitly free temporary.
1979 * trans-array.h (gfc_trans_g77_array): Add prototype.
1980 (gfc_trans_assumed_size): Remove.
1981 * trans-decls.c (gfor_fndecl_push_context): Remove.
1982 (gfor_fndecl_pop_context): Remove.
1983 (gfc_build_function)decls): Don't create them.
1984 (gfc_trans_deferred_vars): Update to match. Remove dead code.
1985 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
1987 2003-11-30 Kejia Zhao <kejia_zh@nudt.edu.cn>
1989 * trans-array.c (gfc_conv_array_parameter): Simplify
1990 array argument passing for array name actual argument.
1991 * trans-expr.c (gfc_conv_function_call): Ditto
1992 * trans-types.c (gfc_is_nodesc_array):Ditto.
1994 2003-11-30 Paul Brook <paul@nowt.org>
1996 * f95-lang.c (gfc_post_options): Move ...
1997 * options.c (gfc_post_options): .. to here. Handle inlining options.
1998 * gfortran.h (gfc_post_options): Add prototype.
2000 2003-11-28 Richard Henderson <rth@redhat.com>
2002 * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
2004 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
2006 * trans.h (has_alternate_specifier): New global variable.
2007 * match.c (gfc_match_call): Handle actual arguments associated with
2008 alternate return indicators.
2009 * trans-expr.c (gfc_conv_function_call): Ditto
2010 * trans-stmt.c (gfc_trans_call): Ditto
2011 (gfc_trans_return): Handle return statement with value.
2012 * trans-decl.c (gfc_generate_function_code): Handle functions with
2014 (gfc_get_fake_result_decl): Ditto
2015 * trans-types.c (gfc_get_function_type): Ditto
2016 * resolve.c (resolve_actual_arglist): Check alternate return indicators.
2017 (resolve_formal_arglist): Check asterisk dummy.
2019 2003-11-27 Paul Brook <paul@nowt.org>
2021 * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
2022 allocation interface.
2023 (gfc_conv_ array_parameter): Ditto.
2024 (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
2025 * trans-array.c: Update prototype.
2026 * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
2027 (gfc_trans_auto_character_variable): Use new memory alloc interface.
2028 * trans-expr.c (gfc_conv_string_tmp): Ditto.
2029 (gfc_conv_function_call): Use gfc_conv_string_tmp.
2030 * trans-stmt.c (gfc_do_allocate): Use new memory alloc interface.
2031 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
2032 * trans.h (gfc_ss_info): Remove unused pdata field.
2033 * trans.c (gfc_create_var_np): Change T to V.
2035 2003-11-26 Richard Henderson <rth@redhat.com>
2037 * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
2038 * trans-intrinsic.c (gfc_intrinsic_map): ... here. Add SCALE,
2039 FRACTION, NEAREST, SET_EXPONENT.
2040 (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
2041 Fix GTY marking. Remove unnecessary const's.
2042 (LIBM_FUNCTION): Rename from I_LIB.
2043 (LIBF_FUNCTION): New.
2044 (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
2045 conventions. Assume the expr signature is correct. Mark const.
2046 (gfc_conv_intrinsic_exponent): Use library functions.
2047 (gfc_conv_intrinsic_set_exponent): Remove.
2048 (gfc_conv_intrinsic_scale): Remove.
2049 (gfc_conv_intrinsic_nearest): Remove.
2050 (gfc_conv_intrinsic_fraction): Remove.
2051 (gfc_conv_intrinsic_function): Update.
2052 * trans-decl.c (gfor_fndecl_math_exponent4): New.
2053 (gfor_fndecl_math_exponent8): New.
2054 (gfc_build_intrinsic_function_decls): Set them.
2055 * trans.h: Declare them.
2057 2003-11-25 Canqun Yang <canqun@nudt.edu.cn>
2059 * trans-common.c (gfc_layout_global_equiv): Locate the error for
2060 underflow COMMON block.
2061 (gfc_trans_one_common): Fix bug for size of COMMON block containing
2062 EQUIVALENCE object. Also fix typo in an error message.
2064 2003-11-25 Diego Novillo <dnovillo@redhat.com>
2066 * Make-lang.in: Add check-gfortran to lang_checks.
2067 (check-f95): Alias for check-gfortran.
2069 2003-11-25 Jason Merrill <jason@redhat.com>
2071 * Make-lang.in (f95.tags): Create TAGS.sub files in each
2072 directory and TAGS files that include them for each front end.
2074 2003-11-24 Paul Brook <paul@nowt.org>
2077 * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
2079 2003-11-24 Paul Brook <paul@nowt.org>
2081 * expr.c (simplify_const_ref): Return SUCCESS for things we don't
2083 * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
2085 2003-11-24 Paul Brook <paul@nowt.org>
2088 * array.c (gfc_array_ref_shape): Handle elemental dimensions.
2089 * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
2091 2003-11-20 Richard Henderson <rth@redhat.com>
2093 * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
2094 (gfc_conv_array_base): Likewise.
2095 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
2096 * trans-expr.c (gfc_conv_string_tmp): Likewise.
2097 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
2098 * trans-stmt.c (gfc_trans_character_select): Likewise.
2100 2003-11-13 Paul Brook <paul@nowt.org>
2102 * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
2104 2003-11-13 Canqun Yang <canqun@nudt.edu.cn>
2106 * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
2107 (resolve_equivalence): New function.
2108 (resolve_equivalence_derived): New function.
2110 2003-11-12 Richard Henderson <rth@redhat.com>
2112 * trans.c (gfc_trans_code): Use annotate_with_locus instead of
2113 annotate_all_with_locus.
2115 2003-11-11 Canqun Yang <canqun@nudt.edu.cn>
2117 * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
2118 * trans-decl.c (gfc_finish_var_decl): Modified.
2120 2003-11-08 Paul Brook <paul@nowt.org>
2123 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
2126 2003-11-06 Paul Brook <paul@nowt.org>
2128 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
2130 2003-11-02 Canqun Yang <canqun@nudt.edu.cn>
2132 * match.c (gfc_match_stopcode): Assign '0' to stop_code.
2134 2003-10-27 Anthony Green <green@redhat.com>
2136 * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
2137 (f95.stagefeedback): Ditto.
2139 2003-10-27 Andrew Pinski <pinskia@physics.uc.edu>
2142 * Make-lang.in (f95.stageprofile): Add.
2143 (f95.stagefeedback): Add.
2145 2003-10-23 Richard Henderson <rth@redhat.com>
2147 * f96-lang.c (gfc_gimplify_expr): Remove.
2148 (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
2149 (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
2151 2003-10-23 Richard Henderson <rth@redhat.com>
2153 * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
2155 2003-10-20 Paul Brook <paul@nowt.org>
2157 * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
2158 * trans-stmt.c (gfc_trans_do_while): Ditto.
2160 2003-10-17 Paul Brook <paul@nowt.org>
2162 * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
2164 2003-10-17 Paul Brook <paul@nowt.org>
2166 * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
2168 2003-10-17 Feng Wang <wf_cs@yahoo.com>
2170 * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
2171 (gfc_resolve_minloc): Ditto.
2172 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
2173 Return the value after subtracting the lower bound.
2175 2003-10-16 Richard Henderson <rth@redhat.com>
2177 * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
2179 2003-10-16 Steven Bosscher <steven@gcc.gnu.org>
2181 * lang.c: Remove -M option for now, it's in the way for C.
2183 2003-10-14 Jason Merrill <jason@redhat.com>
2185 * Make-lang.in (f95.tags): New rule.
2187 2003-10-13 Richard Henderson <rth@redhat.com>
2189 * trans.c (gfc_trans_code): Use annotate_all_with_locus.
2191 2003-10-13 Paul Brook <paul@nowt.org>
2193 * trans-decl.c (generate_local_decl): Don't create junk variables.
2195 2003-10-13 Paul Brook <paul@nowt.org>
2197 * resolve.c (resolve_formal_arglist): Use function result decl in
2198 preference to function decl.
2200 2003-10-12 Richard Henderson <rth@redhat.com>
2202 * f95-lang.c (gfc_define_builtin): New const_p argument. Set
2203 TREE_READONLY. Update all callers.
2205 2003-10-12 Feng Wang <wf_cs@yahoo.com>
2207 * iresolve.c (gfc_resolve_cshift): Change to match implementation.
2208 * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
2209 (gfc_is_intrinsic_libcall): Add CSHIFT.
2211 2003-10-12 Richard Henderson <rth@redhat.com>
2213 * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
2214 (gfc_trans_array_constructor_value): Likewise.
2215 (gfc_conv_array_initializer): Likewise.
2216 * trans-stmt.c (gfc_trans_character_select): Likewise.
2218 2003-11-12 Kejia Zhao <kejia_zh@yahoo.com.cn>
2220 * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
2222 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
2224 * check.c (gfc_check_repeat): Check arguments are scalar.
2225 (gfc_check_trim): New function.
2226 * intrinsic.h (gfc_check_trim): Add prototype.
2227 * intrinsic.c (add_functions): Use it.
2228 * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
2230 * trans-decl.c: Ditto.
2231 (gfc_build_intrinsic_fucntion_decls): Set them.
2232 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
2233 (gfc_conv_intrinsic_trim): New function.
2234 (gfc_conv_intrinsic_repeat): New function.
2235 (gfc_conv_intrinsic_function): Use them.
2237 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
2239 * trans-types.c (gfc_sym_type): Handle result variables.
2241 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
2243 * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
2244 gfc_get_character_type.
2246 2003-10-11 Feng Wang <wf_cs@yahoo.com>
2248 * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
2250 2003-10-11 Paul Brook <paul@nowt.org>
2252 * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
2253 (gfc_resolve_dprod): New function.
2254 (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
2255 * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
2256 (gfc_resolve_dprod): Declare.
2257 * intrinsic.c (add_functions): Use them.
2258 * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
2260 2003-10-06 Richard Henderson <rth@redhat.com>
2262 * f95-lang.c (gfc_init_builtin_functions): Add clzll.
2263 * trans-intrinsic.c (call_builtin_clz): Use it.
2265 2003-10-05 Paul Brook <paul@nowt.org>
2267 * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
2268 * trans-decl.c (gfc_generate_function_code): Set
2269 cfun->function_end_locus.
2271 2003-09-24 Jason Merrill <jason@redhat.com>
2273 * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
2276 2003-09-21 Lifang Zeng <zlf605@hotmail.com>
2277 Paul Brook <paul@nowt.org>
2279 * Make-lang.in (F95_OBJS): Add fortran/data.o.
2280 * array.c (gfc_inser_constructor): New function.
2281 (gfc_get_constructor): New function.
2282 (gfc_free_constructor): Initialize offset and repeat.
2283 (iterator_stack): Remove.
2284 (expand_info): Add offset, component and repeat fields.
2285 (expand_constructor): Set them.
2286 (expand): Set new fields.
2287 (gfc_copy_constructor): Ditto. Avoid recursion.
2288 * gfortran.h: Add prototypes for new functions.
2289 (gfc_constructor): Add offset, component and repeat.
2290 (iteratio_stack): Move to here.
2291 * resolve.c (check_data_variable): Convert data values into variable
2293 (traverse_data_list): Build implicit loop chain.
2294 (gfc_resolve): Ditto.
2295 * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
2296 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
2297 * trans-expr.c (gfc_conv_structure): Handle array initializers.
2298 (gfc_conv_expr): Update to match.
2299 * trans.h (gfc_conv_structure): Declare.
2302 2003-09-20 Kejia Zhao <kejia_zh@yahoo.com.cn>
2304 * trans.h: Add declarations for gfor_fndecl_si_kind and
2305 gfor_fndecl_sr_kind.
2306 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
2307 * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
2308 (g95_conv_intrinsic_sr_kind): New function.
2309 (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
2312 2003-09-17 Lars Segerlund <Lars.Segerlund@comsys.se>
2314 * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
2315 instead of _4 and _8 as postfix for libgfortran calls.
2317 2003-09-16 Paul Brook <paul@nowt.org>
2319 * array.c (compare_bounds): New function.
2320 (gfc_compare_array_spec): Use it.
2322 2003-09-14 Paul Brook <paul@nowt.org>
2324 * primary.c (gfc_match_rvalue): Make sure sym->result is set.
2325 * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
2327 2003-09-14 Paul Brook <paul@nowt.org>
2329 * check.c (dim_rank_check): Allow assumed bounds if requested.
2330 (gfc_check_lbound): Call it.
2331 (gfc_check_ubound): Ditto.
2332 (gfc_check_size): Change to match.
2333 * simplify.c (gfc_simplify_bound): New function.
2334 (gfc_simplify_lbound): New function.
2335 (gfc_simplify_ubound): New function.
2336 * intrinsic.h: Declare them.
2337 * intrinsic.c (add_functions): Use them.
2339 2003-09-14 Paul Brook <paul@nowt.org>
2341 * io.c (format_lex): Initialize negative_flag.
2342 (check_format): Intialize repeat.
2343 * trans-io.c (gfc_new_nml_name_expr): Declare static.
2344 (gfc_new_var_expr): Ditto.
2346 2003-09-14 Paul Brook <paul@nowt.org>
2348 * trans-array.c (gfc_conv_array_initializer): Handle derived types.
2349 * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
2351 2003-09-12 Paul Brook <paul@nowt.org>
2353 * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
2355 2003-09-12 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
2357 * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
2358 for a correct expression.
2360 2003-09-10 Kejia Zhao <kejia_zh@yahoo.com.cn>
2362 * trans-intrinsic.c (real_compnt_info): New struct.
2363 (prepare_arg_info): New function.
2364 (gfc_conv_intrinsic_set_exponent): New function.
2365 (gfc_conv_intrinsic_scale): New function.
2366 (gfc_conv_intrinsic_nearest): New function.
2367 (gfc_conv_intrinsic_fraction): New function.
2368 (gfc_conv_intrinsic_exponent): New function.
2369 (gfc_conv_intrinsic_spacing): New function.
2370 (gfc_conv_intrinsic_rrspacing): New function.
2371 (gfc_conv_intrinsic_function): Use them.
2373 2003-08-24 XiaoQiang Zhang (zhangapache@yahoo.com>
2375 * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
2376 build_int_2 changed from (high, low) to (low, high).
2377 * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
2378 ioparm_namelist_read_mode, iocall_set_nml_val_int,
2379 iocall_set_nml_val_float, iocall_set_nml_val_char,
2380 iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
2381 (gfc_build_io_library_fndecls): Add variable initialization.
2382 (gfc_new_nml_name_expr, get_new_var_expr): New function.
2383 (build_dt): Add namelist support.
2384 * io.c (value): New variable.
2385 (check_format): Support FMT_H now.
2387 2003-09-07 Paul Brook <paul@nowt.org>
2389 * io.c (gfc_resolve_dt): Error if format label is not defined.
2391 2003-09-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
2393 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
2394 about case_switch's break. The other is about building the condition
2395 statement tree, which judges the argument in the range of the
2396 corresponding integer type.
2397 * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
2398 for the large values.
2400 2003-09-05 Paul Brook <paul@nowt.org>
2402 * f95-lang.c (expand_function_body): Gimplify the function.
2404 2003-09-04 Jeff Law <law@redhat.com>
2406 * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
2409 2003-09-04 Paul Brook <paul@nowt.org>
2411 * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
2412 (gfc_expand_stmt): New function.
2413 (LANG_HOOKS_RTL_EXPAND_STMT): Define.
2414 (expand_function_body): Use tree_rest_of_compilation.
2415 * trans-decl.c (gfc_generate_function_code): Don't free cfun.
2417 2003-09-03 Jeff Law <law@redhat.com>
2419 * f95-lang.c (gfc_init_builtin_functions): C arrays start at
2422 2003-08-30 Paul Brook <paul@nowt.org>
2424 * f95-lang.c (builtin_function): Remove #if 0 code.
2425 (gfc_define_builtin): New function.
2426 (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
2427 * mathbuiltins.def: New file.
2428 * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
2429 (gfc_intrinsic_map): Use mathbuiltins.def.
2430 (gfc_intrinsic_builtin_t): Remove.
2431 (gfc_build_intrinsic_lib_fndecls): Update.
2432 * trans-types.c (gfc_init_types): Remove redundant initilaization of
2433 signed_size_type_node.
2435 2003-08-29 Paul Brook <paul@nowt.org>
2437 * arith.c (gfc_real_kinds): Use correct minimum exponents.
2439 2003-08-22 Kejia Zhao <kejia_zh@yahoo.com.cn>
2441 * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
2442 (gfc_conv_intrinsic_function): Add MODULO.
2444 2003-08-22 Jason Merrill <jason@redhat.com>
2446 * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
2448 2003-08-22 Andreas Jaeger <aj@suse.de>
2450 * Make-lang.in (f95.install-common): Add DESTDIR support.
2451 * (f95.install-info): Likewise.
2452 (f95.uninstall): Likewise.
2454 2003-08-19 Diego Novillo <dnovillo@redhat.com>
2456 * trans-types.c (gfc_init_types): Initialize
2457 signed_size_type_node with size_type_node.
2459 2003-08-18 Paul Brook <paul@nowt.org>
2461 * dependency.c (gfc_dependency): New enum.
2462 (check_another_array_ref): Remove.
2463 (gfc_get_array_from_component): Remove.
2465 (get_range): Remove.
2466 (get_no_of_elements): Use mpz_t, not mpf_t.
2467 (transform_sections): New function.
2468 (gfc_check_range_range): Rename ...
2469 (gfc_check_section_vs_section): ... to this. Use new function.
2470 (gfc_is_inside_range): Rewrite to match.
2471 (gfc_check_element_vs_section): Ditto.
2472 (gfc_check_element_vs_element): Ditto.
2474 (gfc_dep_resolver): Ditto. Remove unused parameter.
2475 * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
2476 gfc_check_element_vs_element, gfc_is_inside_range,
2477 gfc_get_array_from_component): Remove prototypes for static functions.
2478 (gfc_dep_resolver): Update prototype.
2479 * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
2481 2003-08-15 Paul Brook <paul@nowt.org>
2483 * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
2484 return values to parent scope.
2485 (gfc_build_dummy_array_decl): Ditto.
2487 2003-08-14 Paul Brook <paul@nowt.org>
2489 * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
2490 size of the type, not the pointer.
2491 * resolve.c (resolve_symbol): Give more accurate error message.
2493 2003-08-10 Paul Brook <paul@nowt.org>
2495 * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
2497 2003-08-10 Paul Brook <paul@nowt.org>
2499 * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
2502 2003-08-10 Chun Huang <compiler@sohu.com>
2504 * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
2505 (resolve_symbol): Ditto.
2506 * trans-expr.c (gfc_conv_statement_function): New function.
2507 (gfc_conv_function_expr): Use it.
2509 2003-08-10 Paul Brook <paul@nowt.org>
2511 * trans-array.c (gfc_conv_ss_startstride): Handle functions.
2512 (walk_function_expr): Set section rank.
2513 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
2515 2003-08-10 Paul Brook <paul@nowt.org>
2517 * intrinsic.c (add_sym): Prefix names with correct string.
2518 (add_sym_0s): New function.
2519 (add_subroutines): Register abort.
2521 2003-08-10 Erik Schnetter <schnetter@uni-tuebingen.de>
2523 * gfortran.h: Introduce options to control the mangling.
2524 * lang.opt: Likewise.
2525 * options.c (gfc_init_options): Handle the options.
2526 * trans-common.c (gfc_sym_mangled_common_id): New function.
2527 (gfc_build_common_decl): Call it.
2528 * trans-decl.c (gfc_sym_mangled_function_id): New function.
2529 (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
2531 2003-08-09 Paul Brook <paul@nowt.org>
2533 * module.c (mio_symbol): Always ouput a namespace for formal args.
2534 (load_needed): Namespace now belong to their proper symbol.
2535 (gfc_dump_module): Change G95=>GFORTRAN.
2537 2003-08-05 Paul Brook <paul@nowt.org>
2539 * options.c: Force -fg77-calls.
2541 2003-08-02 Paul Brook <paul@nowt.org>
2543 * Makelang.in: Rename G95_* to GFORTRAN_*.
2544 * All sources: Rename G95_* to GFC_*.
2546 2003-08-01 Paul Brook <paul@nowt.org>
2548 * fortran/Make-lang.in: Use GMPLIBS.
2549 * fortran/config-lang.in: Set need_gmp.
2550 * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
2552 2003-07-27 Andreas Jaeger <aj@suse.de>
2554 * trans-decl.c (gfc_generate_constructors): Convert prototype to
2556 * trans-const.c (gfc_init_constants): Likewise.
2557 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
2559 * gfortranspec.c: Convert to ISO C90.
2560 (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
2562 2003-07-26 Paul Brook <paul@nowt.org>
2564 * lang.opt: Add -fdump-parse-tree.
2565 * options.c (gfc_handle_option): Ditto.
2566 * resolve.c (resolve_forall_iterators): Convert to proper type.
2567 * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
2569 2003-07-26 Paul Brook <paul@nowt.org>
2571 * Makefile.in: Add build dependencies on files common with rest of gcc.
2573 2003-07-26 Lifang Zeng <zlf605@hotmail.com>
2575 * trans.h: Declare g95_trans_pointer_assignment.
2576 * trans-expr.c (g95_trans_pointer_assignment): New function.
2577 (g95_trans_pointer_assign): Use it.
2578 * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
2579 (g95_trans_pointer_assign_need_temp): New function.
2581 2003-07-26 Paul Brook <paul@nowt.org>
2583 * gfortran.texi: Replace references to g95.
2585 2003-07-26 Paul Brook <paul@nowt.org>
2587 Rename g95_* to gfc_*.
2589 2003-07-25 Paul Brook <paul@nowt.org>
2591 * gfortran.h: Rename from g95.h.
2592 * trans-types.c (boolean_type_node, booelan_true_node,
2593 boolean_false_node): Remove.
2594 * trans-types.h: Ditto.
2596 2003-07-25 Chun Huang <compiler@sohu.com>
2598 * parse.c (accept_statement): Implement BLOCK DATA statement.
2599 * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
2602 2003-07-24 Lifang Zeng <zlf605@hotmail.com>
2604 * trans-stmt.c (temporary_list): Define.
2605 (g95_trans_assign_need_temp): New function.
2606 (g95_trans_forall_1): Modified for WHERE.
2607 (g95_trans_where_assign): Modified.
2608 (g95_trans_where_2): Modified.
2609 (g95_evaluate_where_mask): Modified.
2610 (g95_trans_where): Modified.
2611 (g95_get_temp_expr): Removed.
2612 (g95_add_to_where_stmt_list): Removed.
2613 (compute_overall_iter_number): Modified for WHERE.
2614 * trans.h: Remove where_stmt_list.
2616 2003-07-24 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2618 * lang.opt: Correct description of options -J and -M.
2620 2003-07-23 Steven Bosscher <steven@gcc.gnu.org>
2622 * lang.opt: Move help text to here.
2623 * lang-options.h: Remove.
2625 2003-07-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2626 * iresolve.c (g95_resolve_transpose): Proper variable in switch.
2627 * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
2630 2003-07-22 Steven Bosscher <steven@gcc.gnu.org>
2631 Paul Brook <paul@nowt.org>
2633 * check.c (check_rest): Use global pedantic flag.
2634 * io.c (data_desc): Ditto.
2635 * error.c (g95_warning, g95_warning_now): Use global flag.
2636 * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
2637 (expand_function_body): Update to new prototypes.
2638 (g95_init): Use new option names.
2639 * g95.h (g95_option_t): Standardize names.
2640 (g95_init_options, g95_handle_option): Update prototypes.
2641 * interface.c: Use new option names.
2648 * simplify.c: Ditto.
2650 * trans-array.c: Ditto.
2651 * trans-expr.c: Ditto.
2652 * trans-types.c: Ditto.
2653 * trans-decl.c: Ditto.
2654 (g95_build_library_function_decl): Remove obsolete VPARAMS.
2656 * options.c (g95_display_help): Remove.
2657 (g95_init_options): Convert to new scheme.
2659 (g95module_option): Ditto, rename from g95_parse_arg.
2660 (g95_handle_module_path_options): New function.
2661 * trans-equivalence.c: Fix error message.
2662 * lang.opt: Corrections.
2664 2003-07-21 Steven Bosscher <steven@gcc.gnu.org>
2666 * lang.opt: New file.
2668 2003-07-21 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2670 * decl.c (match_attr_spec): Set colon_seen.
2672 2003-07-14 Paul Brook <paul@nowt.org>
2674 * trans-array.c: Update comment.
2675 (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
2676 * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
2677 minmaxloc,minmaxval): Ditto.
2678 * trans-io.c (g95_trans_transfer): Ditto.
2679 * trans-stmt.c: Remove unneeded prototypes.
2680 (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
2681 (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
2682 (compute_inner_temp_size): Remove bits of dead code. Add comments.
2683 Don't share loopinfo.
2684 (compute_overall_iter_number): Declare as static.
2685 (allocate_temp_for_forall_nest): Ditto.
2686 (g95_trans_forall_1): Don't pass shared loopinfo.
2687 * trans.c (g95_start_block): Expand comment.
2689 2003-07-12 Paul Brook <paul@nowt.org>
2691 * arith.c (g95_index_integer_kind): Remove unused initializer.
2692 * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
2693 index by size of element.
2694 (generate_loop_for_rhs_to_temp): Ditto.
2695 (allocate_temp_for_forall_nest): Use element size, not index size.
2697 2003-07-11 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2699 * arith.c (g95_index_integer_kind): Add a TODO.
2700 * simplify.c (g95_simplify_nearest): Add a TODO.
2702 2003-07-09 Chun Huang <compiler@sohu.com>
2704 * trans.h: Add declarations for gfor_fndecl_string_scan and
2705 gfor_fndecl_string_verify.
2706 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
2707 * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
2708 (g95_conv_intrinsic_verify): New function.
2709 (g95_conv_intrinsic_function): Add SCAN and VERIFY.
2710 * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
2711 of parameter 'BACK=.TRUE.'
2713 2003-07-05 Lifang Zeng <zlf605@hotmail.com>
2715 * trans-stmt.c (iter_info, forall_info): Define.
2716 (g95_trans_forall_block): Remove.
2717 (g95_trans_forall_loop): Use forall info blocks.
2718 (g95_trans_nested_forall_loop): New function.
2719 (g95_do_allocate): Handle things other than logical masks.
2720 (generate_loop_for_temp_to_lhs): New function.
2721 (generate_loop_for_rsh_to_temp): New function.
2722 (compute_inner_temp_size): New function.
2723 (compute_overall_iter_number): New function.
2724 (allocate_temp_for_forall_nest): New function.
2725 (g95_trans_forall): Move body ...
2726 (g95_trans_forall_1): ... to here. Handle loops with temporaries.
2728 2003-07-02 Paul Brook <paul@nowt.org>
2730 * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
2731 in correct scope. Change callers to match.
2732 * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
2733 * iresolve.c (g95_resolve_reshape): Only use constant shapes.
2735 2003-07-02 Paul Brook <paul@nowt.org>
2737 * trans-array.c (g95_conv_loop_setup): Remove dead var. Use
2738 expression shape for all expressions.
2739 * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
2741 2003-07-03 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2743 * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
2744 g95_parse_arg), intrinsic.c (g95_convert_type): support of
2746 * intrinsic.c, g95.h: Add g95_convert_type_warn,
2747 * resolve.c (g95_resolve_index): Call it.
2749 2003-07-02 Paul Brook <paul@nowt.org>
2751 * iresolve.c (g95_resolve_reshape): Set expression shape.
2752 (g95_resolve_shape): Ditto.
2753 * simplify.c (g95_simplify_shape): Move common code outside condition.
2754 * trans-array.c (g95_conv_array_initializer): Teach it how to count.
2756 2003-07-01 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2758 * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
2761 2003-06-29 Paul Brook <paul@nowt.org>
2763 * array.c (g95_simplify_iterator_var): Don't bother with return value.
2764 * expr.c (find_array_element, find_component_ref): New functions.
2765 (remove_subobject_ref): New function.
2766 (simplify_const_ref): Use them. Rename from simplify_component_ref.
2767 (simplify_ref_chain): New function.
2768 (g95_simplify_expr): Use it. Simplify parameter variable subobjects.
2769 (g95_specification_expr): Simplify the expression.
2770 * resolve.c (resolve_operator): Check simplifications return code.
2771 (g95_resolve_expr): Ditto.
2773 2003-06-26 Paul Brook <paul@nowt.org>
2775 * expr.c (simplify_component_ref): New function.
2776 (g95_simplify_expr): Use it.
2777 * resolve.c (resolve_structure_cons): Handle references.
2779 2003-06-25 Paul Brook <paul@nowt.org>
2781 * trans-io.c (build_dt): Handle internal units.
2783 2003-06-25 Canqun Yang <canqun@yahoo.com.cn>
2785 * trans-common.c (g95_build_common_decl): Array index range starts at 0.
2786 (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
2787 Use g95_array_index_type instead of integer_type_node.
2788 (g95_build_common_decl, g95_set_common_master_type): Use
2789 g95_character1_type_node instead of char_type_node.
2790 * trans-equivalence.c (g95_layout_local_equiv): As above.
2792 2003-06-24 Steven G. Kargl <kargls@attbi.com>
2794 * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
2795 remove last remains of -fquiet.
2797 2003-06-22 Paul Brook <paul@nowt.org>
2799 * resolve.c (resolve_operator): Don't fail if we can't simplify.
2800 (g95_resolve_expr): Ditto.
2801 (resolce_code): Mark as static.
2802 * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
2803 gimplifer doesn't (yet).
2805 2003-06-20 Paul Brook <paul@nowt.org>
2807 * g95.h: Add ST_PAUSE and EXEC_PAUSE.
2808 * match.c (g95_match_if): Add ST_PAUSE.
2809 (g95_match_stopcode): New function.
2810 (g95_match_pause, g95_match_stop): Use it.
2811 * parse.c (g95_ascii_statement): Handle ST_PAUSE.
2812 (decode_stmt, next_statement, parse_executable): Ditto.
2813 * resolve.c (resolve_code): Ditto.
2814 * st.c (g95_free_statement): Ditto.
2815 * trans-stmt.c (g95_trans_pause): New function.
2816 * trans-stmt.h: Declare it.
2817 * trans.c (g95_trans_code): Use it.
2818 * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
2820 (g95_build_builtin_function_decls): Initialize them.
2822 * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
2824 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2826 * io.c (g95_match_open , g95_match_close, g95_match_inquire,
2827 match_filepos): Fix error handling.
2829 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2831 * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
2832 Add assertions on arguments.
2833 * resolve.c (expression_shape): Remove useless &.
2834 * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
2835 g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
2836 g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
2837 g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
2838 g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
2839 g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
2840 (g95_simplify_not, g95_simplify_scale): Add assertions.
2842 2003-06-15 Paul Brook <paul@nowt.org>
2844 Clean up stuff to work with the ssa optimizers.
2845 * convert.c (convert): Handle BOOLEAN_TYPEs.
2846 * f95-lang.c (g95_truthvalue_conversion): Implement.
2847 * trans-array.c (g95_trans_array_constructor_value): Group multiple
2849 * trans.h (g95_truthvalue_conversion): Declare.
2850 * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
2851 * trans-stmt.c (g95_trans_character_select): Don't create array
2852 assignments. Mark labels as indirect jump targets.
2853 * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
2854 (g95_get_dtype_cst): Handle LOGICAL types.
2856 2003-06-14 Paul Brook <paul@nowt.org>
2858 * f95-lang.c (g95_gimplify_expr): New function.
2859 * trans-array.c (g95_trans_array_constructor_value): Don't create
2861 (g95_conv_expr_descriptor): Rename simple->gimple.
2862 * trans-expr.c (conv_expr_op): Use proper logical operators.
2863 * trans-intrinsic.c (build_fixbound_expr): New function.
2864 (build_fix_expr): Ditto.
2865 (g95_conv_intinsic_aint): Use them. Use builtin functions.
2866 (g95_conv_intrinsic_function): Add FLOOR and CEILING.
2868 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2870 * array.c (g95_compare_array_spec): Remove unreachable code.
2871 * expr.c (g95_copy_expr): Likewise.
2872 * intrinsic.c (g95_convert_type): Likewise.
2873 * misc.c (g95_code2string): Likewise.
2874 * simplify.c (g95_simplify_ishft, g95_simplify_real,
2875 g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
2876 * trans-stmt.c (g95_trans_select): Likewise.
2877 * primary.c (extend_ref): Add an assertion.
2878 * simplify.c (g95_convert_constant): Add const.
2879 * intrinsic.h: Remove g95_check_x_ni.
2880 * f95-lang.c (g95_finish): Call g95_release_include_path.
2882 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2884 * resolve.c (resolve_contained_functions): Fix typo introduced on
2887 2003-06-09 Paul Brook <paul@nowt.org>
2889 * g95.h: Include system.h not hwint.h.
2890 * many: use safe-ctype.h not ctype.h. Change isalpha -> ISALPHA, etc.
2891 * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
2893 2003-06-09 Paul Brook <paul@nowt.org>
2895 * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
2896 * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
2897 * trans-decl.c (g95_add_decl_to_functions): Make non-static.
2898 (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
2899 (g95_generate_function_code): Translate COMMON and EQUIVALENCE
2901 * trans.h (g95_trans_equivalence, g95_trans_common,
2902 g95_add_decl_to_function): Declare.
2903 * trans-common.c, trans-equivalence.c: New files.
2905 2003-06-08 Steven Bosscher <steven@gcc.gnu.org>
2907 * intrinsic.c (g95_intrinsic_extension): Remove.
2908 (add_functions): Substitute g95_check_x for g95_check_x_ni
2910 (g95_init_expr_extensions): New function.
2911 (g95_intrinsic_func_interface): Use it.
2912 * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
2913 * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
2914 g95_check_precision, g95_check_present, g95_check_radix,
2915 g95_check_range, g95_check_selected_real_kind): Do not set
2916 g95_intrinsic_extension.
2917 (g95_check_x_ni): Remove now duplicate of g95_check_x.
2919 * expr.c (check_inquiry): Add FIXME, fixup some code style.
2921 2003-06-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2923 * g95.h (ref_type): Name this type explicitly.
2924 * module.c (MIO_NAME): Add specialisations of mio_name.
2925 (mio_symbol_attribute, mio_typespec, mio_array_ref,
2926 mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
2927 (ab_attribute): Name this type explicitly.
2928 (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
2930 2003-06-05 Kejia Zhao <kejia_zh@yahoo.com.cn>
2932 * trans-intrinsic.c (g95_conv_allocated): New function.
2933 (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
2935 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
2937 * f95-lang.c: Don't include g95-support.h
2938 (g95_mark_addressable): Add prototype.
2939 (g95_init_decl_processing): Remove C front end hack.
2940 * f95-tree.c: Remove file.
2941 * support.c: Remove file.
2942 * g95-support.h: Remove file.
2943 * trans-types.c (g95_init_types): Set up boolean
2944 type related tree nodes.
2945 * Make-lang.in: Remove rules for dead files and
2946 dependencies on them.
2948 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
2950 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
2951 C front end dependency. Also, convert.c does not depend on
2952 g95-support.h anymore.
2953 * convert.c: Don't include c-common.h and g95-support.h
2954 * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
2955 (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
2956 stmts_are_full_exprs_p, current_stmt_tree,
2957 current_scope_stmt_stack): Remove.
2958 * g95-support.h (unsigned_conversion_warning): Kill proto.
2959 (boolean_type_node, boolean_true_node, boolean_false_node):
2960 Don't define here. Instead, make then true tree nodes in
2962 * support.c (c_global_trees): Die, C front end, die!!!
2963 (g95_init_c_decl_hacks): Don't touch intmax_type_node,
2964 uintmax_type_node, string_type_node and const_string_type_node.
2965 (decl_constant_value, overflow_warning): Make static functions.
2966 They are in death row too, though.
2967 (default_conversion, c_expand_asm_operands): Remove.
2968 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
2969 trans.c: Don't include c-common.h.
2970 * trans-types.c (boolean_type_node, boolean_true_node,
2971 boolean_false_node): Make them real tree nodes.
2972 * trans-types.h (intmax_type_node, string_type_node,
2973 const_string_type_node): Hack to work around C dependencies
2974 in builtin-types.def.
2976 2003-06-04 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2978 * decl.c (decl_types): Add some iterators-like sentinels.
2979 * decl.c (match_attr_spec): Use them.
2980 Use "decl_types" instead of "int".
2981 Add cast in call to g95_match_strings.
2982 * dump-parse-tree.c (g95_show_namespace): Use "g95_intrinsic_op"
2984 * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
2985 (g95_interface_info): Use "g95_intrinsic_op".
2986 * dump-parse-tree.c (g95_show_namespace): Use them.
2987 * interface.c (g95_check_interfaces): Use them.
2988 * module.c (read_module, write_module): Use them.
2989 * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
2990 Use "g95_intrinsic_op".
2991 * interface.c (check_operator_interface): Use "g95_intrinsic_op".
2992 Add a default case in switch statement.
2993 * intrinsic.h (g95_generic_isym_id): Moved to...
2994 * g95.h (g95_generic_isym_id): here.
2995 (g95_intrinsic_sym): Use "g95_generic_isym_id".
2996 * intrinsic.c (make_generic): Use "g95_generice_isym_id".
2997 * trans-intrinsic.c (g95_intrinsic_map_t,
2998 g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
2999 * match.c (g95_match_intrinsic_op): Add cast in call to
3002 2003-06-03 Steven Bosscher <steven@gcc.gnu.org>
3004 * support.c (skip_evaluation, warn_conversion, lvalue_p,
3005 lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
3006 constant_fits_type_p, convert_and_check,
3007 unsigned_conversion_warning): Remove these ugly remnants
3008 we inherited from the C front end.
3009 (function_types_compatible): Remove '#if 0'-edcode.
3010 (build_modify_expr): Likewise.
3011 (convert_for_assignment): Don't use the deceased functions.
3012 The parameter fundecl is now unused.
3013 (decl_constant_value): Always just return decl. In fact
3014 this function is not used at present, but it might be in
3015 the future, when we start using the tree inliner.
3016 (overflow_warning, default_conversion, c_expand_asm_operands):
3017 Abort when these are called, they are part of the C type
3018 checking implementation and therefore poison to Fortran.
3020 2003-06-04 Steven Bosscher <steven@gcc.gnu.org>
3022 * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
3023 c-pretty-print.o and c-dump.o. Add a comment on why we
3024 depend on c-semantics.c.
3025 * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
3026 Don't use the C front end tree dumper hook to dump the
3027 language specific tree representation -- we don't have
3028 one. So instead, inherit the default langhook.
3030 2003-06-02 Paul Brook <paul@nowt.org>
3032 * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
3034 2003-06-02 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3036 * check.c (g95_check_associated): Use proper types. Remove
3037 extraneous argument in call to g95_error().
3039 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
3041 * resolve.c (resolve_operator): Make logical operands convert to the
3042 type with higher kind.
3044 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
3046 * check.c (g95_check_associated): Make sure both pointer and target has
3047 the same type and rank. Null pointer or array section with vector
3048 subscript as target are not allowed.
3049 * trans.h: Declare gfor_fndecl_associated.
3050 * trans-decl.c: (g95_build_builtin_function_decls): Initialize
3051 gfor_fndecl_associated.
3052 * trans-intrinsic.c (g95_conv_associated): New function.
3053 (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
3055 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
3057 * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
3058 according to POINTER itself rather than TARGET.
3059 (g95_conv_expr_descriptor): Make lbound start at 1.
3060 * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
3062 2003-06-01 Paul Brook <paul@nowt.org>
3064 * expr.c (g95_type_convert_binary): Make it match the standard.
3065 * g95.texi: Remove dead link.
3067 2003-06-01 Steven Bosscher <steven@gcc.gnu.org>
3069 * g95.texi: Cleanup somewhat in preparation for inclusion
3072 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3073 Canqun Yang <canqun@yahoo.com.cn>
3075 * resolve.c (compare_bound_int, resolve_where_shape): Proper return
3077 (g95_find_forall_index): Return proper value.
3078 (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
3079 compare the return value from g95_find_forall_index.
3081 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3082 * g95.h, io.c (g95_st_label): Remove "length".
3083 (g95_symtree): Remove "link".
3084 (g95_case): Remove "code".
3085 * arith.c, arith.h (g95_compare_string, g95_convert_integer,
3086 g95_convert_real): Make an argument pointer to const.
3087 * decl.c (colon_seen): Add a TODO.
3088 * interface.c (g95_compare_types): Fix typo.
3089 * interface.c (compare_interfaces): Preserve value of "p".
3090 * intrinsic.c (sort_actual): Remove "i".
3091 * match.c (g95_match_assign): Proper type in call to g95_match().
3092 * parse.c (next_free): Avoid duplicate call due to macro.
3093 * parse.c (check_statement_label): wrong type in call to g95_error.
3094 * primary.c (match_real_constant): Add a TODO.
3095 * resolve.c (resolve_select): Remove useless conditional.
3096 * simplify.c (g95_simplify_repeat): Proper assignment to
3097 "value.character.string".
3098 * simplify.c (g95_simplify_reshape): Wrong variable in call to
3101 2003-05-20 Canqun Yang <canqun@yahoo.com.cn>
3103 * trans-stmt.c: Remove unnecessary include file defaults.h.
3105 2003-05-19 Lifang Zeng <zlf605@hotmail.com>
3107 * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
3109 (g95_trans_forall): Allow arbitrary number of FORALL indexes and
3110 actual variables used as FORALL indexes.
3112 2003-05-15 Paul Brook <paul@nowt.org>
3114 * trans-array.c (g95_trans_static_array_pointer): Use
3116 (g95_trans_deferred_array): Initialize static array pointers.
3117 * trans-expr.c (g95_conv_function_call): Use formal arglist to
3118 correctly pass POINTER and absent CHARACTER arguments.
3120 2003-05-14 Lifang Zeng <zlf605@hotmail.com>
3122 * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
3123 (g95_resolve_forall_body): Resolve FORALL body.
3124 (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
3125 (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
3126 (g95_find_forall_index): Check whether the FORALL index appears in
3127 the expression or not.
3128 (resolve_code): Modified.
3130 2003-05-14 Paul Brook <paul@nowt.org>
3132 * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
3134 2003-05-13 Paul Brook <paul@nowt.org>
3136 * trans-types.c (g95_max_array_element_size): Now a tree node.
3137 (g95_init_types): Work out max size properly.
3138 (g95_get_dtype_cst): Modify to match.
3140 2003-05-11 Paul Brook <paul@nowt.org>
3142 * trans-io.c (add_case): Create a label decl for case labels.
3144 2003-05-11 Paul Brook <paul@nowt.org>
3146 * arith.c (g95_integer_index_kind): New variable.
3147 * f95-lang.c (g95_init): Move frontend initialization here ...
3148 (g95_post_options): ... from here.
3149 * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
3150 * intrinsic.c (add_functions): Use index kinds.
3151 * iresolve.c: Convert to index_kind where needed.
3152 * resolve.c (g95_resolve_index): Make public, use index_kind.
3153 (resolve_array_ref): Adjust to match.
3154 * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
3155 * trans-stmt.c: Ditto.
3156 * trans-types.c: Ditto.
3157 * trans-types.h (g95_array_index_kind): Remove declaration.
3158 * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
3160 2003-05-07 Paul Brook <paul@nowt.org>
3162 * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
3163 * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
3166 2003-05-07 Paul Brook <paul@nowt.org>
3168 * trans-array.c (trans_static_array_pointer,
3169 g95_trans_array_constructor_value, g95_conv_array_initializer,
3170 g95_conv_structure): CONSTRUCTOR nodes only have one operand.
3171 (g95_add_loop_ss_code): Convert subscripts to the correct type.
3172 * trans-stmt.c (g95_trans_character_select): Ditto.
3173 * trans-types.c (g95_init_types): Ditto.
3175 2003-05-07 Steven Bosscher <steven@gcc.gnu.org>
3177 * f95-lang.c (expand_function_body): Use input_line, not lineno.
3178 * trans-decl.c (g95_generate_function_code,
3179 g95_generate_constructors): Likewise.
3180 * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
3181 g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
3184 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
3185 * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
3186 with components point to the DERIVED type itself, and two DERIVED
3187 type with components point to each other.
3188 * trans-expr.c (g95_conv_componet_ref): Modified
3190 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
3191 * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
3193 (g95_trans_pointer_assign): Implement Nullify.
3195 2003-05-01 Paul Brook <paul@nowt.org>
3197 * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
3198 * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
3200 2003-05-01 Paul Brook <paul@nowr.org>
3202 * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
3203 trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
3206 2003-05-01 Canqun Yang <canqun@yahoo.com.cn>
3208 * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
3211 2003-04-28 Paul Brook <paul@nowt.org>
3213 * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
3214 as their kind suggests.
3215 (g95_resolve_reshape): Ditto.
3217 2003-04-28 Chun Huang <compiler@sohu.com>
3219 * trans-expr.c (g95_conv_substring_expr): New function.
3220 (g95_conv_expr): Use it.
3222 2003-04-28 Paul Brook <paul@nowt.org>
3224 * iresolve.c (g95_resolve_transpose): Make it match the
3226 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
3228 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
3230 * trans-types.c (g95_add_field_to_struct): New function to
3231 add a field to a UNION_TYPE or RECORD_TYPE.
3232 * trans-types.h (g95_add_field_to_struct): Prototype.
3233 (g95_get_derived_type): Use g95_add_field_to_struct to add
3235 * trans-io.c (g95_add_field): Remove.
3236 (ADD_FIELD): Use new g95_add_field_to_struct function.
3237 (ADD_STRING): Likewise.
3238 * trans-stmt.c (g95_trans_select): Likewise.
3239 (g95_add_field): Remove duplicated function.
3241 2003-04-18 Canqun Yang <canqun@yahoo.com.cn>
3243 Port implementation for CHARACTER SELECT from Andy's tree.
3244 * trans-stmt.c (g95_trans_character_select): Implement character
3245 select. (g95_add_field): New function.
3246 * trans-decl.c: Declare 'gfor_gndecl_select_string'.
3247 (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
3248 * g95.h (struct g95_case): Add field 'int n'.
3249 * trans.h: Declare 'gfor_fndecl_select_string'.
3251 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
3253 * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
3254 (g95_insert_bbd): Die on duplicates.
3255 * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
3257 2003-04-14 Steven Bosscher <steven@gcc.gnu.org>
3259 * g95.texi: Require GMP 4.0 -- like we actually
3260 do. Explain the testsuite and what-goes-where.
3261 Don't use undefined texinfo symbol. Break very
3262 long line. Remove finished item from the list
3265 2003-04-11 Canqun Yang <canqun@yahoo.com.cn>
3267 * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
3270 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
3272 * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
3273 (g95_trans_forall_body): New function.
3275 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
3277 * resolve.c (resove_where): New function.
3278 (resolve_where_shape): New function.
3279 (resolve_code): Add call to 'resolve_where'
3280 * trans-stmt.c (g95_trans_where): Modified.
3281 (g95_trans_where_2): New function.
3282 (g95_trans_where_assign): New function.
3283 (g95_evaluate_where_mask): New function.
3284 (g95_add_to_stmt_list): New function.
3285 (g95_get_temp_expr): New function.
3286 * trans.h (where_stmt_list): New structure.
3288 2003-04-10 Paul Brook <paul@nowt.org>
3290 * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
3291 (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
3293 2003-04-10 Steven Bosscher <steven@gcc.gnu.org>
3295 Update after mainline -> tree-ssa-branch merge.
3296 * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
3298 (g95_init): Update for new lang_hooks definition.
3299 (g95_post_options): New langhook.
3300 (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
3301 * scanner.c (g95_new_file): Comment update.
3303 2003-04-09 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3305 * g95.h, lang-options.h: Add -Wimplicit-interface.
3306 * options.c (g95_init_options, g95_parse_arg): Set it.
3307 * interface.c (check_intents): Warn about call with implicit
3309 * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
3312 2003-04-05 Paul Brook <paul@nowt.org>
3314 * iresolve.c (g95_resolve_spread): Don't resole based on type.
3315 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
3317 2003-03-29 Paul Brook <paul@nowt.org>
3319 * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
3320 (g95_resolve_unpack): Ditto.
3321 * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
3322 (g95_conv_intrinsic_function): Use it. Remove PACK and UNPACK.
3323 (g95_is_intrinsic_libcall): Add PACK and UNPACK.
3325 2003-03-25 Paul Brook <paul@nowt.org>
3327 * arith.c (g95_unary_user, g95_user): Remove dead functions.
3329 * array.c (g95_free_array_ref): Ditto.
3331 * symbol.c (g95_use_derived_tree): Ditto.
3332 * intrinsic.c (add_functions): Use simplification for SCALE.
3333 * primary.c (g95_match_rvalue): Test sym, not symtree.
3335 2003-03-25 Paul Brook <paul@nowt.org>
3337 * trans-decl.c (build_function_decl): Add parameter before it gets
3338 turned into a constant.
3339 * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
3340 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
3341 * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
3343 2003-03-22 Paul Brook <paul@nowt.org>
3345 * trans-array.c (g95_conv_array_initializer): Allow scalar
3347 * trans-decl.c (g95_finish_var_decl): Result variables are not
3349 * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
3350 (g95_conv_intrinsic_function): Use it.
3351 * trans-types.h (g95_type_spec): Remove dead declaration.
3353 2003-03-21 Paul Brook <paul@nowt.org>
3355 * trans-decl.c (g95_build_function_decl): Mark string parameters.
3357 2003-03-20 Paul Brook <paul@nowt.org>
3359 * trans-decl.c (g95_build_function_decl): Put character length
3360 parameters at the end of the function declaration.
3361 * trans-expr.c (g95_conv_function_call): Ditto.
3362 * trans-types.c (g95_get_function_type): Ditto.
3364 2003-03-20 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3366 * resolve.c (resolve_formal_arglist): Don't impose intent for
3367 procedure arguments of pure functions.
3368 (resolve_select): Remove redundant assignment.
3370 2003-03-19 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3372 * arith.c (validate_logical), g95.h, options.c (g95_init_options):
3374 * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
3375 * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
3377 * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
3379 * symbol.c (g95_add_type): Fix typo in comment.
3382 2003-03-16 Paul Brook <paul@nowt.org>
3384 * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
3385 * expr.c (g95_build_call): Remove.
3386 * f95-lang.c (puchdecl_top_level): New function.
3387 * g95.h (g95_code): Store resolved symbol, not just the name.
3388 * intrinsic.c (g95_intrinsic_namespace): New global namespace.
3389 (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
3390 (g95_get_intrinsic_sub_symbol): New function.
3391 * iresolve.c (g95_resolve_cpu_time): Use it.
3392 (g95_resolve_random_number): Ditto.
3393 * resolve.c: Set code->resolved_sym instead of code->sub_name.
3394 * trans-decl.c (g95_get_extern_function_decl): Give external decls
3395 the correct DECL_CONTEXT. Add global symbold to the global scope.
3396 * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
3399 2003-03-16 Paul Brook <paul@nowt.org>
3401 * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
3402 * options.c (g95_parse_arg): Ditto.
3403 * module.c (mio_symbol_attribute): Handle the always_explicit bit.
3404 * resolve.c (resolve_formal_arglist): The always_explicit sould be set
3405 for the procedure, not the parameter.
3406 * trans-array.c (g95_trans_g77_array): New function.
3407 (g95_trans_assumed_size): Use it.
3408 (g95_trans_dummy_array_bias): Ditto.
3409 (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
3410 (g95_conv_expr_descriptor): ... to here. Update callers.
3411 * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
3412 (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
3413 * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
3414 * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
3415 * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
3416 (g95_sym_type): Ditto.
3418 2003-03-15 Paul Brook <paul@nowt.org>
3420 * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
3422 * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
3424 2003-03-14 Paul Brook <paul@nowt.org>
3426 * trans-array.c (g95_array_is_packed): Remove.
3427 (g95_conv_array_base): Correctly handle all descriptorless cases.
3428 (g95_conv_array_stride): Use descriptorless strides.
3429 (g95_trans_dummy_array_bias): Don't always repack the array.
3430 (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
3432 * trans-types.c (g95_get_nodesc_array_type): Differentiate between
3433 dummy and non-dummy arrays...
3434 (g95_sym_type, g95_get_derived_type): ... like these.
3435 (g95_get_array_type_bounds): Allow discontiguous arrays.
3437 2003-03-12 Paul Brook <paul@nowt.org>
3439 * array.c (g95_resolve_array_spec): Fix comment.
3440 * g95.h (symbol_attributes): New flag always_explicit.
3441 * resolve.c (resolve_formal_arglist): Set it always_explicit.
3442 * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
3443 * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
3444 (g95_trans_array_bounds): Allow assumed shape arrays.
3445 (g95_trans_repack_array): Remove.
3446 (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
3447 * trans-decl.c (g95_build_qualified_array): Only ignore absent
3448 bounds for assumed size arrays.
3449 (g95_build_dummy_array_decl): Use descriptorless arrays.
3450 * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
3451 (g95_trans_pointer_assign): Fix typo.
3452 * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
3454 (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
3455 * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
3456 Also modify callers.
3457 * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
3459 2003-03-08 Paul Brook <paul@nowt.org>
3461 * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
3462 (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
3463 * resolve.c (compare_spec_to_ref): Allow full array sections.
3465 2003-03-08 Paul Brook <paul@nowt.org>
3467 * expr.c (g95_simplify_expr): Also simplify array index and
3468 substring expressions.
3469 * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
3470 * trans-array.c (g95_trans_array_bounds): New function.
3471 (g95_trans_auto_array_allocation): Use it.
3472 (g95_trans_assumed_size): Rewrite.
3473 * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
3474 (gfor_fndecl_repack): Remove.
3475 (g95_build_qualified_array): Handle absent upper bounds.
3476 (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
3477 (g95_get_symbol_decl): Update.
3478 (g95_build_intrinsic_function_decls): Initialize new decls.
3479 * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
3480 (gfor_fndecl_repack): Remove.
3481 * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
3482 * trans-types.c: (g95_build_array_type): Merge duplicated code..
3483 (g95_get_nodesc_array_type): Handle absent bounds.
3484 * trans-types.h (g95_get_nodesc_array_type): Declare.
3486 2003-03-04 Paul Brook <paul@nowt.org>
3488 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
3491 2003-03-02 Paul Brook <paul@nowt.org>
3493 * options.c (g95_init_options): Drfault to 1.
3494 (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
3495 * trans-array.c (g95_conv_array_data, g95_conv_array_base,
3496 g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
3497 Handle non-constant size automatic arrays.
3498 (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
3499 generic bound functions.
3500 (g95_trans_auto_array_allocation): Don't create a descriptor.
3501 (g95_trans_assumed_size): New function (broken).
3502 (g95_trans_dummy_array_bias): Remove unused var.
3503 * trans-array.h (g95_trans_assumed_size): Declare.
3504 * trans-decl.c (create_index_var): New fuction.
3505 (g95_build_qualified_array): New function.
3506 (g95_get_symbol_decl): Use it.
3507 (g95_trans_deferred_vars): Handle assumed shape seperately.
3508 * trans-types.c (get_element_type): Handle heap allocated arrays.
3509 (g95_is_nodesc_array): Include non-const size arrays.
3510 (g95_get_nodesc_array_type): Ditto.
3512 2003-02-23 Paul Brook <paul@nowt.org>
3514 * trans-array.c (g95_array_init_size): Should use stride, not size of
3517 2003-02-18 Paul Brook <paul@nowt.org>
3519 * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
3520 after intrinsic function check.
3522 2003-02-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3524 * io.c (match_io): Fix missing return value and remove useless
3526 * match.c (g95_match): Remove useless assignment.
3527 * module.c (parse_string): Remove useless post increment.
3528 * simplify.c (g95_simplify_verify): Remove useless assignment.
3530 2003-02-15 Paul Brook <paul@nowt.org>
3532 * expr.c (restricted_intrinsic): Handle bad values gracefully.
3533 * g95.h (symbol_attribute): Add referenced member.
3534 (g95_symbol): Add dummy_order member.
3535 (g95_set_sym_referenced): Declare.
3536 * match.c (g95_match_assignment, g95_match_call): Use it
3537 * primary.c (match_actual_arg, g95_match_rvalue,
3538 g95_match_variable): Ditto.
3539 * symbol.c (next_dummy_order): New variable.
3540 (g95_set_sym_referenced): New function.
3541 (check_done): New function.
3542 (g95_add_*): Use it.
3543 * trans-decl.c: Make formatting conform to GCC standards.
3544 (g95_defer_symbol_init): Add dummy variables in the right order.
3545 (g95_get_symbol_decl): Only accept referenced variables.
3546 (g95_create_module_variable): Module variables are always required.
3547 (generatr_local_decls): New function.
3548 (generate_local_vars): New function.
3549 (g95_generate_function_code): Use it.
3551 2003-02-13 Paul Brook <paul@nowt.org>
3553 * trans-decl.c (g95_conv_struct_cons): Remove.
3554 (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
3555 * trans-expr.c (g95_conv_structure): New function.
3556 (g95_conv_expr): Use it.
3558 2003-02-09 Paul Brook <paul@nowt.org>
3560 * trans-array.c (g95_array_init_size): Don't evaluate the linit
3561 expressions multiple times.
3562 (g95_trans_auto_arry_allocation): Use pointer not tmp.
3564 2003-02-08 Paul Brook <paul@nowt.org>
3566 * module.c (mio_symtree_ref): Declare as static.
3567 (mio_expr): Remove dead code.
3568 (read_module): Set the symtree link for fixups.
3569 * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
3570 (build_round_expr): ... to this.
3571 (g95_conv_intrinsic_aint): New function.
3572 (g95_conv_intrinsic_function): Use it.
3574 2003-02-08 Paul Brook <paul@nowt.org>
3576 * trans-array.c (g95_trans_array_constructor_value): Use the acutal
3577 offset after modificaton, not the increment expression.
3578 * dependency.c: Kill excess whitespace.
3580 2003-02-07 Sanjiv Gupta <sanjivg@noida.hcltech.com>
3582 * dependency.h: Remove some function declarations.
3583 * dependency.c (get_no_of_elements): Change this function not to
3585 * other: Add comments for all modified functions.
3587 2003-02-06 Paul Brook <paul@nowt.org>
3589 * g95spec.c (lang_specific_functions): Fix initializer warning.
3590 * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
3591 for structure type names.
3592 * trans-decl.c (g95_cons_structure_cons): New function.
3593 (g95_get_symbol_decl): Use it.
3594 * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
3597 2003-02-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3599 * resolve.c (compare_cases): Add const to casts.
3601 2003-01-30 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3603 * g95.h (g95_check_f): Change a1 to f1m.
3604 * intrinsic.c (add_sym_1m, check_specific,
3605 g95_intrinsic_func_interface): Use it.
3607 * module.c (init_pi_tree): Remove useless cast.
3608 (fp2): Fix argument type.
3610 * parse.c (parse_select_block): Add comment.
3612 2003-02-05 Toon Moene <toon@moene.indiv.nluug.nl>
3614 * lang-options.h: Fix warning involving C90 concatenated
3617 2003-02-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
3618 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3620 * io.c (format_asterisk): Complete initializer to kill warning.
3621 * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
3622 DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
3623 (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
3624 new defines to complete initializers. Kills all warnings.
3626 * Make-lang.in: Comment cleanup.
3628 2003-02-05 Paul Brook <paul@nowt.org>
3630 * array.c (g95_free_constructor): Handle NULL expressions.
3631 * resolve.c (resolve_structure_cons): Ditto.
3632 * decl.c (g95_match_null): New Function.
3633 (variable_decl): Use it.
3634 * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
3635 * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
3636 * trans-types.c (g95_set_decl_attributes): Remove empty function.
3638 2003-02-05 Paul Brook <paul@nowt.org>
3640 * trans.h (build1_v): New macro.
3641 (build_v): Remove pointless and incorrect prototype.
3642 * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
3643 * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
3645 2003-02-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
3647 * Make-lang.in (F95_OBJS): Remove one more dead file.
3649 2003-02-01 Paul Brook <paul@nowt.org>
3651 * lang-specs.h: Don't pass -ffixed-form to the linker.
3652 * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
3654 2003-02-01 Paul Brook <paul@nowt.org>
3656 * Make-lang.in (F95_OBJS): Remove dead files.
3657 * trans-array.c (g95_array_init_size): Do the right thing when
3659 * trans-decl.c (g95_generate_function_code): Initialize deffered
3660 symbol list before translating contained subroutines.
3661 * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
3662 scalar invariant values here...
3663 (g95_conv_variable, g95_conv_function_call): ... instead of here ...
3664 * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
3666 2003-01-29 Paul Brook <paul@nowt.org>
3668 * trans-array.c (g95_add_loop_code): Put pre code in the right block.
3669 (g95_walk_elemental_function_args): Reverse chains before adding.
3670 (g95_reverse_ss): Move about a bit.
3671 * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
3674 2003-01-28 Paul Brook <paul@nowt.org>
3676 * intrinsic.c (resolve_intrinsic): Use correct union member.
3677 * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
3679 * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
3680 use associated variables.
3681 * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
3682 * trans-expr.c (g95_conv_expr_present): ... to here.
3683 * trans.h: Declare it.
3684 * trans-types.c (g95_sym_type): Assume subroutine if not specified.
3686 2003-01-28 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3688 * array.c (expand_iterator): Suppress useless assignment.
3689 * decl.c (match_char_spec): Ditto.
3690 * io.c (match_io_iterator): Ditto.
3691 * primary.c (match_real_constant): Ditto.
3692 * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
3693 Ditto. Also, use g95_intrinsic_op not int for intrinsic operators.
3694 * matchexp.c (match_add_operand, match_level_5): Likewise.
3695 * module.c (parse_atom, find_enum): Likewise.
3696 * resolve.c: move #include <string.h>
3697 (resolve_select): Fix serious typo.
3699 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.n>
3701 * Make-lang.in: Don't build with broken tree-ssa-pre.
3703 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.nl>
3705 * resolve.c (resolve_index): Add a TODO.
3706 * symbol.c: Remove useless "#include <ctype.h>".
3708 2003-01-27 Paul Brook <paul@nowt.org>
3710 * check.c (check_rest): Allow different type kinds as an extension.
3711 * g95.h (g95_resolve_f): Add f1m.
3712 * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
3713 * intrinsic.h: Chenge prototypes for MIN and MAX.
3714 * iresolve.c (g95_resolve_minmax): New function.
3715 (g95_resolve_min, g95_resolve_max): Use it.
3716 * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
3718 (g95_conv_intrinsic_present): Fix logic.
3720 2003-01-27 Steven Bossche <s.bosscher@student.tudelft.nl>
3722 * g95.h (g95_case): Don't be a tree, be a double linked list.
3723 * match.c (match_case_selector): Remove redundant semantics check.
3724 Clean up a few goto's to make it a tiny little bit faster.
3725 * resolve.c (case_tree): Die.
3726 (compare_cases): Accept and compare unbounded cases too.
3727 (check_case_overlap): Don't build a tree. Instead, merge-sort the
3728 whole list of g95_cases passed from resolve_select.
3729 (sane_logical_select): Die.
3730 (check_case_expr): Return FAILURE if a CASE label is of the wrong
3732 (resolve_select): Fixup case expression for computed GOTOs, put it
3733 in expr, not expr2, for easier handing in the parse tree dumper and
3734 the code generator. Rewrite the rest of the function: Kill
3735 unreachable case labels and unreachable case blocks.
3736 * dump-parse-tree.c (g95_show_code_node): Always dump expr for
3737 an EXEC_SELECT, not case2 anymore.
3738 * trans-const.c (g95_conv_constant_to_tree): New function.
3739 (g95_conv_constant): Use it.
3740 * trans-const.h: Declare prototype for the new function.
3741 * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
3742 g95_trans_character_select): New static functions.
3743 (g95_trans_select): Rewrite.
3745 2003-01-26 Paul Brook <paul@nowt.org>
3747 * intrinsic.c (add_fnctions): Properly add dreal.
3748 * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
3749 (g95_conv_intrinsic_function): Use it.
3750 * trans-io.c (build_dt): Abort on internal files (unimplemented).
3752 2003-01-26 Paul Brook <paul@nowt.org>
3754 Widespread changes to the handling of symbols in expressions. These
3755 are now linked via g95_symtree nodes.
3756 * parse.c (g95_fixup_sibling symbols): New function.
3757 (parse_contained): Use it.
3758 * g95.h (symbol_attribute): Add contained. Indicates a symbol is a
3759 contained procedure that has bee correctly fixed up.
3760 (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
3762 2003-01-24 Paul Brook <paul@nowt.org>
3764 * trans-array.c (g95_walk_expr): Function result attributes are in
3766 * trans-expr.c (g95_conv_function_call,
3767 g95_trans_arrayfunc_assign): Ditto.
3768 * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
3770 2003-01-23 Steven Bosscher <s.bosscher@student.tudelft.nl>
3772 * expr.c (check_restricted): Fix error message.
3773 * symbol.c (free_st_labels): Plug memleak.
3775 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
3777 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
3778 reduce_binary_aa, reduce_binary, eval_intrinsic,
3779 eval_intrinsic_f2): Use typesafe prototypes for eval functions.
3780 * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
3781 for typesafe intrinsics helper functions.
3782 (g95_intrinsic_sym): Use them.
3783 * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
3784 add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
3785 add_sym_5, add_conv, resolve_intrinsic, do_simplify,
3786 check_specific, g95_intrinsic_func_interface,
3787 g95_intrinsic_sub_interface): Adjust all calls to intrinsics
3789 * trans-decl.c (g95_get_extern_function_decl): Likewise.
3790 * Make-lang.in: Don't disable warnings for strict prototypes
3791 any longer, everything is typesafe now.
3793 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
3795 * bbt.c (duplicate_node): Make static.
3796 * module.c (module_name): Make static.
3797 * scanner.c (include_dirs): Make static.
3799 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
3801 Hard coded _gfor_'s should not show up anymore.
3802 * g95.h (PREFIX): New macro.
3803 * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
3805 (g95_resolve_random_number): Likewise.
3806 * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
3807 * trans-io.c: Remove 'prefix' macro. Replace all uses with
3808 the new PREFIX macro from g95.h.
3810 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
3812 The troubles of forking... Andy implemented this just now too.
3813 Let's stick to that and keep the trees close.
3814 * g95.h (g95_st_label): 'format' member is now a g95_expr.
3815 * io.c: Revert previous changes.
3816 (g95_match_format): Match the format string as a character
3818 * match.h (g95_statement_label): Declare external.
3819 * parse.c: Revert previous changes.
3820 * symbol.c (g95_free_st_label): Free a g95_expr instead
3822 * trans-io.c: Revert previous changes.
3823 (build_dt): Use set_string to set the format string.
3825 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
3827 * io.c (format_string): Make non-static.
3828 (g95_match_format): Remember the format string.
3829 (terminate_io): Add I/O termination for empty I/O lists.
3830 * match.h: Declare external format_string.
3831 * parse.c (check_statement_label): Attack the format string
3832 to a format label for FORMAT statements.
3833 * trans-io.c (g95_add_field): Define prefix macro. Replace
3834 all uses of PREFIX define with a use of this macro.
3835 (build_dt): Implement formatted I/O for format labels.
3837 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
3839 * lang-options.h: Kill "-std=F".
3840 * options.c: Remove unimplemented "-std=F". Modify
3842 * misc.c (g95_terminal_width): New function.
3843 * error.c (g95_error_init_1): Use g95_terminal_width.
3844 * g95.h: Add prototype for g95_terminal_width, remove
3847 2003-01-19 Steven Bosscher <s.bosscher@student.tudelft.nl>
3849 * Make-lang.in: Fix typo.
3851 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
3853 * g95.h (struct g95_case): Remove unused cruft, new member
3854 'where' to keep track of the locus of the default case.
3855 * match.c (g95_match_case): Add locus to the current case.
3856 (match_case_selector): Likewise.
3857 * parse.c (parse_select_block): Move semantics check for
3858 multiple DEFAULT cases out of here to...
3859 * resolve.c (check_case_overlap): ...here. Return sooner
3861 (check_case_expr): Take two g95_cases now, use to sure the
3862 expression kinds are the same.
3863 (resolve_select): Cleanup.
3865 2003-01-18 Paul Brook <paul@nowt.org>
3867 * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
3868 * trans-decl.c (g95_set_symbol_decl): Handle non-array result
3870 (g95_get_extern_function_decl): Put decls in the correct context.
3872 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
3874 * trans-io.c: Port changes from Andy to set ERR flag.
3876 2003-01-17 Paul Brook <paul@nowt.org>
3878 * trans-array.c: Add various comments.
3879 (g95_ss_terminator): Declare as const.
3880 (g95_walk_expr): Remove first parameter and update all callers.
3881 (g95_walk_op_expr): Initialize scalar SS properly.
3882 * trans-array.h (g95_walk_expr): Update prototype.
3883 * trans-expr.c: Update for new g95_walk_expr.
3884 * trans-intrinsic.c: Ditto.
3885 * trans-io.c: Ditto.
3886 * trans.h: Various comments for SS chains.
3888 2003-01-17 Paul Brook <paul@nowt.org>
3890 * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
3892 * intrinsic.c (add_functions): Use them.
3893 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
3894 * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
3896 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
3898 Fallout of a small merge conflict:
3899 * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
3901 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
3903 * initrinsic.c: New add_sym_* functions for strong typing.
3904 (add_conv): Make prototype strict.
3905 * dump-parse-tree.c, dependency.c: Include config.h
3906 * resolve.c, trans-io.c: Fix typos.
3908 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
3910 * dump-parse-tree.c (g95_show_code_node): Show the
3911 condition for a computed GOTO that was transformed
3912 to a SELECT CASE construct.
3913 * resolve.c (check_case_overlap): Revert previous switch
3914 to treaps, it was too slow and didn't catch all trouble.
3915 (resolve_symbol): Be more flexible about module procedures.
3916 * symbol.c (check_conflict): Point to relevant section in
3917 the standard for dubious conflict. Allow procedure
3918 dummy arguments to be optional again.
3919 * trans-io (add_field): Rename to g95_add_field. Change
3921 * trans-stmt (trans_select): Handle unbounded cases for
3922 integer SELECT CASE constructs. Fix/add more comment.
3924 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
3926 * g95.h: Uses GCC's function attribute macros.
3927 * error.c, module.c, parse.c, g95.h: More function attributes.
3929 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
3931 * trans-decl.c (get_label_decl): Use TREE_LINENO instead
3932 of DECL_SOURCE_LINE, and TREE_FILENAME instead of
3935 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
3937 * f95-lang.c (pushdecl): Use TREE_LINENO instead of
3939 * trans.c (g95_trans_code): Use annotate_all_with_file_line
3940 instead of nowdead wrap_all_with_wfl.
3942 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
3944 * parse.c (g95_parse_file): In verbose mode, dump the parse tree
3945 before generating code, so we can still see it even if the code
3946 generation phase dies.
3948 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
3950 * decl.c (build_sym): Split out initialization expression parts...
3951 (add_init_expr_to_sym): ...to here.
3952 (variable_decl): Add the symbol following an attribute list to the
3953 symbol tree before parsing the optional initialization expression
3954 if the symbol is not of a derived type.
3955 * primary.c (g95_match_rvalue): Don't assume a symbol always has
3956 a value if it is a PARAMETER.
3958 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
3960 * misc.c: Don't #include <mcheck.h>
3961 * module.c: Ditto. Kill uses of mtrace, muntrace. If there
3962 ever was a glibc bug, then either this was never reported to
3963 glibc people, or it has been fixed for so long that there's
3964 no information you can find about it, anywhere.
3966 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
3969 * module.c (attr_bits, bt_types, array_spec_types):
3970 Switch 'const' and 'static'.
3971 * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
3973 GNU'ify source code:
3974 * trans-io.c: Numerous fixes, one fixed warning and a few
3975 TODO markers so that we don't forget about them.
3977 2003-01-13 Paul Brook <paul@nowt.org>
3979 * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
3980 * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
3982 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
3983 * match.c (g95_match_stop): Fix dumb == -> != error.
3985 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
3987 * dump-parse-tree.c (show_indent): Add line breaks. This
3988 whole dumping process needs cleanups.
3989 * f95-lang.c (g95_mark_addressable): Fix prototype to match
3990 the langhook. Fix 'return's accordingly.
3991 * g95-support.h: Adjust prototype.
3992 * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
3993 * lang-options.h: Add '-fsyntax-only'.
3994 * options.c (g95_init_options): Init 'no_backend'.
3995 (g95_parse_arg): Deal with '-fsyntax-only'.
3996 * parse.c (g95_parse_file): Do not generate code if 'no_backend'
3999 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
4001 * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
4002 arguments. Also make sure that if a symbol is marked INTRINSIC,
4003 an intrinsic with the symbol's name actually exists.
4004 (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
4005 Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
4006 ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
4008 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
4010 * resolve.c (resolve_contained_functions): Fix condition, don't
4011 throw internal_error if a child namespace has no name. Apparently
4012 this can be the case?
4014 2003-01-11 Paul Brook <paul@nowt.org>
4016 Port changes from Andy's tree:
4017 * g95.h (g95_code): Add stop_code.
4018 * match.c (g95_match_stop): Detter syntax checking.
4019 * resolve.c (resolve_generic_f0): Return match type.
4020 (resolve_generic_f): Remove dead/duplicated code.
4021 (resolve_specific_f): Ditto.
4022 * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
4023 * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
4024 * trans-stmt.c (g95_trans_stop): Handle new STOP format.
4026 2003-01-11 Paul Brook <paul@nowt.org>
4028 * trans-array.c: Various documentation/comment changes.
4029 * trans-stmt.c: Ditto.
4032 2003-01-10 Paul Brook <paul@nowt.org>
4034 * options.c/h: Add -fdump-parse-tree as alias of -v.
4036 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
4038 * dump-parse-tree.c (g95_show_namespace): Fixed another
4039 typo. Sorry, it's Friday...
4041 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
4044 * trans-array.c, trans-array.h, trans.c, trans-const.c,
4045 trans-const.h, trans-decl.c, trans-expr.c, trans.h
4046 trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
4047 trans-types.c: Fix bogus copyright years, add 2003.
4048 * trans-types.h: Give copyright header.
4050 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
4052 * dump-parse-tree.c (g95_show_namespace): Fixed typo.
4053 * expr.c, options.c, scanner.c: Add some more 'const' markers.
4054 * intrinsic.c: Some constant strings moved to read-only memory.
4055 * io.c (format_asterisk): Move to...
4058 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
4060 * dump-parse-tree.c (g95_show_namespace): Dump implicit
4061 types for ranges instead of per-letter. Indent the
4062 'CONTAINS' just like everything else.
4063 * resolve.c (resolve_contained_functions): Clarify comment.
4064 Explain non-obvious conditional expression. Improve
4065 diagnostics if tyoe cannot be resolved.
4066 Port semi-fix from Andy's tree:
4067 (was_declared): Move up before first use.
4068 (generic_sym, specific_sym): New functions. Code moved
4069 out if procedure_kind.
4070 (procedure_kind): Simplify using new functions.
4071 (resolve_generic_f): Make sure the functions we find in
4072 a parent namespace is generic.
4073 (resolve_specific_f): Ditto for specific functions.
4075 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
4077 * trans-stmt.c, trans.c: Fix some code style issues. Add
4078 some more comment (but still not enough!).
4080 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
4082 * symbol.c (flavors, procedures, intents, acces_types,
4083 access_types, ifsrc_types): Make const.
4084 * misc.c (g95_string2code): Make 'm' param 'const'.
4085 * module.c (find_enum, write_atom, mio_name): Make
4087 (attr_bits, bt_types, array_spec_types, array_ref_types,
4088 ref_types, expr_types): Make const.
4089 * g95.h: Adjust external decls.
4091 2003-01-09 Paul Brook <paul@nowt.org>
4093 * Testsuite: Add a load of new cases.
4095 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
4097 * Make-file.in: Add dependency on back end header files;
4098 a parallel build should work now.
4099 * f95-lang-c (lang_identifier): Remove bogus comment.
4100 (g95_be_parse_file): Fix prototype.
4101 (g95_init): Make static.
4102 (g95_finish): Make static.
4103 * error.c (g95_syntax_error): Kill. Make define in...
4104 * g95.h (g95_syntax_error): Define.
4105 (g95.options): Make 'source' member 'const'.
4106 * interface.c (g95_match_interface): Explain
4107 hard-to-read condition.
4108 (g95_match_end_interface): Ditto.
4109 * trans_const.c (g95_build_string_const): Make 's' parameter
4111 * trans_const.h: Adjust protoype accordingly.
4112 * trans-decl.c: Include tree-dump.h
4113 (g95_generate_function_code): Build fixes for recent changes
4114 in the tree-ssa branch.
4116 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
4118 * format.c: Kill, move code from here...
4120 * Make-lang.in: Adjust.
4123 * BUGS: Mention where to submit bugs. Move old content...
4124 * TODO: ...to here. New file.
4126 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
4127 Fix most warnings, and suppress the ones we can't fix for now.
4128 * Make-lang.in: Suppress warnings about bad proto's in g95.h,
4129 these warnings just clutter the screen and there's not much
4130 we can do about them for now anyway.
4131 * check.c, iresolve.c: Mark unused function parameters.
4132 * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
4133 they should be resolved before they get here.
4134 * error.c: Remove unused FILE *status_out.
4135 * f95-lang.c (g95_init): Remove bogus cast.
4136 * Many files: Make things 'const' where required.
4137 * g95.h: Fix prototypes for all modified functions above.
4138 (g95_options): Remove 'object' member.
4140 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
4142 * Make-file.in: Cleanup bogus targets. Add more comment.
4143 * lang-options.h: New option '-w'.
4144 * g95.h: add no_options field to struct g95_options.
4145 * options.c (g95_init_options): Default no_warnings to off.
4146 (g95_parse_arg): Recognise the '-w' switch and its alias,
4148 * error.c (g95_warning, g95_warning_now): Don't emit warning if
4149 no_warning option is set.
4150 * iresolve.c (g95_resolve_shape): Fix warning.
4152 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
4154 * primary.c (g95_next_string_char): Rename next_string_char, and
4155 make static. Adjust callers accordingly.
4156 * resolve.c (resolve_generic_f0): Return try, not match. Adjust
4157 callers accordingly.
4158 * g95.h: Split out all g95_match* functions to...
4159 * match.h: ...here. New file.
4160 * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
4161 matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
4163 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
4165 * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
4166 g95_merge_new_implicit): New functions.
4167 (g95_match_implicit_none, g95_match_implicit): Move from here...
4168 * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
4169 Modify to use the new functions in symbol.c.
4170 * g95.h: Add and move prototypes.
4172 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
4174 * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
4175 node compare function.
4176 (g95_insert_bbt): Likewise.
4177 (g95_insert_bbt_with_overlap): Likewise.
4178 (g95_delete_bbt): Likewise.
4179 (delete_treap): Likewise. Also fix a potential bug when calling it.
4180 * module.c (compare_pointers): Change proto to compare_fn.
4181 (compare_integers): Likewise.
4182 (compare_true_names): Likewise.
4183 (find_true_name): Adjust call to compare_true_names to match proto.
4184 (require_atom, write_atom, mio_name): Fix 'const' warnings.
4185 (init_pi_tree): Make compare a compare_fn instead of (int *).
4186 * resolve.c (compare_cases): Change proto to compare_fn.
4187 * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
4188 it static, and rename to compare_symtree.
4189 (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
4191 * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
4192 of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
4194 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
4195 * Make-lang.in: Fix spaces/tabs issues from previous patch.
4196 * patch.options: Blow away Paul's checkin mistake :-)
4197 * io.c (terminate_io): Fix memory leak (Arnaud).
4199 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
4201 * Make-lang.in: Teach about building DVI, info manual.
4202 * g95.texi: New file.
4204 2003-01-02 Paul Brook <paul@nowt.org>
4206 * trans-array.c (g95_reverse_ss): Make static and don't use.
4207 (g95_conv_ss_descriptor): Don't use g95_loopinfo
4208 (g95_conv_array_parameters): Modify for pointer assignments.
4209 (g95_walk_subexpr): New function.
4210 (g95_walk_expr*): Use it.
4211 * trans-array.h (g95_reverse_ss): Remove prototype.
4212 * trans-expr.c (g95_trans_pointer_assign): Implement.
4213 (Many): Set se.want_pointer before calling g95_conv_array_parameter.
4214 * trans-intrinsic.c: Sync with scalarizer changes.
4215 * trans-io.c: Ditto.
4217 2002-12-29 Paul Brook <paul@nowt.org>
4219 * trans-array.c: Document calling convention for arrays.
4221 2002-12-19 Paul Brook <paul@nowt.org>
4223 * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
4224 assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
4225 optional parameters for some intrinsics.
4226 (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
4227 * trans-expr.c (g95_conv_function_call): Pass NULL for absent
4228 optional parameters.
4229 * trans.h (g95_se): Add ignore_optional flag.
4231 2002-12-15 Paul Brook <paul@nowt.org>
4233 * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
4234 * trans-decl.c (g95_generate_function_code): Use TDI_original.
4236 2002-12-14 Paul Brook <paul@nowt.org>
4238 * trans-stmt.c (g95_trans_call): Use resolved symbol name.
4240 2002-12-12 Paul Brook <paul@nowt.org>
4242 * trans-array.c (g95_trans_array_constructor_subarray): Fully
4243 initialize the scalarizer.
4244 (various): Update to new format of g95_expr->value.constructor.
4246 2002-12-08 Paul Brook <paul@nowt.org>
4248 * trans-array.c (g95_put_offset_into_var): New function.
4249 (g95_trans_array_constructor_subarray): New function.
4250 (g95_trans_array_constructor_value): Use it.
4251 (g95_array_cons_size): Don't abort() on array components.
4253 2002-12-08 Paul Brook <paul@nowt.org>
4255 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
4256 * support.c: Update #includes.
4257 (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
4258 * trans-array.c: Update #includes.
4260 * trans-const.c: Ditto.
4261 * trans-io.c: Ditto.
4262 * trans-types.c: Ditto.
4263 (g95_init_types): Set size_type_node.
4264 * trans-decl.c: Update #includes.
4265 (gfor_fndecl_adjust{l,r}): Declare and initialize.
4266 * trans-stmt.c: Update #includes.
4267 (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
4268 (g95_trans_select): Fix check for unbounded ranges.
4269 * trans-expr.c: Update #includes.
4270 (g95_conv_string_tmp): New function.
4271 (g95_conv_concat_op): Use it.
4272 * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
4273 * Trans-intrisic.c: Update #includes.
4274 (g95_conv_intrinsic_strcmp): New function.
4275 (g95_conv_intrinsic_adjust): Ditto.
4276 (g95_conv_intrinsic_function: Use them.
4278 2002-11-30 Paul Brook <paul@nowt.org>
4280 * trans-array.c (g95_walk_function_expr): Handle non-array return by
4282 * trans-dec.c (g95_build_function_decl): Handle character return
4284 (g95_get_fake_result_decl): Ditto.
4285 (g95_trans_deferred_vars): Ditto.
4286 * trans-expr.c (g95_conv_function_call): Ditto.
4287 (g95_trans_arrayfunc_assign) Limit to array valued functions.
4288 * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
4289 (g95_conv_intrinsic_function): Use it.
4290 * trans-types.c (g95_sym_type): Handle functions returning strings.
4291 (g95_return_by_reference): Ditto.
4292 (g95_get_function_type): Ditto.
4294 2002-11-18 Paul Brook <paul@nowt.org>
4296 * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
4297 requires a temporary.
4298 (g95_trans_select): Handle computed gotos.
4299 * trans-types.c (g95_build_array_type): Warn about non-functional
4300 assumed shape arrays.
4301 * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
4303 * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
4304 (g95_conv_intrinsic_int): New function.
4305 (g95_conv_intrinsic_mod): New function.
4306 (g95_conv_intrinsic_ichar): New function.
4307 (g95_conv_intrinsic_function): Use them.
4308 (g95_conv_intrinsic_dim): Use g95_evaluate_now.
4310 2002-11-17 Toon Moene <toon@moene.indiv.nluug.nl>
4312 * trans-types.c (g95_build_array_type): Assumed
4313 sized arrays can have rank > 1.
4314 * trans.c (g95_trans_code): Remove erroneous
4315 warning about CONTINUE.
4316 * trans-expr.c (g95_conv_variable): Remove
4319 2002-11-15 Paul Brook <paul@nowt.org>
4321 * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
4323 2002-10-31 Paul Brook <paul@nowt.org>
4325 * f95-tree.c: Remove tree copying stuff that's now in gimple.c
4326 * trans-expr.c (g95_conv_component_ref): Handle character string
4328 (g95_conv_string_parameter): Ditto.
4329 * trans-types.c (g95_get_derived_type): Add length decl to caracter
4332 2002-10-10 Paul Brook <paul@nowt.org>
4334 * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
4335 * trans-expr.c (g95_conv_function_call): Remove unreliable return value
4337 * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
4338 (g95_conv_intrinsic_function): Handle size and shape intrinsics.
4339 (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
4340 * trans-types.c (pvoid_type_node): Declare and initialize.
4341 * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
4342 (g95_array_allocate): Fix when base==data.
4343 (g95_conv_array_parameter): Correctly handle reduced rank sections.
4344 * trans-io.c (g95_trans_write): Correctly handle string modifiers.
4346 2002-10-09 Paul Brook <paul@nowt.org>
4348 * (g95_conv_expr_reference): Handle character strings correctly.
4350 2002-10-07 Paul Brook <paul@nowt.org>
4352 (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
4354 * trans-array.c (g95_build_array_initializer): Remove.
4355 (g95_conv_array_initializer): New Function.
4356 (g95_trans_auto_arry_allocation): Cleanup.
4357 (g95_trans_init_character_array): Remove.
4358 * g95spec.c: Link in libgforbegin.
4359 * trans.c (g95_generate_code): Rename main function to MAIN__.
4360 (g95_create_var): New function.
4361 (g95_create_var_np): New function.
4362 (g95_evaluate_now): New function.
4363 (g95_start_block): New function.
4364 (g95_finish_block): New function.
4365 (g95_add_expr_to_block): New function.
4366 (g95_add_block_to_block): New function.
4367 * trans-expr.c (g95_conv_componen_ref): New function.
4368 * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
4369 (F95_OBJS): Add dependency.o.
4370 * f95-lang.c (g95_is_simple_stmt): Remove.
4371 * f95-tree.c (mark_not_simple): New function.
4372 (unshare_all_trees): New function.
4373 (create_tmp_var, create_tmp_alias_var): Remove.
4374 * support.c (declare_tmp_vars, tree_last_decl): Remove.
4375 * trans*: Convert to new IR using GENERIC trees. Don't bother about
4376 SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
4378 2002-10-01 Paul Brook <paul@nowt.org>
4380 * trans-array.c: Add support for descriptorless arrays.
4381 (g95_conv_array_data): New function.
4382 (g95_conv_array_base): New function.
4383 * trans-array.h: Declare these here.
4384 * trans-decl.c(g95_create_mopdule_variable): Perform variable
4385 initialization and creation here.
4386 (g95_create_module_vars): Instead of here.
4387 * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
4388 * trans-intrinsic.c: Ditto.
4389 * trans-types.c (g95_is_nodesc_array): New function.
4390 (g95_get_nodesc_array_type): New function.
4391 (g95_sym_type, g95_get_derived_type): Use them.
4392 * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
4394 2002-09-28 Paul Brook <paul@nowt.org>
4396 * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
4397 * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
4400 2002-09-24 Paul Brook <paul@nowt.org>
4402 * f95-lang.c (listify): Remove declaration.
4403 (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
4405 * f95-tree.c (get_name): New function.
4406 * trans.c (module_namespace): Remove.
4407 * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
4408 * trans-types.c: Ditto.
4410 2002-09-19 Paul Brook <paul@nowt.org>
4412 * trans-array.c (g95_get_array_cons_size): New Function.
4413 (g95_con_ss_startstride): Handle Array constructors.
4414 (g95_conv_loop_setup): Ditto.
4415 (g95_conv_array_parameter): Ditto.
4416 * tras-decl.c (g95_finish_var_decl): Make initializes variables
4419 2002-09-19 Paul Brook <paul@nowt.org>
4421 * trans.c (g95_simple_fold_tmp): Detect variables inside
4423 * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
4425 2002-09-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
4427 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
4429 2002-09-14 Paul Brook <paul@nowt.org>
4431 * trans.c (g95_create_module_variable): Move to trans-decl.c.
4432 * trans-const.c (g95_conv_string_init): New Function.
4433 * trans-const.h: Declare it.
4434 * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
4435 variables. Don't bail on intrinsic symbols.
4436 (get_extern_function_decl): Handle specific intrinsic functions.
4437 * trans-types.c (g95_sym_type): Dummy functions don't return
4439 * trans-array.c (g95_build_array_initializer): New Function.
4440 (g95_trans_auto_array_allocation): Build initializer for static decls.
4441 Don't use mpz_addmul, it's GMP4 only.
4443 2002-09-12 Paul Brook <paul@nowt.org>
4445 * trans-decl.c (g95_generate_code): Fix thinko with return variable.
4446 (g95_get_extern_function_decl, g95_build_function_decl): Mangle
4447 assembler names for module procedures.
4449 2002-09-11 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
4451 * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
4454 2002-09-10 Paul Brook <paul@nowt.org>
4456 * trans-array.c: Change format of G95_SS_TEMP strictures.
4457 (g95_check_fncall_dependancy): New function.
4458 (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
4460 * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
4462 (g95_build_function_decl): Don't assume result arrays are packed.
4463 (g95_trans-deferred-vars): Handle array result variables.
4464 (g95_generate_fuction_code): Clear saved_function_decls.
4465 * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
4467 (g95_trans_arrayfunc_assign): New function.
4468 (g95_trans_assignment): Use it.
4469 * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
4470 (g95_se): Add direct_byref.
4471 * trans-types.c: Use sym->result rather than sym where appropriate.
4472 * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
4473 Update other functions to use this.
4474 (g95_is_intrinsic_libcall): New function.
4475 (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
4476 (g95_walk_intrinsic_function): Ditto.
4478 2002-09-08 Paul Brook <paul@nowt.org>
4480 * trans-types.c: Change rank field to dtype field in array descriptor.
4481 * trans-array.c: Implement filling of dtype array descriptor field.
4482 * trans-intrinsic.c: Fix broken LEN intrinsic.
4484 2002-09-07 Paul Brook <paul@nowt.org>
4486 * trans-intrinsic.c: Remove outdated todo intrinsic list.
4487 (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
4488 (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
4490 2002-09-06 Paul Brook <paul@nowt.org>
4492 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
4493 (gt-f95-trans-types.h): Add dependancy information.
4494 * config-lang.in (gtfiles): Add trans-types.c
4495 * f95-lang.c (g95_be_parse_file): Pass error and warning counts
4496 back to top-level code.
4497 * trans-array.c, trans-types.c: Change format of array descriptor.
4498 (g95_conv_descriptor_dimension): New function.
4499 * trans-types.h (g95_conv_descriptor_rank): define.
4500 * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
4503 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
4505 * trans-array.c, trans-types.c: Add rank information to descriptor.
4507 2002-09-06 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
4509 * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
4511 2002-09-04 Paul Brook <paul@nowt.org>
4513 * f95-lang.c (g95_create_decls): New function.
4514 (g95_init): Move initialization of external decls to above, and call
4515 from g95_be_parse_file.
4516 * trans.c (g95_finish_stmt): Don't amputate the decl chain.
4517 * trans-types.c (g95_init_types): Always name integer and char types.
4518 (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
4520 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
4522 * Make-lang.in: Add options.c to F95_PARSER_OBJS
4524 2002-09-02 Paul Brook <paul@nowt.org>
4526 * g95_generate_code: Clear the attr for __fortran_main.
4527 * trans-types.c (g95_finish_type): New function.
4528 * g95_init_io_state_type: Use g95_finish_type.
4529 * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
4531 2002-09-01 Paul Brook <paul@nowt.org>
4533 * README.backend: Warn about the dangers of extra config.h files.
4534 Remove obsolete libgfor stuff.
4535 * config-lang.in: Add target-libgfor dependancy.
4536 * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
4538 2002-09-01 Toon Moene <toon@moene.indiv.nluug.nl>
4540 * g95_conv_mpz_to_tree: Free storage pointed to by q,
4543 2002-08-30 Paul Brook <paul@nowt.org>
4545 * trans-intrinsic.c (g95_conv_intrinsic_function,
4546 g95_walk_intrinsic_function): Added ANY and ALL.
4547 (g95_conv_intrinsic_anyall): New function.
4548 * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in