1 2004-08-23 Eric Christopher <echristo@redhat.com>
3 * trans-types.c (gfc_type_for_mode): Remove VECTOR_TYPE_SUPPORTED_P
4 usage. Use build_vector_type_for_mode for vector types.
6 2004-08-22 Richard Henderson <rth@redhat.com>
9 * data.c (find_con_by_offset): Search ordered list; handle
10 elements with repeat counts.
11 (gfc_assign_data_value_range): New.
12 * gfortran.h (struct gfc_data_value): Make repeat unsigned.
13 (gfc_assign_data_value_range): Declare.
14 * match.c (top_val_list): Extract repeat count into a temporary.
15 * resolve.c (values): Make left unsigned.
16 (next_data_value): Don't decrement left.
17 (check_data_variable): Use gfc_assign_data_value_range.
19 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
21 * trans-const.c, trans-decl.c, trans-expr.c: Spelling fixes.
23 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
25 * check.c (gfc_check_reduction): Rename to ...
26 (check_reduction): ... this. Make static. Don't check type of
28 (gfc_check_minval_maxval, gfc_check_prodcut_sum): New functions.
29 * intrinsic.c (add_functions): Change MAXVAL, MINVAL, PRODUCT and
30 SUM to use new check functions.
31 (check_specific): Change logic to call new functions.
32 * intrinsic.h (gfc_check_minval_maxval, gfc_check_product_sum):
34 (gfc_check_reduction): Remove prototype.
36 2004-08-20 Paul Brook <paul@codesourcery.com>
37 Canqun Yang <canqun@nudt.edu.cn>
40 * trans-array.c (gfc_conv_array_parameter): Pass correct pointer
42 * trans-types.c (gfc_get_nodesc_array_type): Add comment.
44 2004-08-19 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
48 * match.c (match_simple_forall, match_simple_where): Forward-declare.
49 (gfc_match_if): Order statement list alphabetically, add WHERE and
50 FORALL, remove double PAUSE.
51 (gfc_match_simple_where, match_forall_header,
52 gfc_match_simple_forall): New functions.
53 (gfc_match_forall): Use match_forall_header.
55 2004-08-19 Paul Brook <paul@codesourcery.com>
58 * gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0.
59 * symbol.c (gfc_clear_attr): Use memset.
61 2004-08-19 Paul Brook <paul@codesourcery.com>
65 * data.c (assign_substring_data_value): Remove.
66 (create_character_intializer): New function.
67 (gfc_assign_data_value): Track the typespec for the current
68 subobject. Use create_character_intializer.
70 2004-08-19 Erik Schnetter <schnetter@aei.mpg.de>
73 * check.c (gfc_check_reduction): New function.
74 (gfc_check_minval_maxval): Removed.
75 (gfc_check_product): Removed.
76 (gfc_check_sum): Removed.
77 * intrinsic.h: Add/remove declarations for these.
78 * gfortran.h: Add field f3red to union gfc_check_f.
79 * intrinsic.c (add_sym_3red): New function.
80 (add_functions): Register maxval, minval, product, and sum intrinsics
82 (check_specific): Handle f3red union field.
83 * iresolve.c: Whitespace change.
85 2004-08-18 Paul Brook <paul@codesourcery.com>
87 * trans-types.c (gfc_sym_type): Use pointer types for optional args.
89 2004-08-18 Victor Leikehman <lei@il.ibm.com>
92 * trans-io.c (transfer_namelist_element): New. Recursively handle
93 derived-type variables. Pass string lengths.
94 (build_dt): Code moved to build_namelist, with some
95 changes and additions.
96 (gfc_build_io_library_fndecls): Declare the fifth
97 argument in st_set_nml_var_char -- string_length.
99 2004-08-17 Paul Brook <paul@codesourcery.com>
100 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
103 * decl.c (get_proc_name): Update mystery comment.
104 (gfc_match_entry): Check for errors earlier. Add entry point to list.
105 * dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes.
106 * gfortran.h (symbol_attribute): Add entry_master. Document entry.
107 (struct gfc_entry_list): Define.
108 (gfc_get_entry_list): Define.
109 (struct gfc_namespace): Add refs and entries.
110 (enum gfc_exec_op): Add EXEC_ENTRY.
111 (struct gfc_code): Add ext.entry.
112 * module.c (ab_attribute, attr_bits): Remove AB_ENTRY.
113 (mio_symbol_attribute): Don't save/reture addr->entry.
114 (mio_namespace_ref): Refcount namespaces.
115 * parse.c (accept_statement): Handle ST_ENTRY.
116 (gfc_fixup_sibling_symbols): Mark symbol as referenced.
117 (parse_contained): Fixup sibling references to entry points
118 after parsing the procedure body.
119 * resolve.c (resolve_contained_fntype): New function.
120 (merge_argument_lists, resolve_entries): New functions.
121 (resolve_contained_functions): Use them.
122 (resolve_code): Handle EXEC_ENTRY.
123 (gfc_resolve): Call resolve_entries.
124 * st.c (gfc_free_statement): Handle EXEC_ENTRY.
125 * symbol.c (gfc_get_namespace): Refcount namespaces.
126 (gfc_free_namespace): Ditto.
127 * trans-array.c (gfc_trans_dummy_array_bias): Treat all args as
128 optional when multiple entry points are present.
129 * trans-decl.c (gfc_get_symbol_decl): Remove incorrect check.
130 (gfc_get_extern_function_decl): Add assertion. Fix coment.
131 (create_function_arglist, trans_function_start, build_entry_thunks):
133 (gfc_build_function_decl): Rename ...
134 (build_function_decl): ... to this.
135 (gfc_create_function_decl): New function.
136 (gfc_generate_contained_functions): Use it.
137 (gfc_trans_entry_master_switch): New function.
138 (gfc_generate_function_code): Use new functions.
139 * trans-stmt.c (gfc_trans_entry): New function.
140 * trans-stmt.h (gfc_trans_entry): Add prototype.
141 * trans-types.c (gfc_get_function_type): Add entry point argument.
142 * trans.c (gfc_trans_code): Handle EXEC_ENTRY.
143 (gfc_generate_module_code): Call gfc_create_function_decl.
144 * trans.h (gfc_build_function_decl): Remove.
145 (gfc_create_function_decl): Add prototype.
147 2004-08-15 Andrew Pinski <apinski@apple.com>
150 * f95-lang.c (gfc_init_builtin_functions): Initialize the builtins
151 for cabs{,f} and copysign{,f}.
152 * trans-decl.c (gfor_fndecl_math_cabsf): Delete.
153 (gfor_fndecl_math_cabs): Delete.
154 (gfor_fndecl_math_sign4): Delete.
155 (gfor_fndecl_math_sign8): Delete.
156 (gfc_build_intrinsic_function_decls): Remove the
157 initializing of cabs{,f} and copysign{,f} functions.
158 * trans-intrinsic.c (gfc_conv_intrinsic_abs): Use the builtins
159 instead of the functions definitions.
160 (gfc_conv_intrinsic_sign): Likewise.
161 * trans.h (gfor_fndecl_math_cabsf): Delete.
162 (gfor_fndecl_math_cabs): Delete.
163 (gfor_fndecl_math_sign4): Delete.
164 (gfor_fndecl_math_sign8): Delete.
166 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
168 * trans-array.c (gfc_trans_array_constructor_value): Use
170 * trans-const.c (gfc_build_string_const,
171 gfc_init_constants, gfc_conv_mpz_to_tree,
172 gfc_conv_constant_to_tree): Likewise.
173 * trans-decl.c (gfc_get_symbol_decl): Likewise.
174 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
175 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
176 * trans-io.c (add_case, set_error_locus, build_dt,
177 transfer_expr): Likewise.
178 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
179 gfc_trans_stop, gfc_trans_character_select): Likewise.
180 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
181 * trans.c (gfc_trans_runtime_check): Likewise.
183 2004-08-14 Paul Brook <paul@codesourcery.com>
185 * trans-decl.c (gfc_build_function_decl): Remove dead code.
187 2004-08-14 Paul Brook <paul@codesourcery.com>
189 * trans-arry.c (gfc_trans_auto_array_allocation): Remove unused var.
191 2004-08-13 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
193 * gfortran.h: Add comments.
194 * parse.c (parse_contained): Fix comment typo.
195 * resolve.c (was_declared): Ditto.
198 2004-08-11 Paul Brook <paul@codeourcery.com>
201 * intrinsic.c (add_functions): Add dfloat as an alias for dble.
203 2004-08-10 Richard Henderson <rth@redhat.com>
205 * f95-lang.c (gfc_init_builtin_functions): Remove
206 __builtin_stack_alloc, add __builtin_alloca.
207 * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR.
208 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
210 2004-08-10 Paul Brook <paul@codesourcery.com>
212 * trans-io.c (transfer_expr): Handle pointters.
214 2004-08-10 Paul Brook <paul@codesourcery.com>
217 * trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT.
218 (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta.
219 (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary):
220 Handle GFC_SS_COMPONENT.
221 (gfc_conv_ss_startstride): Ditto. Set ss->shape.
222 (gfc_conv_loop_setup): Tweak commends. Remove dead code.
224 (gfc_conv_array_initializer): Call specific initializer routines.
225 * trans-expr.c (gfc_trans_structure_assign): New function.
226 (gfc_trans_subarray_assign): New function.
227 (gfc_trans_subcomponent_assign): New fucntion
228 (gfc_conv_structure): Use them.
229 * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT.
232 2004-08-08 Victor Leikehman <lei@il.ibm.com>
234 * simplify.c (gfc_simplify_shape): Bugfix.
235 * expr.c (gfc_copy_shape_excluding): New function.
236 * gfortran.h (gfc_get_shape): Bugfix.
237 (gfc_copy_shape_excluding): Added declaration.
238 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
239 gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound,
240 gfc_resolve_ubound, gfc_resolve_transpose): Added compile
241 time resolution of shape.
243 2004-08-06 Janne Blomqvist <jblomqvi@cc.hut.fi>
245 * intrinsic.c (add_subroutines): Add getenv and
246 get_environment_variable. (add_sym_5s): New function.
247 * intrinsic.h (gfc_resolve_get_environment_variable): Add
249 * iresolve.c (gfc_resolve_get_environment_variable): New
252 2004-08-06 Feng Wang <fengwang@nudt.edu.cn>
254 * f95-lang.c (gfc_init_builtin_functions): Fix the number of
255 __builtin_pow[f] arguments.
257 2004-08-06 Steven G. Kargl <kargls@comcast.net>
259 * arith.c: Add #define for model numbers. Remove global GMP variables.
260 (natural_logarithm,common_logarithm,exponential,sine,
261 cosine,arctangent,hypercos,hypersine ): Remove.
262 (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions.
263 (arctangent2,gfc_arith_init_1,gfc_arith_done_1
264 gfc_check_real_range, gfc_constant_result, gfc_range_check,
265 gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times,
266 gfc_arith_divide,complex_reciprocal,complex_pow_ui,
267 gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real,
268 gfc_convert_complex,gfc_int2real,gfc_int2complex,
269 gfc_real2int,gfc_real2real,gfc_real2complex,
270 gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP
271 to MPFR, use new functions.
272 * arith.h: Remove extern global variables.
273 (natural_logarithm,common_logarithm,exponential, sine, cosine,
274 arctangent,hypercos,hypersine): Remove prototypes.
275 (arctangent2): Update prototype from GMP to MPFR.
276 (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes.
277 * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR.
278 * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR.
279 * gfortran.h (GFC_REAL_BITS): Remove.
280 (arith): Add ARITH_NAN.
281 Include mpfr.h. Define GFC_RND_MODE.
282 Rename GCC_GFORTRAN_H GFC_GFC_H.
283 (gfc_expr): Convert GMP to MPFR.
284 * module.c: Add arith.h, correct type in comment.
285 (mio_gmp_real): Convert GMP to MPFR.
286 (mio_expr): Use gfc_set_model_kind().
287 * primary.c: Update copyright date with 2004.
288 (match_real_constant,match_const_complex_part): Convert GMP to MPFR.
289 * simplify.c: Remove global GMP variables
290 (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag,
291 gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint,
292 gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan,
293 gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx,
294 gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh,
295 gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon,
296 gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor,
297 gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int,
298 gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log,
299 gfc_simplify_log10,simplify_min_max,gfc_simplify_mod,
300 gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint,
301 gfc_simplify_rrspacing,gfc_simplify_scale,
302 gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin,
303 gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt,
304 gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny,
305 gfc_simplify_init_1,gfc_simplify_done_1): Convert GMP to MPFR.
307 * trans-const.c (gfc_conv_mpfr_to_tree): Rename from
308 gfc_conv_mpf_to_tree. Convert it to use MPFR
309 (gfc_conv_constant_to_tree): Use it.
310 * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree().
311 * trans-intrinsic.c: Add arith.h, remove gmp.h
312 (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR.
314 2004-08-06 Victor Leikehman <lei@il.ibm.com>
315 Paul Brook <paul@codesourcery.com>
317 * trans-array.c (gfc_trans_allocate_array_storage,
318 gfc_trans_allocate_temp_array, gfc_add_loop_ss_code,
319 gfc_conv_loop_setup): For functions, if the shape of the result
320 is not known in compile-time, generate an empty array descriptor for
321 the result and let the callee to allocate the memory.
322 (gfc_trans_dummy_array_bias): Do nothing for pointers.
323 (gfc_conv_expr_descriptor): Use function return values directly.
324 * trans-expr.c (gfc_conv_function_call): Always add byref call
326 (gfc_trans_pointer_assignment): Add comments.
327 (gfc_trans_arrayfunc_assign): Don't chain on expression.
329 2004-08-01 Roger Sayle <roger@eyesopen.com>
331 * options.c (gfc_init_options): Don't warn about the use GNU
332 extensions by default.
333 (gfc_post_options): Warn about GNU extensions with -pedantic.
334 (gfc_handle_option): Don't warn about GNU extensions with -std=gnu.
336 2004-07-30 Richard Henderson <rth@redhat.com>
338 * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL
341 2004-07-25 Richard Henderson <rth@redhat.com>
343 * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL
344 and DECL_IGNORED_P on RESULT_DECL.
345 (gfc_generate_constructors): Likewise.
347 2004-07-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
350 * lang.opt (ffixed-line-length-none, ffixed-line-length-): New
352 (ffixed-line-length-80, ffixed-line-length-132): Remove.
353 * options.c (gfc_handle_options): Deal with changed options.
354 * scanner.c (load_line): Change second arg to 'char **',
355 allocate if pointing to NULL. Keep track of buffer's length.
356 Adapt buffer size to overlong lines. Pad lines to full length
358 (load_file): Adapt to new interface of load_line.
360 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
362 * trans.h (builtin_function): Declare.
364 2004-07-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
367 (parts ported from g95)
368 * parse.h (gfc_state_data): New field do_variable.
369 (gfc_check_do_variable): Add prototype.
370 * parse.c (push_state): Initialize field 'do_variable'.
371 (gfc_check_do_variable): New function.
372 (parse_do_block): Remember do iterator variable.
373 (parse_file): Initialize field 'do_variable'.
374 * match.c (gfc_match_assignment, gfc_match_do,
375 gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate):
376 Add previously missing checks.
377 (gfc_match_return): Reformat error message.
378 * io.c (match_out_tag): New function.
379 (match_open_element, match_close_element,
380 match_file_element, match_dt_element): Call match_out_tag
381 instead of match_vtag where appropriate.
382 (match_io_iterator, match_io_element): Add missing check.
383 (match_io): Reformat error message.
384 (match_inquire_element): Call match_out_tag where appropriate.
386 * parse.c (gfc_check_do_variable): Fix error locus.
388 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
391 * trans-decl.c (gfc_build_function_decl): Create a new chardecl
392 for every assumed length character dummy argument.
395 * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion.
398 * simplify.c (gfc_simplify_bound): Copy the bound expression.
400 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
403 * trans-array.c gfc_trans_g77_array,
404 gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init
405 for assumed length characters.
406 (gfc_conv_expr_descriptor): Set se->string_length if dealing
407 with a character expression.
408 (gfc_cvonv_array_parameter): Pass string length when passing
409 character array according to g77 conventions.
411 2004-07-12 Paul Brook <paul@codesourcery.com>
413 * expr.c (gfc_check_assign_symbol): Handle pointer assignments.
414 * trans-array.c (gfc_trans_auto_array_allocation): Remove
416 * trans-common.c (create_common): Use gfc_conv_initializer.
417 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer.
418 * trans-expr.c (gfc_conv_initializer): New function.
419 (gfc_conv_structure): Use it.
420 * trans.h (gfc_conv_initializer): Add prototype.
422 2004-07-11 Paul Brook <paul@codesourcery.com>
425 * parse.c (gfc_fixup_sibling_symbols): Also look for untyped
427 (parse_contained): Mark contained symbols as referenced.
429 2004-07-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
432 * module.c (gfc_dump_module, gfc_use_module): Print locus
433 when opening of module file fails.
436 * io.c (match_io): Flag 'WRITE(...), ...' as extension.
439 * match.c (gfc_match_program): A program name is obligatory.
440 (gfc_match_return): RETURN in main program is an extension.
441 (gfc_match_block_data): A space is required before a block data
445 * primary.c (match_boz_constant): Call gfc_notify_std only if
446 we actually have a non-standard boz-literal-constant.
449 * expr.c (gfc_check_assign): Print ranks if incompatible. Issue
450 warning if assigning NULL().
452 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
454 * f95-lang.c (set_block): Remove.
455 (gfc_clear_binding_stack): New.
456 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
457 (struct binding_level): Remove block_created_by_back_end.
458 (clear_binding_level): Likewise.
459 (poplevel): Don't handle block_created_by_back_end.
461 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
463 * trans-decl.c (gfc_create_module_variable): Nothing to do if
464 symbol is in common, because we ...
465 (gfc_generate_module_vars): Call gfc_trans_common.
467 2004-07-10 Paul Brook <paul@codesourcery.com>
469 * trans-array.c (gfc_build_null_descriptor): New function.
470 (gfc_trans_static_array_pointer): Use it.
471 * trans-array.h (gfc_build_null_descriptor): Add prototype.
472 * trans-expr.c (gfc_conv_structure): Handle array pointers.
474 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
477 * decl.c (gfc_match_save): Use-associated common block
479 * gfortran.h (gfc_common_head): Add new field 'name'.
480 Fix typo in comment after #endif.
481 * match.c (gfc_get_common): Add new argument from_common,
482 mangle name if flag is set, fill in new field in structure
484 (match_common): Set new arg in call to gfc_get_common,
485 use-associated common block doesn't collide.
486 * match.h (gfc_get_common): Adapt prototype.
487 * module.c (load_commons): Set new arg in call to
489 * symbol.c (free_common_tree): New function.
490 (gfc_free_namespace): Call new function.
491 * trans-common.c (several functions): Remove argument
492 'name', use name from gfc_common_head instead.
494 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
496 * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
497 and RHS match. Return early if the RHS is NULL().
500 * match.c (match_common): Fix error reporting for used common.
503 * trans-expr.c (gfc_conv_structure): Handle initialization
504 of scalar pointer components.
506 * parse.c (decode_statement): Fix matching of BLOCK DATA.
508 * trans-decl.c (generate_local_decl): Remove workaround obsoleted
511 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
513 * trans-common.c: Fix whitespace issues, make variable names
515 (create_common): Additionally, make loop logic more obvious.
517 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
518 Paul Brook <paul@codesourcery.com>
521 * trans-common.c (calculate_length): Remove ...
522 (get_segment_info): Merge into here. Save field type.
523 (build_field): Use saved type.
524 (create_common, new_condition, new_segment, finish_equivalences):
525 Use new get_segment_info.
526 * trans-types.c: Update comment.
528 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
531 * moduele.c (mio_symbol): Don't I/O initial values unless
532 symbol is a parameter.
534 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
537 * resolve.c (resolve_symbol): Verify that the shape of a
538 parameter array is not only explicit, but also constant.
539 * array.c (gfc_is_compile_time_shape): New function.
540 * gfortran.h (gfc_is_compile_time_shape): Add prototype.
542 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
548 * module.c (write_symbol, write_symtree): Remove workaround.
549 * primary.c (match_actual_arglist): Enhance comment.
550 (gfc_match_rvalue): Handle function call with first argument
551 a keyword argument correctly.
552 * resolve.c (resolve_symbol): Change call to
553 gfc_set_default_type to issue error if no implicit type
555 * trans-decl.c (gfc_create_module_variable): Remove workaround.
557 2004-07-08 Paul Brook <paul@codesourcery.com>
559 * intrinsic.c (add_sym_4s): New function.
560 (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
562 2004-07-04 Janne Blomqvist <jblomqvi@cc.hut.fi>
563 Paul Brook <paul@codesourcery.com>
567 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
568 GFC_ISYM_COMMAND_ARGUMENT_COUNT.
569 * intrinsic.c (add_functions): Identify iargc. Add
570 command_argument_count.
571 (add_subroutines): Resolve getarg. Add get_command and
572 get_command_argument.
573 * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
574 gfc_resolve_get_command_argument): Add prototypes.
575 * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
576 gfc_resolve_get_command_argument): New functions.
577 * trans-decl.c (gfor_fndecl_iargc): New variable.
578 (gfc_build_intrinsic_function_decls): Set it.
579 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
580 (gfc_conv_intrinsic_function): Use it.
581 * trans.h (gfor_fndecl_iargc): Declare.
583 2004-07-04 Matthias Klose <doko@debian.org>
585 * Make-lang.in: Generate and install gfortran man page.
586 * invoke.texi: Remove extra '@c man end'.
588 2004-07-04 Richard Henderson <rth@redhat.com>
590 * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
592 2004-07-04 Paul Brook <paul@codesourcery.com>
594 * decl.c (gfc_match_implicit_range): Don't use typespec.
595 (gfc_match_implicit): Handle character selectors.
596 * gfortran.h (gfc_set_implicit): Remove prototype.
597 (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
598 * parse.c (accept_statement): Don't call gfc_set_implicit.
599 * symbol.c (new_ts): Remove.
600 (gfc_set_implicit_none): Use same loop bounds as other functions.
601 (gfc_set_implicit): Remove.
602 (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
603 (gfc_merge_new_implicit): Combine with gfc_set_implicit.
605 2004-06-30 Richard Henderson <rth@redhat.com>
607 * match.c (var_element): Remove unused variable.
609 * trans-decl.c (gfc_generate_function_code): Don't set
610 x_whole_function_mode_p.
611 (gfc_generate_constructors): Likewise.
613 2004-06-30 Richard Henderson <rth@redhat.com>
615 * trans-decl.c (gfc_generate_function_code): Don't set
616 immediate_size_expand.
617 (gfc_generate_constructors): Likewise.
619 2004-06-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
622 * decl.c (gfc_match_type_spec): Rename second argument to
623 'implicit_flag', reverse meaning. Don't match_char_spec if
624 'implicit_flag' is set. Rename to ...
625 (match_type_spec): ... this.
626 (gfc_match_implicit_none, match_implicit_range): Move here
628 (gfc_match_implicit): Move here from match.c, try to
629 match_char_len if match_implicit_range doesn't succeed for
630 CHARACTER implicits. Call renamed fucntion match_type_spec.
631 (gfc_match_data_decl, match_prefix): Call renamed function
633 * match.c (gfc_match_implicit_none, match_implicit_range,
634 gfc_match_implicit): Move to decl.c.
635 * match.h (gfc_match_implicit_none, gfc_match_implicit):
636 Move protoypes to section 'decl.c'.
637 (gfc_match_type_spec): Remove prototype.
639 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
641 * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
644 2004-06-29 Steven Bosscher <stevenb@suse.de>
646 Make sure types in assignments are compatible. Mostly mechanical.
647 * trans-const.h (gfc_index_one_node): New define.
648 * trans-array.c (gfc_trans_allocate_array_storage,
649 gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
650 gfc_trans_array_constructor_value, gfc_trans_array_constructor,
651 gfc_conv_array_ubound, gfc_conv_array_ref,
652 gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
653 gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
654 gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
655 gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
656 types in assignments, conversions and conditionals for expressions.
657 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
658 gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
659 gfc_conv_function_call, gfc_trans_pointer_assignment,
660 gfc_trans_scalar_assign): Likewise.
661 * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
662 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
663 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
664 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
665 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
666 gfc_conv_allocated, gfc_conv_associated,
667 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
668 * trans-io.c (set_string): Likewise.
669 * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
670 gfc_do_allocate, generate_loop_for_temp_to_lhs,
671 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
672 compute_overall_iter_number, gfc_trans_assign_need_temp,
673 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
674 gfc_evaluate_where_mask, gfc_trans_where_assign,
675 gfc_trans_where_2): Likewise.
676 * trans-types.c (gfc_get_character_type, gfc_build_array_type,
677 gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
679 * trans.c (gfc_add_modify_expr): Add sanity check that types
680 for the lhs and rhs are the same for scalar assignments.
682 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
684 * dump-parse-tree.c (show_common): New function.
685 (gfc_show_namespace): Show commons.
687 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
688 Andrew Vaught <andyv@firstinter.net>
692 * decl.c (gfc_match_save): Adapt to new common structures,
693 don't allow saving USE-associated common.
694 * dump-parse-tree (gfc_show_attr): (saved_)common are not
695 symbol attributes any longer.
696 (gfc_show_symbol): Don't show old-style commons any longer.
697 (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
699 * gfortran.h (symbol_attribute): Remove common and saved_common
701 (gfc_symbol): Remove common_head element.
702 (gfc_common_head): New struct.
703 (gfc_get_common_head): New macro.
704 (gfc_symtree): Add field 'common' to union.
705 (gfc_namespace): Add field 'common_root'; change type of field
706 'blank_common' to blank_common.
707 (gfc_add_data): New prototype.
708 (gfc_traverse_symtree): Expect a symtree as first argument
709 instead of namespace.
710 * match.c (gfc_get_common): New function.
711 (match_common_name): Change to take char * as argument, adapt,
712 fix bug with empty name.
713 (gfc_match_common): Adapt to new data structures. Disallow
714 redeclaration of USE-associated COMMON-block. Fix bug with
716 (var_element): Adapt to new common structures.
717 * match.h (gfc_get_common): Declare.
718 * module.c: Add 2004 to copyright years, add commons to module
719 file layout description.
720 (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
721 for removed attributes.
722 (mio_symbol): Adapt to new way of storing common relations.
723 (load_commons): New function.
724 (read_module): Skip common list on first pass, load_commons at
726 (write_commons): New function.
727 (write_module): Call write_commons().
728 * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
729 functions related to removed attributes.
730 (gfc_add_data): New function.
731 (gfc_clear_attr): Don't set removed attributes.
732 (gfc_copy_attr): Don't copy removed attributes.
733 (traverse_symtree): Remove.
734 (gfc_traverse_symtree): Don't traverse symbol
735 tree of the passed namespace, but require a symtree to be passed
736 instead. Unify with traverse_symtree.
737 (gfc_traverse_ns): Call gfc_traverse_symtree according to new
739 (save_symbol): Remove setting of removed attribute.
740 * trans-common.c (gfc_sym_mangled_common_id): Change to
741 take 'char *' argument instead of 'gfc_symbol'.
742 (build_common_decl, new_segment, translate_common): Adapt to new
743 data structures, add new
745 (create_common): Adapt to new data structures, add new
746 argument name. Fix typo in intialization of derived types.
747 (finish_equivalences): Add second argument in call to
749 (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
750 (gfc_trans_common): Adapt to new data structures.
751 * trans-decl.c (gfc_create_module_variables): Remove test for
754 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
756 * io.c: Add 2004 to copyright years.
758 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
759 Andrew Vaught <andyv@firstinter.net>
761 * gfortran.h (gfc_gsymbol): New typedef.
762 (gfc_gsym_root): New variable.
763 (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
764 * parse.c (global_used): New function.
765 (parse_block_data): Check for double empty BLOCK DATA,
766 use global symbol table.
767 (parse_module): Use global symbol table.
768 (add_global_procedure, add_global_program): New functions.
769 (gfc_parse_file): Use global symbol table.
770 * symbol.c (gfc_gsym_root): New variable.
771 (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
774 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
776 * module.c (mio_gmp_real): Correct writing of negative numbers.
778 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
781 * expr.c (check_intrinsic_op): Allow comparison of characters.
784 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
785 Andrew Vaught <andyv@firstinter.net>
787 * decl.c (contained_procedure): New function.
788 (match_end): Verify correctness of END STATEMENT in
791 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
792 Andrew Vaught <andyv@firstinter.net>
795 * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
796 (decode_statement): Enforce required space in free-form.
798 2004-06-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
800 * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
801 * trans-array.c (gfc_conv_descriptor_data): Add operand
803 (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
804 (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
805 (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
806 * trans-common.c (create_common): Likewise.
807 * trans-expr.c (gfc_conv_component_ref): Likewise.
808 * trans-io.c (set_parameter_value): Likewise.
809 (set_parameter_ref, set_string, set_flag, io_result): Likewise.
810 (transfer_expr): Likewise.
811 * trans-decl.c (gfc_trans_auto_character_variable):
812 Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
813 (gfc_gimplify_function): New function.
814 (gfc_generate_function-code): Properly handle nested functions.
815 * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
817 2004-06-22 Janne Blomqvist <jblomqvi@cc.hut.fi>
820 * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
821 (gfc_resolve_inquire): Resolve the iolength tag. Return
822 SUCCESS at end of function if no failure has occured.
823 * resolve.c (resolve_code): Resolve if iolength is encountered.
824 * trans-io.c: (ioparm_iolength, iocall_iolength,
825 iocall_iolength_done): New variables.
826 (last_dt): Add IOLENGTH.
827 (gfc_build_io_library_fndecls ): Set iolength related variables.
828 (gfc_trans_iolength): Implement.
829 (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
831 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de
834 * scanner.c (load_line): Don't truncate preprocessor lines.
835 Reformat error message.
836 (preprocessor_line): Issue warning in case of malformed
839 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
841 * resolve.c (resolve_symbol): Add comment in function body.
842 (check_data_variable): Change type of mark to ar_type, adapt code
845 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
847 * array.c (gfc_insert_constructor): Avoid redundant call to
848 mpz_comp. Add 2004 to copyright years.
850 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
852 * trans.h (stmtblock_t): Change has_scope to unsigned int.
854 2004-06-20 Steven G. Kargl <kargls@comcast.net>
856 * arith.c (gfc_range_check): correct complex underflow.
858 2004-06-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
861 * match.c (match_case_selector): Call gfc_match_init_expr
862 instead of gfc_match_expr.
863 * resolve.c (validate_case_label_expr): No need to check for
864 constant, since it wouldn't have been matched with the fix to
867 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
870 * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
873 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
876 * trans-deecl.c (generate_local_decl): Do not issue warning for
877 unused variables if they're use associated.
879 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
880 Andrew Vaught <andyv@firstinter.net>
883 * gfortran.h (gfc_check_f): Add new field f3ml.
884 * check.c (gfc_check_minloc_maxloc): Take argument list instead
885 of individual arguments, reorder if necessary.
886 * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
887 * intrinsic.c (add_sym_3ml): New function.
888 (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
889 (check_specific): Catch special case MINLOC, MAXLOC.
891 2004-06-14 Paul Brook <paul@codesourcery.com>
893 * intrinsic.c (add_sym_2s): Use correct function types.
895 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
897 * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize. Move data.c
898 * data.c (gfc_get_section_index): Remove dependency on trans.h.
900 2004-06-12 Steven G. Kargl <kargls@comcast.net>
902 * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
903 gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
904 * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
905 GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
906 * trans-intrinsic.c: Use symbols.
907 * intrinsic.c (add_sym_2s): New function.
908 * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
909 * intrinsic.h: Function prototypes.
910 * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
911 gfc_resolve_srand): New functions.
913 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
916 * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
919 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
922 * interface.c (compare_parameter, compare_actual_formal): Don't
923 check types and array shapes for NULL()
924 * trans-expr.c (conv_function_call): No double indirection for
927 2004-06-09 Toon Moene <toon@moene.indiv.nluug.nl>
929 * trans-expr.c (gfc_conv_cst_int_power): Compute
930 x**(-n) by converting it to (1/x)**n instead of
933 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
936 * module.c (write_symbol, write_symtree): Don't write symbols
937 wrongly added to namespace.
938 * trans-decl.c (gfc_create_module_variable): Don't create a
939 backend decl for a symbol incorrectly added to namespace.
941 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
944 * resolve.c (resolve_symbol): Verify that parameter array has an
945 explicit shape. Fix typos and coding style issues in surrounding
948 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
951 * gfortran.texi: The documentation doesn't contain infomration on
952 how to report bugs, and shouldn't, so remove the line which
955 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
957 * intrinsic.c (sort_actual): Keep track of type of missing
958 arguments. (Missing from previous commit.)
960 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
962 * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
963 * interface.c (compare_actual_formal): Keep type of omitted
965 * trans-expr.c (gfc_conv_function_call): Add string length
966 argument for omitted string argument.
968 2004-06-03 Paul Brook <paul@codesourcery.com>
970 * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
971 lists instead of compound expr chains.
972 (gfc_trans_code): Annotate statement lists.
974 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
976 * trans-array.c: Fix spelling in comments.
978 2004-06-02 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
981 * data.c (assign_substring_data_value): New function.
982 (gfc_assign_data_value): Call the new function if we're dealing
983 with a substring LHS.
985 2004-06-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
988 * gfortran.h (GFC_VERSION): Remove.
989 * gfortran.texi (version-gfortran): Remove, replace by version-GCC
992 2004-05-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
994 * trans-types.c: Fix spelling & layout in comments.
996 2004-05-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
999 * trans-const.c (gfc_conv_string_init): Allow variable string
1000 length lower than initialization string length.
1002 2004-05-30 Paul Brook <paul@codesourcery.com>
1005 * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
1006 * trans-expr.c (gfc_trans_string_copy): New function.
1007 (gfc_conv_statement_function): Use them. Create temp vars. Enforce
1009 (gfc_conv_string_parameter): Use gfc_trans_string_copy.
1010 * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
1011 * trans.h (struct gfc_saved_var): Define.
1012 (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
1014 2004-05-30 Steven G. Kargl <kargls@comcast.net>
1016 * iresolve.c (gfc_resolve_random_number): Clean up conditional.
1018 2004-05-29 Steven G. Kargl <kargls@comcast.net>
1020 * simplify.c (gfc_simplify_log): Remove useless line of code.
1022 2004-05-29 Paul Brook <paul@codesourcery.com>
1024 * trans-common.c (find_equivalence): Find multiple rules.
1026 2004-05-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1028 * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
1029 (gfc_current_locus): Declare new global variable.
1030 * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
1031 (gfc_current_locus1): Rename ...
1032 (gfc_current_locus): ... to this.
1033 (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
1034 skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
1035 gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
1036 gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
1037 and gfc_current_locus(), respectively.
1038 * array.c (match_subscript, gfc_match_array_ref, match_array_list,
1039 match_array_cons_element, gfc_match_array_constructor):
1040 Read/modify gfc_current_locus instead of calling gfc_set_locus()
1041 and gfc_current_locus().
1042 * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
1043 match_attr_spec, gfc_match_function_decl, gfc_match_end,
1044 attr_decl1, gfc_match_save): Likewise.
1045 * error.c (error_print, gfc_internal_error): Likewise.
1046 * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
1047 * interface.c (gfc_add_interface): Likewise.
1048 * io.c (gfc_match_format, match_dt_format, match_dt_element,
1049 match_io_iterator, match_io): Likewise.
1050 * match.c (gfc_match_space, gfc_match_eos,
1051 gfc_match_small_literal_int, gfc_match_st_label,
1052 gfc_match_strings, gfc_match_name, gfc_match_iterator,
1053 gfc_match_char, gfc_match, gfc_match_assignment,
1054 gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
1055 gfc_match_nullify, gfc_match_call, match_implicit_range,
1056 gfc_match_implicit, gfc_match_data, match_case_selector,
1057 gfc_match_case, match_forall_iterator): Likewise.
1058 * matchexp.c (gfc_match_defined_op_name, next_operator,
1059 match_level_1, match_mult_operand, match_ext_mult_operand,
1060 match_add_operand, match_ext_add_operand, match_level_2,
1061 match_level_3, match_level_4, match_and_operand, match_or_operand,
1062 match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
1063 * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
1064 * parse.c (match_word, decode_statement, next_free, next_fixed,
1065 add_statement, verify_st_order, parse_if_block, gfc_parse_file):
1067 * primary.c (match_digits, match_integer_constant,
1068 match_boz_constant, match_real_constant, match_substring,
1069 next_string_char, match_charkind_name, match_string_constant,
1070 match_logical_constant, match_const_complex_part,
1071 match_complex_constant, match_actual_arg, match_keyword_arg,
1072 gfc_match_actual_arglist, gfc_match_structure_constructor,
1073 gfc_match_rvalue, gfc_match_variable): Likewise.
1074 * st.c (gfc_get_code): Likewise.
1075 * symbol.c (check_conflict, check_used, check_done,
1076 duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
1077 gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
1078 gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
1080 2004-05-26 Roger Sayle <roger@eyesopen.com>
1082 * io.c (format_asterisk): Silence compiler warnings by correcting
1083 the number of elements of a "locus" initializer.
1085 2004-05-25 Roger Sayle <roger@eyesopen.com>
1088 * matchexp.c: Allow unary operators after arithmetic operators
1090 (match_ext_mult_operand, match_ext_add_operand): New functions.
1091 (match_mult_operand): Tweak to call match_ext_mult_operand.
1092 (match_add_operand): Tweak to call match_ext_mult_operand.
1093 (match_level_2): Rearrange to call match_ext_add_operand.
1095 2004-05-25 Paul Brook <paul@codesourcery.com>
1097 * expr.c (check_inquiry): Remove bogus tests.
1099 2004-05-23 Paul Brook <paul@codesourcery.com>
1102 * expr.c (restricted_args): Remove redundant checks/argument.
1103 (external_spec_function): Update to match.
1104 (restricted_intrinsic): Rewrite.
1106 2004-05-23 Paul Brook <paul@codesourcery.com>
1107 Victor Leikehman <lei@haifasphere.co.il>
1109 * gfortran.h (struct gfc_symbol): Add equiv_built.
1110 * trans-common.c: Change int to HOST_WIDE_INT. Capitalize error
1112 (current_length): Remove.
1113 (add_segments): New function.
1114 (build_equiv_decl): Create initialized common blocks.
1115 (build_common_decl): Always add decl to bindings.
1116 (create_common): Create initializers.
1117 (find_segment_info): Reformat to match coding conventions.
1118 (new_condition): Use add_segments.
1119 (add_condition, find_equivalence, add_equivalences): Move iteration
1120 inside functions. Only process each segment once.
1121 (new_segment, finish_equivalences, translate_common): Simplify.
1123 2004-05-23 Steven G. Kargl <kargls@comcast.net>
1125 * check.c (gfc_check_random_seed): Issue for too many arguments.
1127 2004-05-22 Steven G. Kargl <kargls@comcast.net>
1129 * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
1131 2004-05-22 Paul Brook <paul@codesourcery.com>
1133 * dump-parse-tree.c (gfc_show_equiv): New function.
1134 (gfc_show_namespace): Use it.
1136 2004-05-22 Victor Leikehman <lei@haifasphere.co.il>
1139 * symbol.c (gfc_add_common): Disable checks to work around other more
1140 fundamental inadequacies.
1142 2004-05-22 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1144 * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
1146 (gfc_build_function_decl): Likewise.
1148 2004-05-22 Steven G. Kargl <kargls@comcast.net>
1150 * check.c (gfc_check_system_clock): New function.
1151 * intrinsic.c (add_sym_3s): New function.
1152 (add_subroutines): Use it.
1153 * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
1155 * iresolve.c (gfc_resolve_system_clock): New function.
1157 2004-05-22 Steven G. Kargl <kargls@comcast.net>
1159 * invoke.texi: Document -Wunderflow and spell check.
1160 * lang.opt: Add Wunderflow.
1161 * gfortran.h (gfc_option_t): Add warn_underflow option.
1162 * options.c (gfc_init_options, set_Wall): Use it.
1163 * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
1164 * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
1165 gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
1166 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
1167 * arith.c (common_logarithm): Fix typo in comment.
1169 2004-05-21 Roger Sayle <roger@eyesopen.com>
1171 * io.c (check_format): As a GNU extension, allow the comma after a
1172 string literal to be optional in a format. Use gfc_notify_std to
1173 issue an error/warning as appropriate.
1175 2004-05-21 Roger Sayle <roger@eyesopen.com>
1177 * io.c (check_format): Use gfc_notify_std to determine whether to
1178 issue an error/warning for omitting the digits from the X format.
1180 2004-05-20 Roger Sayle <roger@eyesopen.com>
1182 * io.c (check_format): Allow the number before the X format to
1183 be optional when not -pedantic.
1185 2004-05-18 Feng Wang <fengwang@nudt.edu.cn>
1186 Paul Brook <paul@codesourcery.com>
1188 * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
1189 Create decls for __builtin_pow{,f}.
1190 * gfortran.h (PREFIX_LEN): Define.
1191 * trans-decl.c (gfor_fndecl_math_powi): Add.
1192 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
1193 (gfc_build_intrinsic_function_decls): Create decls for powi.
1194 * trans-expr.c (powi_table): Add.
1195 (gfc_conv_integer_power): Remove.
1196 (gfc_conv_powi): New function.
1197 (gfc_conv_cst_int_power): New function.
1198 (gfc_conv_power_op): Use new powi routines.
1199 * trans.h (struct gfc_powdecl_list): Add.
1200 (gfor_fndecl_math_powi): Add.
1201 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
1203 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1205 * trans.c, trans-decl.c: Fix comment typos.
1207 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1209 * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
1211 2004-05-18 Steve Kargl <kargls@comcast.net>
1213 * arith.c (gfc_int2complex): Fix incorrect range checking.
1215 2004-05-18 Paul Brook <paul@codesourcery.com>
1218 * decl.c (add_init_expr_to_sym): Remove incorrect check.
1219 (default_initializer): Move to expr.c.
1220 (variable_decl): Don't assign default initializer to variables.
1221 * expr.c (gfc_default_initializer): Move to here.
1222 * gfortran.h (gfc_default_initializer): Add prototype.
1223 * resolve.c (resolve_symbol): Check for illegal initializers.
1224 Assign default initializer.
1226 2004-05-17 Steve Kargl <kargls@comcast.net>
1228 * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
1230 2004-05-17 Steve Kargl <kargls@comcast.net>
1232 * arith.c (gfc_real2complex): Range checking wrong part of complex
1235 2004-05-16 Paul Brook <paul@codesourcery.com>
1237 * options.c (gfc_handle_module_path_options): Fix buffer overrun.
1239 2004-05-16 Paul Brook <paul@codesourcery.com>
1241 * arith.c (gfc_range_check): Fix logic error.
1243 2004-05-16 Steve Kargl <sgk@troutmask.apl.washington.edu>
1245 * arith.c: Fix comment typos.
1247 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1250 * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
1251 not initialized in a disallowed fashion.
1252 * match.c (gfc_match_common): Likewise.
1253 (var_element): Verify that variable is not in the blank COMMON,
1254 if it is in a common.
1256 2004-05-15 Joseph S. Myers <jsm@polyomino.org.uk>
1258 * Make-lang.in (f95.generated-manpages): Remove.
1259 (f95.srcextra): New.
1260 (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
1261 f95.maintainer-clean): Generate info and dvi files in objdir/doc.
1264 (f95.install-info): Remove.
1265 (install-info): New.
1267 2004-05-15 Victor Leikehman <lei@haifasphere.co.il>
1269 * decl.c (add_init_expr_to_sym): Check for variable size arrays.
1271 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1273 * primary.c (match_boz_constant): Use gfc_notify_std() for
1274 issuing a warning or an error.
1276 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1279 * primary.c (match_structure_constructor): Rename ...
1280 (gfc_match_structure_constructor): ... to this. Make non-static.
1281 (gfc_match_rvalue): Call renamed function.
1282 * match.h (gfc_match_structure_constructor): Declare.
1283 * match.c (gfc_match_data_constant): Handle structure
1286 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1290 * gfortran.h (gfc_linebuf): New typedef.
1292 (gfc_file): Revamped, use new gfc_linebuf.
1293 (locus): Revamped, use new types.
1294 (gfc_current_file): Remove.
1295 (gfc_current_form, gfc_source_file): New global variables.
1296 * match.c (gfc_match_space, gfc_match_strings): Use
1297 gfc_current_form to find source form.
1298 * module.c (gfc_dump_module): Use gfc_source_file when printing
1300 * error.c (show_locus, show_loci) Use new data structures to print
1302 * scanner.c (first_file, first_duplicated_file, gfc_current_file):
1304 (file_head, current_file, gfc_current_form, line_head, line_tail,
1305 gfc_current_locus1, gfc_source_file): New global variables.
1306 (gfc_scanner_init1): Set new global variables.
1307 (gfc_scanner_done1): Free new data structures.
1308 (gfc_current_locus): Return pointer to gfc_current_locus1.
1309 (gfc_set_locus): Set gfc_current_locus1.
1310 (gfc_at_eof): Set new variables.
1311 (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
1312 to new locus structure.
1313 (gfc_check_include): Remove.
1314 (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
1315 (gfc_skip_comments): Use gfc_current_form, find locus with
1317 (gfc_next_char): Use gfc_current_form.
1318 (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
1319 (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
1321 (get_file): New function.
1322 (preprocessor_line, include_line): New functions.
1323 (load_file): Move down, rewrite to match new data structures.
1324 (gfc_new_file): Rewrite to match new data structures.
1325 * parse.c (next_statement): Remove code which is now useless. Use
1326 gfc_source_form and gfc_source_file where appropriate.
1327 * trans-decl.c (gfc_get_label_decl): adapt to new data structures
1328 when determining locus of frontend code.
1329 * trans-io.c (set_error_locus): Same.
1330 * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
1331 * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
1333 (all): Add missing initializers.
1335 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1337 * Make-lang.in (trans-common.o): Remove redundant dependency.
1338 (data.c): Replace object file name ...
1339 (data.o): ... by the correct one.
1341 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1343 * dump-parse-tree.c (gfc_show_array_ref): Print colon only
1344 for ranges when dumping array references.
1346 2004-05-14 Victor Leikehman <lei@haifasphere.co.il>
1348 * decl.c (variable_decl): Always apply default initializer.
1350 2004-05-08 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1353 * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
1354 handle zero correctly.
1356 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1358 * match.c (gfc_match): Eliminate dead code.
1360 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1362 * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
1363 Detect bad continuation line in fixed form sources.
1365 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1368 * iresolve.c (gfc_resolve_nearest): Add new function.
1369 * intrinsic.h: ... declare it here.
1370 * intrinsic.c (add_functions): ... add it as resolving function
1373 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1376 * match.c (gfc_match_do): Allow infinite loops with
1377 label-do-stmt. Do not enforce space after comma.
1379 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1382 * parse.c (parse_interface): Allow empty INTERFACE, remove
1385 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1387 * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
1388 decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
1389 expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
1390 intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
1391 matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
1392 primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
1393 trans-array.c, trans-array.h, trans-common.c, trans-const.c,
1394 trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
1395 trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
1396 trans-types.h, trans.c, trans.h: Update copyright years and
1398 * data.c: Likewise, also removed two whitespace-only lines.
1399 * gfortranspec.c, lang.opt: Update copyright years.
1401 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1404 * trans-decl.c (generate_local_decl): Don't warn for unused
1405 variables which are in common blocks.
1407 2004-05-13 Diego Novillo <dnovillo@redhat.com>
1409 * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
1410 trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
1411 trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
1413 2004-05-13 Victor Leikehman <lei@haifasphere.co.il>
1416 * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
1418 2004-05-13 Joseph S. Myers <jsm@polyomino.org.uk>
1420 * gfortran.texi: Use @table @emph instead of @itemize @emph.
1421 Remove "set DEVELOPMENT".
1422 (Compiling GFORTRAN): Remove.
1424 2004-05-09 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1426 * array.c (match_subscript, match_array_ref): Add comments
1427 explaining argument 'init'.
1428 * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
1429 trans-expr.c, trans.c: Fix some typos in comments.
1430 * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
1431 * primary.c (match_digits, match_integer_constant): Add comment
1432 explaining signflag.
1434 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1437 * primary.c: Include system.h and flags.h, needed for pedantic.
1438 (match_boz_constant): Allow "x" for hexadecimal constants, warn if
1441 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1444 * match.c (match_data_constant): Handle case where
1445 gfc_find_symbol sets sym to NULL
1447 2004-04-28 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1449 * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
1450 dependency on mathbuiltins.def
1452 2004-04-24 Victor Leikehman <lei@il.ibm.com>
1454 * trans-io.c (transfer_expr): Implemented recursive printing
1457 2004-04-24 Andrew Pinski <pinskia@physics.uc.edu>
1459 * gfortranspec.c: Do not include multilib.h.
1461 2004-04-24 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1463 * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
1464 2004 to copyright years.
1465 * trans-expr.c, trans-decl.c: Comment update, we now generate
1466 GENERIC, not SIMPLE. Add 2004 to copyright years.
1468 2004-04-24 Paul Brook <paul@codesourcery.com>
1470 * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
1472 2004-04-24 Feng Wang <fengwang@nudt.edu.cn>
1475 * arith.c (gfc_arith_divide): Fix complex divide.
1477 2004-04-23 Andrew Pinski <pinskia@physics.uc.edu>
1479 * gfortranspec.c: Include the target headers.
1481 2004-04-18 Feng Wang <fengwang@nudt.edu.cn>
1485 * arith.c (arctangent2): New function.
1486 * arith.h (arctangent2): Add function prototype.
1487 * simplify.c (gfc_simplify_atan2): Use it.
1488 (gfc_simplify_log): Use it.
1490 2004-04-12 Diego Novillo <dnovillo@redhat.com>
1492 * fortran/f95-lang.c (gfc_expand_stmt): Remove.
1493 (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
1495 2004-04-11 Bud Davis <bdavis9659@comcast.net>
1498 * trans-io.c (build_dt): Change REC to value.
1500 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
1503 * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
1504 the real value when converting mpf to string.
1506 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
1509 * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
1512 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
1515 * simplify.c (simplify_min_max): Convert the type of the result.
1517 2004-04-11 Paul Brook <paul@codesourcery.com>
1519 * gfortran.texi: Use full target triplet.
1521 2004-04-11 Paul Brook <paul@codesourcery.com>
1523 * Make-lang.in (GFORTRAN_TEXI): Set it.
1524 (fortran/dfortran.dvi): Use it. Add fortran to include paths.
1525 (fortran/gfortran.info): Ditto.
1526 * gfortran.texi: Major update.
1527 * invoke.texi: New file.
1529 2004-04-10 Paul Brook <paul@codesourcery.com>
1531 * trans-array.c (gfc_trans_allocate_temp_array,
1532 gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
1533 * trans-decl.c (gfc_build_dummy_array_decl,
1534 gfc_get_symbol_decl, gfc_build_function_decl,
1535 gfc_create_module_variable): Ditto.
1536 * trans-expr.c (gfc_conv_variable): Ditto.
1537 * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
1538 * trans.h (GFC_DECL_STRING): Remove.
1539 (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
1540 GFC_DECL_ASSIGN): Renumber flags.
1542 2004-04-05 Paul Brook <paul@codesourcery.com>
1546 * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
1548 * gfortran.h (struct gfc_charlen): Add backend_decl.
1549 * trans-array.c (gfc_trans_allocate_temp_array,
1550 gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
1551 (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
1552 Remove old, broken string handling.
1553 (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
1554 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
1555 gfc_trans_deferred_array): Handle character arrays.
1556 * trans-const.c (gfc_conv_const_charlen): New function.
1557 * trans-const.h (gfc_conv_const_charlen): Add prototype.
1558 * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
1560 (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
1561 (gfc_create_string_length): New function.
1562 (gfc_get_symbol_decl): Create lengths for character variables.
1563 (gfc_get_fake_result_decl): Ditto.
1564 (gfc_build_function_decl): Only set length for assumed length
1565 character arguments.
1566 (gfc_trans_dummy_character): New function.
1567 (gfc_trans_auto_character_variable): Rewrite.
1568 (gfc_trans_deferred_vars): Handle more types of character variable.
1569 (gfc_create_module_variable): String lengths have moved.
1570 (gfc_generate_function_code): Initialize deferred var chain earlier.
1571 * trans-expr.c (gfc_conv_init_string_length): Rename ...
1572 (gfc_trans_init_string_length): ... to this.
1573 (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
1574 gfc_conv_function_call): Update to new format for character variables.
1575 (gfc_conv_string_length): Remove.
1576 (gfc_conv_string_parameter): Update assertion.
1577 * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
1578 * trans-io.c (set_string): Use new macro names.
1579 * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
1580 * trans-types.c (gfc_get_character_type): Use existing length expr.
1581 (gfc_is_nodesc_array): Make public.
1582 (gfc_get_dtype_cst): Rename ...
1583 (gfc_get_dtype): ... to this. Handle unknown size arrays.
1584 (gfc_get_nodesc_array_type): Use new name.
1585 (gfc_sym_type): New character variable code.
1586 (gfc_get_derived_type): Ditto.
1587 (gfc_get_function_type): Evaluate character variable lengths.
1588 * trans-types.h (gfc_strlen_kind): Define.
1589 (gfc_is_nodesc_array): Add prototype.
1590 * trans.h: Update prototypes.
1591 (struct lang_type): Update comments.
1592 (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
1593 (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
1595 2004-04-04 Paul Brook <paul@codesourcery.com>
1597 * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
1598 * options.c (gfc_init.options, gfc_handle_option): Ditto.
1599 * trans-expr.c (gfc_conv_function_call): Ditto.
1600 * trans-types.c (gfc_is_nodesc_array): Ditto
1601 * lang.opt (fg77-calls): Remove.
1603 2004-04-04 Paul Brook <paul@codesourcery.com>
1605 * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
1606 (gfc_conv_descriptor_base): Rename ...
1607 (gfc_conv_descriptor_offset): ... to this.
1608 (gfc_trans_allocate_array_storage): Set offset to zero.
1609 (gfc_conv_array_base): Rename ...
1610 (gfc_conv_array_offset): ... to this.
1611 (gfc_conv_array_index_ref): Add offset parameter.
1612 (gfc_conv_array_ref): Include offset.
1613 (gfc_trans_preloop_setup): Use existing offset.
1614 (gfc_trans_allocate_temp_array, gfc_array_allocate,
1615 gfc_trans_auto_array_allocation, gfc_trans_g77_array,
1616 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
1617 gfc_conf_ss_descriptor): Set offset.
1618 * trans-array.h: Rename prototypes.
1619 * trans-const.h (gfc_index_zero_node): Define.
1620 * trans-decl.c (gfc_build_qualified_array): Change base to offset.
1621 * trans-types.c (gfc_get_array_type_bounds): Ditto.
1622 (gfc_get_nodesc_array_type): Calculate offset before upper bound.
1624 2004-03-25 Diego Novillo <dnovillo@redhat.com>
1626 * convert.c (convert): Don't handle WITH_RECORD_EXPR.
1628 2004-03-24 Bud Davis <bdavis9659@comcast.net>
1631 * arith.c (gfc_convert_integer,gfc_convert_real): Removed leading '+'
1632 before conversion by gmp library call.
1634 2004-03-24 Bud Davis <bdavis9659@comcast.net>
1637 * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
1639 2004-02-24 Richard Henderson <rth@redhat.com>
1641 * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
1643 2004-02-19 Loren J. Rittle <ljrittle@acm.org>
1645 * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
1646 (fortran/gfortran.info): ... to here.
1649 2004-02-16 Richard Henderson <rth@redhat.com>
1651 * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
1652 * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
1653 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
1654 (gfc_expand_function): Rename from expand_function_body, make static,
1655 don't do anything except invoke tree_rest_of_compilation.
1656 (gfc_be_parse_file): Invoke cgraph.
1657 (gfc_expand_decl): Remove.
1658 (gfc_init_builtin_functions): Add __builtin_init_trampoline and
1659 __builtin_adjust_trampoline.
1660 * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
1661 (gfc_finalize): New.
1662 (gfc_generate_function_code): Use it. Lower nested functions.
1663 * trans-expr.c (gfc_conv_function_call): Add static chain operand
1665 * trans.c (gfc_build_function_call): Likewise.
1666 * trans.h (expand_function_body): Remove.
1668 2004-02-15 Victor Leikehman <lei@il.ibm.com>
1671 * trans-decl.c (gfc_build_function_decl) For functions
1672 returning CHARACTER pass an extra length argument,
1673 following g77 calling conventions.
1674 * trans-types.c (gfc_get_function_type) Ditto.
1675 * trans-expr.c (gfc_conv_function_call) Ditto.
1677 2004-02-14 Paul Brook <paul@codesourcery.com>
1679 * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
1681 2004-02-12 Paul Brook <paul@nowt.org>
1685 2004-02-08 Steve Kargl <sgk@troutmask.apl.washington.edu>
1687 * gfortran.texi: Fix typos.
1689 2004-02-07 Bud Davis <bdavis9659@comcast.net>
1692 * intrinsic.c (add_conversions) Use logical conversion instead
1694 * trans-types.c (gfc_get_logical_type) implemented logical*1
1697 2004-01-17 Paul Brook <paul@codesourcery.com>
1699 * lang-specs.h: Remove %<fixed-form.
1701 2004-01-15 Toon Moene <toon@moene.indiv.nluug.nl>
1703 * lang-specs.h: Enable preprocessing of source files
1704 ending in .F, .fpp, .FPP, .F90 and .F95.
1706 2004-01-13 Toon Moene <toon@moene.indiv.nluug.nl>
1709 * lang-specs.h: Enable compilation of files ending
1710 in .f, .for and .FOR.
1712 2004-01-11 Paul Brook <paul@codesourcery.com>
1714 * trans-stmt.c (gfc_trans_if_1): New function.
1715 (gfc_trans_if): Use it.
1717 2004-01-11 Erik Schnetter <schnetter@uni-tuebingen.de>
1719 * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
1720 (gfc_option_t): Add max_identifier_length.
1721 * lang.opt: Add fmax-identifier-length.
1722 * match.c (parse_name): Use limit.
1723 * options.c (gfc_init_options): Set max_identifier_length.
1724 (gfc_handle_option): Ditto.
1726 2004-01-11 Feng Wang <fengwang@nudt.edu.cn>
1728 * intrinsic.c (add_functions): Add resolve function to dcmplx.
1729 * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
1730 * iresolve.c (gfc_resolve_dcmplx): New function.
1732 2004-01-10 Paul Brook <paul@codesourcery.com>
1734 * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
1735 * trans-types.c (gfc_sym_type): Handle external dummy procedures.
1736 (gfc_return_by_reference): Correct condition.
1737 (gfc_get_function_type): Ditto.
1739 2004-01-10 Paul Brook <paul@codesourcery.com>
1741 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
1744 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
1746 * iresolve.c: Use correct kind.
1748 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
1751 * trans-decl.c (gfc_create_module_variable): Output array valued
1754 2004-01-10 Paul Brook <paul@codesourcery.com>
1756 * resolve.c (resolve_branch): Get error message right way round.
1758 2004-01-10 Canqun Yang <canqun@nudt.edu.cn>
1760 * trans-array (gfc_conv_loop_setup): Adjust comment to track
1762 (gfc_array_allocate): Don't count size of element twice.
1764 2004-01-04 Paul Brook <paul@codesourcery.com>
1766 * lang.opt (i8, r8, std=*): Remove RejectNegative.
1768 2004-01-04 Paul Brook <paul@codesourcery.com>
1770 * error.c (gfc_notify_std): New function.
1771 * gfortran.h (gfc_notify_std): Declare.
1772 (GFC_STD_*): Define.
1773 (gfc_option_t): Add warn_std and allow_std.
1774 * intrinsic.c (gfc_init_expr_extensions): Fix logic.
1775 (gfc_intrinsic_func_interface): Use gfc_notify_std.
1776 * check.c (check_rest): Use gfc_notify_std.
1777 * match.c (gfc_match_pause): Ditto.
1778 (gfc_match_assign): Ditto.
1779 (gfc_match_goto): Ditto.
1780 * resolve.c (resolve_branch): Ditto.
1781 * lang.opt: Add std=<foo> and w.
1782 * options.c (gfc_init_options): Set allow_std and warn_std.
1783 (gfc_handle_option): Handle OPT_std_* and OPT_w.
1785 2004-01-01 Paul Brook <paul@codesourcery.com>
1787 * array.c (gfc_append_constructor): Take constructor, not expression.
1788 * data.c (struct gfc_expr_stack): Remove.
1789 (expr_stack): Remove.
1790 (find_con_by_offset): Rename from find_expr_in_con.
1791 (find_con_by_component): Rename from find_component_in_con.
1792 (gfc_get_expr_stack): Remove.
1793 (gfc_assign_data_value): Rewrite.
1794 (gfc_expr_push): Remove.
1795 (gfc_expr_pop): Remove.
1796 (gfc_advance_section): Rename from
1797 gfc_modify_index_and_calculate_offset. Handle unbounded sections.
1798 (gfc_get_section_index): Handle unbounded sections.
1799 * gfortran.h: Update prototypes.
1800 * resolve.c (check_data_variable): Array section maight not be the
1803 2004-01-01 Paul Brook <paul@codesourcery.com>
1806 * resolve.c (resolve_symbol): Allow assumed length function results.
1808 2004-01-01 Steve Kargl <sgk@troutmask.apl.washington.edu>
1810 * match.c (gfc_match_pause): Fix spelling.
1812 2004-01-01 Steven Bosscher <stevenb@suse.de>
1815 * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
1816 reference from the expression.
1818 2003-12-26 Feng Wang <fengwang@nudt.edu.cn>
1820 * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
1822 * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
1823 (gfc_exec_op): New EXEC_LABEL_ASSIGN.
1824 (symbol_attribute):New variable attribute: assign.
1825 * io.c (resolve_tag):Integer variable is allowed.
1826 (match_dt_format): Add ASSIGN statement. Set assign flag.
1827 * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
1828 (gfc_match_assign): Add ASSIGN statement. Set assign flag.
1829 (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
1830 * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
1831 (next_statement): Add ST_LABEL_ASSIGNMENT.
1832 (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
1833 * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
1834 (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
1835 * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
1836 * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
1837 assign. Put them into the stuct lang_decl.
1838 * trans-io.c (set_string): Add the assign statement.
1839 * trans-stmt.c (gfc_trans_label_assign): New function.
1840 (gfc_trans_goto): Translate ASSIGNED GOTO statement.
1841 * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
1842 * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
1843 * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
1844 (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
1845 (GFC_DECL_ASSIGN(node)): New macro to access flag.
1847 2003-12-31 Huang Chun <chunhuang73@hotmail.com>
1850 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
1853 2003-12-22 Toon Moene <toon@moene.indiv.nluug.nl>
1855 * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
1856 that arguments to subroutines/functions can't alias themselves, nor global
1859 2003-12-20 Steven Bosscher <stevenb@suse.de>
1861 * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
1862 * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
1864 2003-12-12 Huang Chun <chunhuang73@hotmail.com>
1866 * primary.c (match_substring): Fix substring bug for start point
1867 or end point is NULL.
1868 * trans-expr.c (gfc_conv_substring): Ditto
1869 * trans-types.c (gfc_sym_type): Get correct type of scalar
1870 character variables.
1871 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
1874 2003-12-10 Richard Henderson <rth@redhat.com>
1876 * options.c (gfc_post_options): Don't ever use rtl inlining.
1878 2003-12-05 Canqun Yang <canqun@nudt.edu.cn>
1880 * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
1881 * trans-equivalence.c: Remove.
1882 * trans-decl.c (gfc_get_symbol_decl): Update to match.
1883 (gfc_generate_function_code): Ditto.
1884 * trans-array.c (gfc_conv_array_parameter): Ditto.
1885 * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
1886 (F95_ADDITIONAL_OBJS): Add stor-layout.o
1887 * trans.h (gfc_trans_equivalence): Remove.
1888 * gfortran.h (struct gfc_equiv): Add used field.
1889 (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
1890 equiv_offset fields.
1892 2003-12-05 Richard Henderson <rth@redhat.com>
1894 * trans.c (gfc_build_addr_expr): New.
1895 (gfc_build_indirect_ref, gfc_build_array_ref): New.
1896 * trans.h: Declare them.
1897 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
1898 trans-stmt.c, trans.c (*): Use them.
1900 * f95-lang.c (gfc_post_options): Remove dead prototype.
1901 * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
1902 * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
1905 2003-12-01 Feng Wang <fengwang@nudt.edu.cn>
1907 * io.c (gfc_match_format): Check for missing format label.
1909 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
1912 * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
1913 from interfaces in modules.
1915 2003-11-30 Paul Brook <paul@nowt.org>
1917 * trans-array.c (gfc_trans_g77_array): Make non-static.
1918 (gfc_trans_assumed_size): Remove.
1919 (gfc_trans_dummy_array_bias): Explicitly free temporary.
1920 * trans-array.h (gfc_trans_g77_array): Add prototype.
1921 (gfc_trans_assumed_size): Remove.
1922 * trans-decls.c (gfor_fndecl_push_context): Remove.
1923 (gfor_fndecl_pop_context): Remove.
1924 (gfc_build_function)decls): Don't create them.
1925 (gfc_trans_deferred_vars): Update to match. Remove dead code.
1926 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
1928 2003-11-30 Kejia Zhao <kejia_zh@nudt.edu.cn>
1930 * trans-array.c (gfc_conv_array_parameter): Simplify
1931 array argument passing for array name actual argument.
1932 * trans-expr.c (gfc_conv_function_call): Ditto
1933 * trans-types.c (gfc_is_nodesc_array):Ditto.
1935 2003-11-30 Paul Brook <paul@nowt.org>
1937 * f95-lang.c (gfc_post_options): Move ...
1938 * options.c (gfc_post_options): .. to here. Handle inlining options.
1939 * gfortran.h (gfc_post_options): Add prototype.
1941 2003-11-28 Richard Henderson <rth@redhat.com>
1943 * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
1945 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
1947 * trans.h (has_alternate_specifier): New global variable.
1948 * match.c (gfc_match_call): Handle actual arguments associated with
1949 alternate return indicators.
1950 * trans-expr.c (gfc_conv_function_call): Ditto
1951 * trans-stmt.c (gfc_trans_call): Ditto
1952 (gfc_trans_return): Handle return statement with value.
1953 * trans-decl.c (gfc_generate_function_code): Handle functions with
1955 (gfc_get_fake_result_decl): Ditto
1956 * trans-types.c (gfc_get_function_type): Ditto
1957 * resolve.c (resolve_actual_arglist): Check alternate return indicators.
1958 (resolve_formal_arglist): Check asterisk dummy.
1960 2003-11-27 Paul Brook <paul@nowt.org>
1962 * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
1963 allocation interface.
1964 (gfc_conv_ array_parameter): Ditto.
1965 (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
1966 * trans-array.c: Update prototype.
1967 * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
1968 (gfc_trans_auto_character_variable): Use new memory alloc interface.
1969 * trans-expr.c (gfc_conv_string_tmp): Ditto.
1970 (gfc_conv_function_call): Use gfc_conv_string_tmp.
1971 * trans-stmt.c (gfc_do_allocate): Use new memory alloc interface.
1972 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
1973 * trans.h (gfc_ss_info): Remove unused pdata field.
1974 * trans.c (gfc_create_var_np): Change T to V.
1976 2003-11-26 Richard Henderson <rth@redhat.com>
1978 * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
1979 * trans-intrinsic.c (gfc_intrinsic_map): ... here. Add SCALE,
1980 FRACTION, NEAREST, SET_EXPONENT.
1981 (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
1982 Fix GTY marking. Remove unnecessary const's.
1983 (LIBM_FUNCTION): Rename from I_LIB.
1984 (LIBF_FUNCTION): New.
1985 (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
1986 conventions. Assume the expr signature is correct. Mark const.
1987 (gfc_conv_intrinsic_exponent): Use library functions.
1988 (gfc_conv_intrinsic_set_exponent): Remove.
1989 (gfc_conv_intrinsic_scale): Remove.
1990 (gfc_conv_intrinsic_nearest): Remove.
1991 (gfc_conv_intrinsic_fraction): Remove.
1992 (gfc_conv_intrinsic_function): Update.
1993 * trans-decl.c (gfor_fndecl_math_exponent4): New.
1994 (gfor_fndecl_math_exponent8): New.
1995 (gfc_build_intrinsic_function_decls): Set them.
1996 * trans.h: Declare them.
1998 2003-11-25 Canqun Yang <canqun@nudt.edu.cn>
2000 * trans-common.c (gfc_layout_global_equiv): Locate the error for
2001 underflow COMMON block.
2002 (gfc_trans_one_common): Fix bug for size of COMMON block containing
2003 EQUIVALENCE object. Also fix typo in an error message.
2005 2003-11-25 Diego Novillo <dnovillo@redhat.com>
2007 * Make-lang.in: Add check-gfortran to lang_checks.
2008 (check-f95): Alias for check-gfortran.
2010 2003-11-25 Jason Merrill <jason@redhat.com>
2012 * Make-lang.in (f95.tags): Create TAGS.sub files in each
2013 directory and TAGS files that include them for each front end.
2015 2003-11-24 Paul Brook <paul@nowt.org>
2018 * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
2020 2003-11-24 Paul Brook <paul@nowt.org>
2022 * expr.c (simplify_const_ref): Return SUCCESS for things we don't
2024 * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
2026 2003-11-24 Paul Brook <paul@nowt.org>
2029 * array.c (gfc_array_ref_shape): Handle elemental dimensions.
2030 * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
2032 2003-11-20 Richard Henderson <rth@redhat.com>
2034 * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
2035 (gfc_conv_array_base): Likewise.
2036 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
2037 * trans-expr.c (gfc_conv_string_tmp): Likewise.
2038 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
2039 * trans-stmt.c (gfc_trans_character_select): Likewise.
2041 2003-11-13 Paul Brook <paul@nowt.org>
2043 * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
2045 2003-11-13 Canqun Yang <canqun@nudt.edu.cn>
2047 * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
2048 (resolve_equivalence): New function.
2049 (resolve_equivalence_derived): New function.
2051 2003-11-12 Richard Henderson <rth@redhat.com>
2053 * trans.c (gfc_trans_code): Use annotate_with_locus instead of
2054 annotate_all_with_locus.
2056 2003-11-11 Canqun Yang <canqun@nudt.edu.cn>
2058 * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
2059 * trans-decl.c (gfc_finish_var_decl): Modified.
2061 2003-11-08 Paul Brook <paul@nowt.org>
2064 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
2067 2003-11-06 Paul Brook <paul@nowt.org>
2069 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
2071 2003-11-02 Canqun Yang <canqun@nudt.edu.cn>
2073 * match.c (gfc_match_stopcode): Assign '0' to stop_code.
2075 2003-10-27 Anthony Green <green@redhat.com>
2077 * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
2078 (f95.stagefeedback): Ditto.
2080 2003-10-27 Andrew Pinski <pinskia@physics.uc.edu>
2083 * Make-lang.in (f95.stageprofile): Add.
2084 (f95.stagefeedback): Add.
2086 2003-10-23 Richard Henderson <rth@redhat.com>
2088 * f96-lang.c (gfc_gimplify_expr): Remove.
2089 (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
2090 (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
2092 2003-10-23 Richard Henderson <rth@redhat.com>
2094 * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
2096 2003-10-20 Paul Brook <paul@nowt.org>
2098 * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
2099 * trans-stmt.c (gfc_trans_do_while): Ditto.
2101 2003-10-17 Paul Brook <paul@nowt.org>
2103 * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
2105 2003-10-17 Paul Brook <paul@nowt.org>
2107 * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
2109 2003-10-17 Feng Wang <wf_cs@yahoo.com>
2111 * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
2112 (gfc_resolve_minloc): Ditto.
2113 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
2114 Return the value after subtracting the lower bound.
2116 2003-10-16 Richard Henderson <rth@redhat.com>
2118 * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
2120 2003-10-16 Steven Bosscher <steven@gcc.gnu.org>
2122 * lang.c: Remove -M option for now, it's in the way for C.
2124 2003-10-14 Jason Merrill <jason@redhat.com>
2126 * Make-lang.in (f95.tags): New rule.
2128 2003-10-13 Richard Henderson <rth@redhat.com>
2130 * trans.c (gfc_trans_code): Use annotate_all_with_locus.
2132 2003-10-13 Paul Brook <paul@nowt.org>
2134 * trans-decl.c (generate_local_decl): Don't create junk variables.
2136 2003-10-13 Paul Brook <paul@nowt.org>
2138 * resolve.c (resolve_formal_arglist): Use function result decl in
2139 preference to function decl.
2141 2003-10-12 Richard Henderson <rth@redhat.com>
2143 * f95-lang.c (gfc_define_builtin): New const_p argument. Set
2144 TREE_READONLY. Update all callers.
2146 2003-10-12 Feng Wang <wf_cs@yahoo.com>
2148 * iresolve.c (gfc_resolve_cshift): Change to match implementation.
2149 * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
2150 (gfc_is_intrinsic_libcall): Add CSHIFT.
2152 2003-10-12 Richard Henderson <rth@redhat.com>
2154 * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
2155 (gfc_trans_array_constructor_value): Likewise.
2156 (gfc_conv_array_initializer): Likewise.
2157 * trans-stmt.c (gfc_trans_character_select): Likewise.
2159 2003-11-12 Kejia Zhao <kejia_zh@yahoo.com.cn>
2161 * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
2163 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
2165 * check.c (gfc_check_repeat): Check arguments are scalar.
2166 (gfc_check_trim): New function.
2167 * intrinsic.h (gfc_check_trim): Add prototype.
2168 * intrinsic.c (add_functions): Use it.
2169 * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
2171 * trans-decl.c: Ditto.
2172 (gfc_build_intrinsic_fucntion_decls): Set them.
2173 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
2174 (gfc_conv_intrinsic_trim): New function.
2175 (gfc_conv_intrinsic_repeat): New function.
2176 (gfc_conv_intrinsic_function): Use them.
2178 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
2180 * trans-types.c (gfc_sym_type): Handle result variables.
2182 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
2184 * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
2185 gfc_get_character_type.
2187 2003-10-11 Feng Wang <wf_cs@yahoo.com>
2189 * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
2191 2003-10-11 Paul Brook <paul@nowt.org>
2193 * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
2194 (gfc_resolve_dprod): New function.
2195 (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
2196 * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
2197 (gfc_resolve_dprod): Declare.
2198 * intrinsic.c (add_functions): Use them.
2199 * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
2201 2003-10-06 Richard Henderson <rth@redhat.com>
2203 * f95-lang.c (gfc_init_builtin_functions): Add clzll.
2204 * trans-intrinsic.c (call_builtin_clz): Use it.
2206 2003-10-05 Paul Brook <paul@nowt.org>
2208 * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
2209 * trans-decl.c (gfc_generate_function_code): Set
2210 cfun->function_end_locus.
2212 2003-09-24 Jason Merrill <jason@redhat.com>
2214 * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
2217 2003-09-21 Lifang Zeng <zlf605@hotmail.com>
2218 Paul Brook <paul@nowt.org>
2220 * Make-lang.in (F95_OBJS): Add fortran/data.o.
2221 * array.c (gfc_inser_constructor): New function.
2222 (gfc_get_constructor): New function.
2223 (gfc_free_constructor): Initialize offset and repeat.
2224 (iterator_stack): Remove.
2225 (expand_info): Add offset, component and repeat fields.
2226 (expand_constructor): Set them.
2227 (expand): Set new fields.
2228 (gfc_copy_constructor): Ditto. Avoid recursion.
2229 * gfortran.h: Add prototypes for new functions.
2230 (gfc_constructor): Add offset, component and repeat.
2231 (iteratio_stack): Move to here.
2232 * resolve.c (check_data_variable): Convert data values into variable
2234 (traverse_data_list): Build implicit loop chain.
2235 (gfc_resolve): Ditto.
2236 * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
2237 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
2238 * trans-expr.c (gfc_conv_structure): Handle array initializers.
2239 (gfc_conv_expr): Update to match.
2240 * trans.h (gfc_conv_structure): Declare.
2243 2003-09-20 Kejia Zhao <kejia_zh@yahoo.com.cn>
2245 * trans.h: Add declarations for gfor_fndecl_si_kind and
2246 gfor_fndecl_sr_kind.
2247 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
2248 * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
2249 (g95_conv_intrinsic_sr_kind): New function.
2250 (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
2253 2003-09-17 Lars Segerlund <Lars.Segerlund@comsys.se>
2255 * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
2256 instead of _4 and _8 as postfix for libgfortran calls.
2258 2003-09-16 Paul Brook <paul@nowt.org>
2260 * array.c (compare_bounds): New function.
2261 (gfc_compare_array_spec): Use it.
2263 2003-09-14 Paul Brook <paul@nowt.org>
2265 * primary.c (gfc_match_rvalue): Make sure sym->result is set.
2266 * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
2268 2003-09-14 Paul Brook <paul@nowt.org>
2270 * check.c (dim_rank_check): Allow assumed bounds if requested.
2271 (gfc_check_lbound): Call it.
2272 (gfc_check_ubound): Ditto.
2273 (gfc_check_size): Change to match.
2274 * simplify.c (gfc_simplify_bound): New function.
2275 (gfc_simplify_lbound): New function.
2276 (gfc_simplify_ubound): New function.
2277 * intrinsic.h: Declare them.
2278 * intrinsic.c (add_functions): Use them.
2280 2003-09-14 Paul Brook <paul@nowt.org>
2282 * io.c (format_lex): Initialize negative_flag.
2283 (check_format): Intialize repeat.
2284 * trans-io.c (gfc_new_nml_name_expr): Declare static.
2285 (gfc_new_var_expr): Ditto.
2287 2003-09-14 Paul Brook <paul@nowt.org>
2289 * trans-array.c (gfc_conv_array_initializer): Handle derived types.
2290 * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
2292 2003-09-12 Paul Brook <paul@nowt.org>
2294 * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
2296 2003-09-12 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
2298 * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
2299 for a correct expression.
2301 2003-09-10 Kejia Zhao <kejia_zh@yahoo.com.cn>
2303 * trans-intrinsic.c (real_compnt_info): New struct.
2304 (prepare_arg_info): New function.
2305 (gfc_conv_intrinsic_set_exponent): New function.
2306 (gfc_conv_intrinsic_scale): New function.
2307 (gfc_conv_intrinsic_nearest): New function.
2308 (gfc_conv_intrinsic_fraction): New function.
2309 (gfc_conv_intrinsic_exponent): New function.
2310 (gfc_conv_intrinsic_spacing): New function.
2311 (gfc_conv_intrinsic_rrspacing): New function.
2312 (gfc_conv_intrinsic_function): Use them.
2314 2003-08-24 XiaoQiang Zhang (zhangapache@yahoo.com>
2316 * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
2317 build_int_2 changed from (high, low) to (low, high).
2318 * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
2319 ioparm_namelist_read_mode, iocall_set_nml_val_int,
2320 iocall_set_nml_val_float, iocall_set_nml_val_char,
2321 iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
2322 (gfc_build_io_library_fndecls): Add variable initialization.
2323 (gfc_new_nml_name_expr, get_new_var_expr): New function.
2324 (build_dt): Add namelist support.
2325 * io.c (value): New variable.
2326 (check_format): Support FMT_H now.
2328 2003-09-07 Paul Brook <paul@nowt.org>
2330 * io.c (gfc_resolve_dt): Error if format label is not defined.
2332 2003-09-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
2334 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
2335 about case_switch's break. The other is about building the condition
2336 statement tree, which judges the argument in the range of the
2337 corresponding integer type.
2338 * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
2339 for the large values.
2341 2003-09-05 Paul Brook <paul@nowt.org>
2343 * f95-lang.c (expand_function_body): Gimplify the function.
2345 2003-09-04 Jeff Law <law@redhat.com>
2347 * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
2350 2003-09-04 Paul Brook <paul@nowt.org>
2352 * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
2353 (gfc_expand_stmt): New function.
2354 (LANG_HOOKS_RTL_EXPAND_STMT): Define.
2355 (expand_function_body): Use tree_rest_of_compilation.
2356 * trans-decl.c (gfc_generate_function_code): Don't free cfun.
2358 2003-09-03 Jeff Law <law@redhat.com>
2360 * f95-lang.c (gfc_init_builtin_functions): C arrays start at
2363 2003-08-30 Paul Brook <paul@nowt.org>
2365 * f95-lang.c (builtin_function): Remove #if 0 code.
2366 (gfc_define_builtin): New function.
2367 (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
2368 * mathbuiltins.def: New file.
2369 * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
2370 (gfc_intrinsic_map): Use mathbuiltins.def.
2371 (gfc_intrinsic_builtin_t): Remove.
2372 (gfc_build_intrinsic_lib_fndecls): Update.
2373 * trans-types.c (gfc_init_types): Remove redundant initilaization of
2374 signed_size_type_node.
2376 2003-08-29 Paul Brook <paul@nowt.org>
2378 * arith.c (gfc_real_kinds): Use correct minimum exponents.
2380 2003-08-22 Kejia Zhao <kejia_zh@yahoo.com.cn>
2382 * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
2383 (gfc_conv_intrinsic_function): Add MODULO.
2385 2003-08-22 Jason Merrill <jason@redhat.com>
2387 * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
2389 2003-08-22 Andreas Jaeger <aj@suse.de>
2391 * Make-lang.in (f95.install-common): Add DESTDIR support.
2392 * (f95.install-info): Likewise.
2393 (f95.uninstall): Likewise.
2395 2003-08-19 Diego Novillo <dnovillo@redhat.com>
2397 * trans-types.c (gfc_init_types): Initialize
2398 signed_size_type_node with size_type_node.
2400 2003-08-18 Paul Brook <paul@nowt.org>
2402 * dependency.c (gfc_dependency): New enum.
2403 (check_another_array_ref): Remove.
2404 (gfc_get_array_from_component): Remove.
2406 (get_range): Remove.
2407 (get_no_of_elements): Use mpz_t, not mpf_t.
2408 (transform_sections): New function.
2409 (gfc_check_range_range): Rename ...
2410 (gfc_check_section_vs_section): ... to this. Use new function.
2411 (gfc_is_inside_range): Rewrite to match.
2412 (gfc_check_element_vs_section): Ditto.
2413 (gfc_check_element_vs_element): Ditto.
2415 (gfc_dep_resolver): Ditto. Remove unused parameter.
2416 * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
2417 gfc_check_element_vs_element, gfc_is_inside_range,
2418 gfc_get_array_from_component): Remove prototypes for static functions.
2419 (gfc_dep_resolver): Update prototype.
2420 * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
2422 2003-08-15 Paul Brook <paul@nowt.org>
2424 * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
2425 return values to parent scope.
2426 (gfc_build_dummy_array_decl): Ditto.
2428 2003-08-14 Paul Brook <paul@nowt.org>
2430 * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
2431 size of the type, not the pointer.
2432 * resolve.c (resolve_symbol): Give more accurate error message.
2434 2003-08-10 Paul Brook <paul@nowt.org>
2436 * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
2438 2003-08-10 Paul Brook <paul@nowt.org>
2440 * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
2443 2003-08-10 Chun Huang <compiler@sohu.com>
2445 * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
2446 (resolve_symbol): Ditto.
2447 * trans-expr.c (gfc_conv_statement_function): New function.
2448 (gfc_conv_function_expr): Use it.
2450 2003-08-10 Paul Brook <paul@nowt.org>
2452 * trans-array.c (gfc_conv_ss_startstride): Handle functions.
2453 (walk_function_expr): Set section rank.
2454 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
2456 2003-08-10 Paul Brook <paul@nowt.org>
2458 * intrinsic.c (add_sym): Prefix names with correct string.
2459 (add_sym_0s): New function.
2460 (add_subroutines): Register abort.
2462 2003-08-10 Erik Schnetter <schnetter@uni-tuebingen.de>
2464 * gfortran.h: Introduce options to control the mangling.
2465 * lang.opt: Likewise.
2466 * options.c (gfc_init_options): Handle the options.
2467 * trans-common.c (gfc_sym_mangled_common_id): New function.
2468 (gfc_build_common_decl): Call it.
2469 * trans-decl.c (gfc_sym_mangled_function_id): New function.
2470 (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
2472 2003-08-09 Paul Brook <paul@nowt.org>
2474 * module.c (mio_symbol): Always ouput a namespace for formal args.
2475 (load_needed): Namespace now belong to their proper symbol.
2476 (gfc_dump_module): Change G95=>GFORTRAN.
2478 2003-08-05 Paul Brook <paul@nowt.org>
2480 * options.c: Force -fg77-calls.
2482 2003-08-02 Paul Brook <paul@nowt.org>
2484 * Makelang.in: Rename G95_* to GFORTRAN_*.
2485 * All sources: Rename G95_* to GFC_*.
2487 2003-08-01 Paul Brook <paul@nowt.org>
2489 * fortran/Make-lang.in: Use GMPLIBS.
2490 * fortran/config-lang.in: Set need_gmp.
2491 * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
2493 2003-07-27 Andreas Jaeger <aj@suse.de>
2495 * trans-decl.c (gfc_generate_constructors): Convert prototype to
2497 * trans-const.c (gfc_init_constants): Likewise.
2498 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
2500 * gfortranspec.c: Convert to ISO C90.
2501 (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
2503 2003-07-26 Paul Brook <paul@nowt.org>
2505 * lang.opt: Add -fdump-parse-tree.
2506 * options.c (gfc_handle_option): Ditto.
2507 * resolve.c (resolve_forall_iterators): Convert to proper type.
2508 * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
2510 2003-07-26 Paul Brook <paul@nowt.org>
2512 * Makefile.in: Add build dependencies on files common with rest of gcc.
2514 2003-07-26 Lifang Zeng <zlf605@hotmail.com>
2516 * trans.h: Declare g95_trans_pointer_assignment.
2517 * trans-expr.c (g95_trans_pointer_assignment): New function.
2518 (g95_trans_pointer_assign): Use it.
2519 * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
2520 (g95_trans_pointer_assign_need_temp): New function.
2522 2003-07-26 Paul Brook <paul@nowt.org>
2524 * gfortran.texi: Replace references to g95.
2526 2003-07-26 Paul Brook <paul@nowt.org>
2528 Rename g95_* to gfc_*.
2530 2003-07-25 Paul Brook <paul@nowt.org>
2532 * gfortran.h: Rename from g95.h.
2533 * trans-types.c (boolean_type_node, booelan_true_node,
2534 boolean_false_node): Remove.
2535 * trans-types.h: Ditto.
2537 2003-07-25 Chun Huang <compiler@sohu.com>
2539 * parse.c (accept_statement): Implement BLOCK DATA statement.
2540 * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
2543 2003-07-24 Lifang Zeng <zlf605@hotmail.com>
2545 * trans-stmt.c (temporary_list): Define.
2546 (g95_trans_assign_need_temp): New function.
2547 (g95_trans_forall_1): Modified for WHERE.
2548 (g95_trans_where_assign): Modified.
2549 (g95_trans_where_2): Modified.
2550 (g95_evaluate_where_mask): Modified.
2551 (g95_trans_where): Modified.
2552 (g95_get_temp_expr): Removed.
2553 (g95_add_to_where_stmt_list): Removed.
2554 (compute_overall_iter_number): Modified for WHERE.
2555 * trans.h: Remove where_stmt_list.
2557 2003-07-24 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2559 * lang.opt: Correct description of options -J and -M.
2561 2003-07-23 Steven Bosscher <steven@gcc.gnu.org>
2563 * lang.opt: Move help text to here.
2564 * lang-options.h: Remove.
2566 2003-07-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2567 * iresolve.c (g95_resolve_transpose): Proper variable in switch.
2568 * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
2571 2003-07-22 Steven Bosscher <steven@gcc.gnu.org>
2572 Paul Brook <paul@nowt.org>
2574 * check.c (check_rest): Use global pedantic flag.
2575 * io.c (data_desc): Ditto.
2576 * error.c (g95_warning, g95_warning_now): Use global flag.
2577 * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
2578 (expand_function_body): Update to new prototypes.
2579 (g95_init): Use new option names.
2580 * g95.h (g95_option_t): Standardize names.
2581 (g95_init_options, g95_handle_option): Update prototypes.
2582 * interface.c: Use new option names.
2589 * simplify.c: Ditto.
2591 * trans-array.c: Ditto.
2592 * trans-expr.c: Ditto.
2593 * trans-types.c: Ditto.
2594 * trans-decl.c: Ditto.
2595 (g95_build_library_function_decl): Remove obsolete VPARAMS.
2597 * options.c (g95_display_help): Remove.
2598 (g95_init_options): Convert to new scheme.
2600 (g95module_option): Ditto, rename from g95_parse_arg.
2601 (g95_handle_module_path_options): New function.
2602 * trans-equivalence.c: Fix error message.
2603 * lang.opt: Corrections.
2605 2003-07-21 Steven Bosscher <steven@gcc.gnu.org>
2607 * lang.opt: New file.
2609 2003-07-21 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2611 * decl.c (match_attr_spec): Set colon_seen.
2613 2003-07-14 Paul Brook <paul@nowt.org>
2615 * trans-array.c: Update comment.
2616 (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
2617 * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
2618 minmaxloc,minmaxval): Ditto.
2619 * trans-io.c (g95_trans_transfer): Ditto.
2620 * trans-stmt.c: Remove unneeded prototypes.
2621 (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
2622 (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
2623 (compute_inner_temp_size): Remove bits of dead code. Add comments.
2624 Don't share loopinfo.
2625 (compute_overall_iter_number): Declare as static.
2626 (allocate_temp_for_forall_nest): Ditto.
2627 (g95_trans_forall_1): Don't pass shared loopinfo.
2628 * trans.c (g95_start_block): Expand comment.
2630 2003-07-12 Paul Brook <paul@nowt.org>
2632 * arith.c (g95_index_integer_kind): Remove unused initializer.
2633 * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
2634 index by size of element.
2635 (generate_loop_for_rhs_to_temp): Ditto.
2636 (allocate_temp_for_forall_nest): Use element size, not index size.
2638 2003-07-11 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2640 * arith.c (g95_index_integer_kind): Add a TODO.
2641 * simplify.c (g95_simplify_nearest): Add a TODO.
2643 2003-07-09 Chun Huang <compiler@sohu.com>
2645 * trans.h: Add declarations for gfor_fndecl_string_scan and
2646 gfor_fndecl_string_verify.
2647 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
2648 * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
2649 (g95_conv_intrinsic_verify): New function.
2650 (g95_conv_intrinsic_function): Add SCAN and VERIFY.
2651 * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
2652 of parameter 'BACK=.TRUE.'
2654 2003-07-05 Lifang Zeng <zlf605@hotmail.com>
2656 * trans-stmt.c (iter_info, forall_info): Define.
2657 (g95_trans_forall_block): Remove.
2658 (g95_trans_forall_loop): Use forall info blocks.
2659 (g95_trans_nested_forall_loop): New function.
2660 (g95_do_allocate): Handle things other than logical masks.
2661 (generate_loop_for_temp_to_lhs): New function.
2662 (generate_loop_for_rsh_to_temp): New function.
2663 (compute_inner_temp_size): New function.
2664 (compute_overall_iter_number): New function.
2665 (allocate_temp_for_forall_nest): New function.
2666 (g95_trans_forall): Move body ...
2667 (g95_trans_forall_1): ... to here. Handle loops with temporaries.
2669 2003-07-02 Paul Brook <paul@nowt.org>
2671 * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
2672 in correct scope. Change callers to match.
2673 * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
2674 * iresolve.c (g95_resolve_reshape): Only use constant shapes.
2676 2003-07-02 Paul Brook <paul@nowt.org>
2678 * trans-array.c (g95_conv_loop_setup): Remove dead var. Use
2679 expression shape for all expressions.
2680 * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
2682 2003-07-03 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2684 * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
2685 g95_parse_arg), intrinsic.c (g95_convert_type): support of
2687 * intrinsic.c, g95.h: Add g95_convert_type_warn,
2688 * resolve.c (g95_resolve_index): Call it.
2690 2003-07-02 Paul Brook <paul@nowt.org>
2692 * iresolve.c (g95_resolve_reshape): Set expression shape.
2693 (g95_resolve_shape): Ditto.
2694 * simplify.c (g95_simplify_shape): Move common code outside condition.
2695 * trans-array.c (g95_conv_array_initializer): Teach it how to count.
2697 2003-07-01 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2699 * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
2702 2003-06-29 Paul Brook <paul@nowt.org>
2704 * array.c (g95_simplify_iterator_var): Don't bother with return value.
2705 * expr.c (find_array_element, find_component_ref): New functions.
2706 (remove_subobject_ref): New function.
2707 (simplify_const_ref): Use them. Rename from simplify_component_ref.
2708 (simplify_ref_chain): New function.
2709 (g95_simplify_expr): Use it. Simplify parameter variable subobjects.
2710 (g95_specification_expr): Simplify the expression.
2711 * resolve.c (resolve_operator): Check simplifications return code.
2712 (g95_resolve_expr): Ditto.
2714 2003-06-26 Paul Brook <paul@nowt.org>
2716 * expr.c (simplify_component_ref): New function.
2717 (g95_simplify_expr): Use it.
2718 * resolve.c (resolve_structure_cons): Handle references.
2720 2003-06-25 Paul Brook <paul@nowt.org>
2722 * trans-io.c (build_dt): Handle internal units.
2724 2003-06-25 Canqun Yang <canqun@yahoo.com.cn>
2726 * trans-common.c (g95_build_common_decl): Array index range starts at 0.
2727 (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
2728 Use g95_array_index_type instead of integer_type_node.
2729 (g95_build_common_decl, g95_set_common_master_type): Use
2730 g95_character1_type_node instead of char_type_node.
2731 * trans-equivalence.c (g95_layout_local_equiv): As above.
2733 2003-06-24 Steven G. Kargl <kargls@attbi.com>
2735 * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
2736 remove last remains of -fquiet.
2738 2003-06-22 Paul Brook <paul@nowt.org>
2740 * resolve.c (resolve_operator): Don't fail if we can't simplify.
2741 (g95_resolve_expr): Ditto.
2742 (resolce_code): Mark as static.
2743 * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
2744 gimplifer doesn't (yet).
2746 2003-06-20 Paul Brook <paul@nowt.org>
2748 * g95.h: Add ST_PAUSE and EXEC_PAUSE.
2749 * match.c (g95_match_if): Add ST_PAUSE.
2750 (g95_match_stopcode): New function.
2751 (g95_match_pause, g95_match_stop): Use it.
2752 * parse.c (g95_ascii_statement): Handle ST_PAUSE.
2753 (decode_stmt, next_statement, parse_executable): Ditto.
2754 * resolve.c (resolve_code): Ditto.
2755 * st.c (g95_free_statement): Ditto.
2756 * trans-stmt.c (g95_trans_pause): New function.
2757 * trans-stmt.h: Declare it.
2758 * trans.c (g95_trans_code): Use it.
2759 * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
2761 (g95_build_builtin_function_decls): Initialize them.
2763 * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
2765 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2767 * io.c (g95_match_open , g95_match_close, g95_match_inquire,
2768 match_filepos): Fix error handling.
2770 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2772 * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
2773 Add assertions on arguments.
2774 * resolve.c (expression_shape): Remove useless &.
2775 * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
2776 g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
2777 g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
2778 g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
2779 g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
2780 g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
2781 (g95_simplify_not, g95_simplify_scale): Add assertions.
2783 2003-06-15 Paul Brook <paul@nowt.org>
2785 Clean up stuff to work with the ssa optimizers.
2786 * convert.c (convert): Handle BOOLEAN_TYPEs.
2787 * f95-lang.c (g95_truthvalue_conversion): Implement.
2788 * trans-array.c (g95_trans_array_constructor_value): Group multiple
2790 * trans.h (g95_truthvalue_conversion): Declare.
2791 * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
2792 * trans-stmt.c (g95_trans_character_select): Don't create array
2793 assignments. Mark labels as indirect jump targets.
2794 * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
2795 (g95_get_dtype_cst): Handle LOGICAL types.
2797 2003-06-14 Paul Brook <paul@nowt.org>
2799 * f95-lang.c (g95_gimplify_expr): New function.
2800 * trans-array.c (g95_trans_array_constructor_value): Don't create
2802 (g95_conv_expr_descriptor): Rename simple->gimple.
2803 * trans-expr.c (conv_expr_op): Use proper logical operators.
2804 * trans-intrinsic.c (build_fixbound_expr): New function.
2805 (build_fix_expr): Ditto.
2806 (g95_conv_intinsic_aint): Use them. Use builtin functions.
2807 (g95_conv_intrinsic_function): Add FLOOR and CEILING.
2809 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2811 * array.c (g95_compare_array_spec): Remove unreachable code.
2812 * expr.c (g95_copy_expr): Likewise.
2813 * intrinsic.c (g95_convert_type): Likewise.
2814 * misc.c (g95_code2string): Likewise.
2815 * simplify.c (g95_simplify_ishft, g95_simplify_real,
2816 g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
2817 * trans-stmt.c (g95_trans_select): Likewise.
2818 * primary.c (extend_ref): Add an assertion.
2819 * simplify.c (g95_convert_constant): Add const.
2820 * intrinsic.h: Remove g95_check_x_ni.
2821 * f95-lang.c (g95_finish): Call g95_release_include_path.
2823 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2825 * resolve.c (resolve_contained_functions): Fix typo introduced on
2828 2003-06-09 Paul Brook <paul@nowt.org>
2830 * g95.h: Include system.h not hwint.h.
2831 * many: use safe-ctype.h not ctype.h. Change isalpha -> ISALPHA, etc.
2832 * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
2834 2003-06-09 Paul Brook <paul@nowt.org>
2836 * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
2837 * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
2838 * trans-decl.c (g95_add_decl_to_functions): Make non-static.
2839 (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
2840 (g95_generate_function_code): Translate COMMON and EQUIVALENCE
2842 * trans.h (g95_trans_equivalence, g95_trans_common,
2843 g95_add_decl_to_function): Declare.
2844 * trans-common.c, trans-equivalence.c: New files.
2846 2003-06-08 Steven Bosscher <steven@gcc.gnu.org>
2848 * intrinsic.c (g95_intrinsic_extension): Remove.
2849 (add_functions): Substitute g95_check_x for g95_check_x_ni
2851 (g95_init_expr_extensions): New function.
2852 (g95_intrinsic_func_interface): Use it.
2853 * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
2854 * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
2855 g95_check_precision, g95_check_present, g95_check_radix,
2856 g95_check_range, g95_check_selected_real_kind): Do not set
2857 g95_intrinsic_extension.
2858 (g95_check_x_ni): Remove now duplicate of g95_check_x.
2860 * expr.c (check_inquiry): Add FIXME, fixup some code style.
2862 2003-06-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2864 * g95.h (ref_type): Name this type explicitly.
2865 * module.c (MIO_NAME): Add specialisations of mio_name.
2866 (mio_symbol_attribute, mio_typespec, mio_array_ref,
2867 mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
2868 (ab_attribute): Name this type explicitly.
2869 (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
2871 2003-06-05 Kejia Zhao <kejia_zh@yahoo.com.cn>
2873 * trans-intrinsic.c (g95_conv_allocated): New function.
2874 (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
2876 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
2878 * f95-lang.c: Don't include g95-support.h
2879 (g95_mark_addressable): Add prototype.
2880 (g95_init_decl_processing): Remove C front end hack.
2881 * f95-tree.c: Remove file.
2882 * support.c: Remove file.
2883 * g95-support.h: Remove file.
2884 * trans-types.c (g95_init_types): Set up boolean
2885 type related tree nodes.
2886 * Make-lang.in: Remove rules for dead files and
2887 dependencies on them.
2889 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
2891 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
2892 C front end dependency. Also, convert.c does not depend on
2893 g95-support.h anymore.
2894 * convert.c: Don't include c-common.h and g95-support.h
2895 * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
2896 (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
2897 stmts_are_full_exprs_p, current_stmt_tree,
2898 current_scope_stmt_stack): Remove.
2899 * g95-support.h (unsigned_conversion_warning): Kill proto.
2900 (boolean_type_node, boolean_true_node, boolean_false_node):
2901 Don't define here. Instead, make then true tree nodes in
2903 * support.c (c_global_trees): Die, C front end, die!!!
2904 (g95_init_c_decl_hacks): Don't touch intmax_type_node,
2905 uintmax_type_node, string_type_node and const_string_type_node.
2906 (decl_constant_value, overflow_warning): Make static functions.
2907 They are in death row too, though.
2908 (default_conversion, c_expand_asm_operands): Remove.
2909 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
2910 trans.c: Don't include c-common.h.
2911 * trans-types.c (boolean_type_node, boolean_true_node,
2912 boolean_false_node): Make them real tree nodes.
2913 * trans-types.h (intmax_type_node, string_type_node,
2914 const_string_type_node): Hack to work around C dependencies
2915 in builtin-types.def.
2917 2003-06-04 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2919 * decl.c (decl_types): Add some iterators-like sentinels.
2920 * decl.c (match_attr_spec): Use them.
2921 Use "decl_types" instead of "int".
2922 Add cast in call to g95_match_strings.
2923 * dump-parse-tree.c (g95_show_namespace): Use "g95_intrinsic_op"
2925 * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
2926 (g95_interface_info): Use "g95_intrinsic_op".
2927 * dump-parse-tree.c (g95_show_namespace): Use them.
2928 * interface.c (g95_check_interfaces): Use them.
2929 * module.c (read_module, write_module): Use them.
2930 * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
2931 Use "g95_intrinsic_op".
2932 * interface.c (check_operator_interface): Use "g95_intrinsic_op".
2933 Add a default case in switch statement.
2934 * intrinsic.h (g95_generic_isym_id): Moved to...
2935 * g95.h (g95_generic_isym_id): here.
2936 (g95_intrinsic_sym): Use "g95_generic_isym_id".
2937 * intrinsic.c (make_generic): Use "g95_generice_isym_id".
2938 * trans-intrinsic.c (g95_intrinsic_map_t,
2939 g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
2940 * match.c (g95_match_intrinsic_op): Add cast in call to
2943 2003-06-03 Steven Bosscher <steven@gcc.gnu.org>
2945 * support.c (skip_evaluation, warn_conversion, lvalue_p,
2946 lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
2947 constant_fits_type_p, convert_and_check,
2948 unsigned_conversion_warning): Remove these ugly remnants
2949 we inherited from the C front end.
2950 (function_types_compatible): Remove '#if 0'-edcode.
2951 (build_modify_expr): Likewise.
2952 (convert_for_assignment): Don't use the deceased functions.
2953 The parameter fundecl is now unused.
2954 (decl_constant_value): Always just return decl. In fact
2955 this function is not used at present, but it might be in
2956 the future, when we start using the tree inliner.
2957 (overflow_warning, default_conversion, c_expand_asm_operands):
2958 Abort when these are called, they are part of the C type
2959 checking implementation and therefore poison to Fortran.
2961 2003-06-04 Steven Bosscher <steven@gcc.gnu.org>
2963 * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
2964 c-pretty-print.o and c-dump.o. Add a comment on why we
2965 depend on c-semantics.c.
2966 * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
2967 Don't use the C front end tree dumper hook to dump the
2968 language specific tree representation -- we don't have
2969 one. So instead, inherit the default langhook.
2971 2003-06-02 Paul Brook <paul@nowt.org>
2973 * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
2975 2003-06-02 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2977 * check.c (g95_check_associated): Use proper types. Remove
2978 extraneous argument in call to g95_error().
2980 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
2982 * resolve.c (resolve_operator): Make logical operands convert to the
2983 type with higher kind.
2985 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
2987 * check.c (g95_check_associated): Make sure both pointer and target has
2988 the same type and rank. Null pointer or array section with vector
2989 subscript as target are not allowed.
2990 * trans.h: Declare gfor_fndecl_associated.
2991 * trans-decl.c: (g95_build_builtin_function_decls): Initialize
2992 gfor_fndecl_associated.
2993 * trans-intrinsic.c (g95_conv_associated): New function.
2994 (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
2996 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
2998 * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
2999 according to POINTER itself rather than TARGET.
3000 (g95_conv_expr_descriptor): Make lbound start at 1.
3001 * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
3003 2003-06-01 Paul Brook <paul@nowt.org>
3005 * expr.c (g95_type_convert_binary): Make it match the standard.
3006 * g95.texi: Remove dead link.
3008 2003-06-01 Steven Bosscher <steven@gcc.gnu.org>
3010 * g95.texi: Cleanup somewhat in preparation for inclusion
3013 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3014 Canqun Yang <canqun@yahoo.com.cn>
3016 * resolve.c (compare_bound_int, resolve_where_shape): Proper return
3018 (g95_find_forall_index): Return proper value.
3019 (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
3020 compare the return value from g95_find_forall_index.
3022 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3023 * g95.h, io.c (g95_st_label): Remove "length".
3024 (g95_symtree): Remove "link".
3025 (g95_case): Remove "code".
3026 * arith.c, arith.h (g95_compare_string, g95_convert_integer,
3027 g95_convert_real): Make an argument pointer to const.
3028 * decl.c (colon_seen): Add a TODO.
3029 * interface.c (g95_compare_types): Fix typo.
3030 * interface.c (compare_interfaces): Preserve value of "p".
3031 * intrinsic.c (sort_actual): Remove "i".
3032 * match.c (g95_match_assign): Proper type in call to g95_match().
3033 * parse.c (next_free): Avoid duplicate call due to macro.
3034 * parse.c (check_statement_label): wrong type in call to g95_error.
3035 * primary.c (match_real_constant): Add a TODO.
3036 * resolve.c (resolve_select): Remove useless conditional.
3037 * simplify.c (g95_simplify_repeat): Proper assignment to
3038 "value.character.string".
3039 * simplify.c (g95_simplify_reshape): Wrong variable in call to
3042 2003-05-20 Canqun Yang <canqun@yahoo.com.cn>
3044 * trans-stmt.c: Remove unnecessary include file defaults.h.
3046 2003-05-19 Lifang Zeng <zlf605@hotmail.com>
3048 * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
3050 (g95_trans_forall): Allow arbitrary number of FORALL indexes and
3051 actual variables used as FORALL indexes.
3053 2003-05-15 Paul Brook <paul@nowt.org>
3055 * trans-array.c (g95_trans_static_array_pointer): Use
3057 (g95_trans_deferred_array): Initialize static array pointers.
3058 * trans-expr.c (g95_conv_function_call): Use formal arglist to
3059 correctly pass POINTER and absent CHARACTER arguments.
3061 2003-05-14 Lifang Zeng <zlf605@hotmail.com>
3063 * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
3064 (g95_resolve_forall_body): Resolve FORALL body.
3065 (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
3066 (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
3067 (g95_find_forall_index): Check whether the FORALL index appears in
3068 the expression or not.
3069 (resolve_code): Modified.
3071 2003-05-14 Paul Brook <paul@nowt.org>
3073 * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
3075 2003-05-13 Paul Brook <paul@nowt.org>
3077 * trans-types.c (g95_max_array_element_size): Now a tree node.
3078 (g95_init_types): Work out max size properly.
3079 (g95_get_dtype_cst): Modify to match.
3081 2003-05-11 Paul Brook <paul@nowt.org>
3083 * trans-io.c (add_case): Create a label decl for case labels.
3085 2003-05-11 Paul Brook <paul@nowt.org>
3087 * arith.c (g95_integer_index_kind): New variable.
3088 * f95-lang.c (g95_init): Move frontend initialization here ...
3089 (g95_post_options): ... from here.
3090 * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
3091 * intrinsic.c (add_functions): Use index kinds.
3092 * iresolve.c: Convert to index_kind where needed.
3093 * resolve.c (g95_resolve_index): Make public, use index_kind.
3094 (resolve_array_ref): Adjust to match.
3095 * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
3096 * trans-stmt.c: Ditto.
3097 * trans-types.c: Ditto.
3098 * trans-types.h (g95_array_index_kind): Remove declaration.
3099 * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
3101 2003-05-07 Paul Brook <paul@nowt.org>
3103 * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
3104 * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
3107 2003-05-07 Paul Brook <paul@nowt.org>
3109 * trans-array.c (trans_static_array_pointer,
3110 g95_trans_array_constructor_value, g95_conv_array_initializer,
3111 g95_conv_structure): CONSTRUCTOR nodes only have one operand.
3112 (g95_add_loop_ss_code): Convert subscripts to the correct type.
3113 * trans-stmt.c (g95_trans_character_select): Ditto.
3114 * trans-types.c (g95_init_types): Ditto.
3116 2003-05-07 Steven Bosscher <steven@gcc.gnu.org>
3118 * f95-lang.c (expand_function_body): Use input_line, not lineno.
3119 * trans-decl.c (g95_generate_function_code,
3120 g95_generate_constructors): Likewise.
3121 * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
3122 g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
3125 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
3126 * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
3127 with components point to the DERIVED type itself, and two DERIVED
3128 type with components point to each other.
3129 * trans-expr.c (g95_conv_componet_ref): Modified
3131 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
3132 * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
3134 (g95_trans_pointer_assign): Implement Nullify.
3136 2003-05-01 Paul Brook <paul@nowt.org>
3138 * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
3139 * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
3141 2003-05-01 Paul Brook <paul@nowr.org>
3143 * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
3144 trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
3147 2003-05-01 Canqun Yang <canqun@yahoo.com.cn>
3149 * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
3152 2003-04-28 Paul Brook <paul@nowt.org>
3154 * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
3155 as their kind suggests.
3156 (g95_resolve_reshape): Ditto.
3158 2003-04-28 Chun Huang <compiler@sohu.com>
3160 * trans-expr.c (g95_conv_substring_expr): New function.
3161 (g95_conv_expr): Use it.
3163 2003-04-28 Paul Brook <paul@nowt.org>
3165 * iresolve.c (g95_resolve_transpose): Make it match the
3167 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
3169 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
3171 * trans-types.c (g95_add_field_to_struct): New function to
3172 add a field to a UNION_TYPE or RECORD_TYPE.
3173 * trans-types.h (g95_add_field_to_struct): Prototype.
3174 (g95_get_derived_type): Use g95_add_field_to_struct to add
3176 * trans-io.c (g95_add_field): Remove.
3177 (ADD_FIELD): Use new g95_add_field_to_struct function.
3178 (ADD_STRING): Likewise.
3179 * trans-stmt.c (g95_trans_select): Likewise.
3180 (g95_add_field): Remove duplicated function.
3182 2003-04-18 Canqun Yang <canqun@yahoo.com.cn>
3184 Port implementation for CHARACTER SELECT from Andy's tree.
3185 * trans-stmt.c (g95_trans_character_select): Implement character
3186 select. (g95_add_field): New function.
3187 * trans-decl.c: Declare 'gfor_gndecl_select_string'.
3188 (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
3189 * g95.h (struct g95_case): Add field 'int n'.
3190 * trans.h: Declare 'gfor_fndecl_select_string'.
3192 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
3194 * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
3195 (g95_insert_bbd): Die on duplicates.
3196 * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
3198 2003-04-14 Steven Bosscher <steven@gcc.gnu.org>
3200 * g95.texi: Require GMP 4.0 -- like we actually
3201 do. Explain the testsuite and what-goes-where.
3202 Don't use undefined texinfo symbol. Break very
3203 long line. Remove finished item from the list
3206 2003-04-11 Canqun Yang <canqun@yahoo.com.cn>
3208 * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
3211 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
3213 * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
3214 (g95_trans_forall_body): New function.
3216 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
3218 * resolve.c (resove_where): New function.
3219 (resolve_where_shape): New function.
3220 (resolve_code): Add call to 'resolve_where'
3221 * trans-stmt.c (g95_trans_where): Modified.
3222 (g95_trans_where_2): New function.
3223 (g95_trans_where_assign): New function.
3224 (g95_evaluate_where_mask): New function.
3225 (g95_add_to_stmt_list): New function.
3226 (g95_get_temp_expr): New function.
3227 * trans.h (where_stmt_list): New structure.
3229 2003-04-10 Paul Brook <paul@nowt.org>
3231 * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
3232 (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
3234 2003-04-10 Steven Bosscher <steven@gcc.gnu.org>
3236 Update after mainline -> tree-ssa-branch merge.
3237 * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
3239 (g95_init): Update for new lang_hooks definition.
3240 (g95_post_options): New langhook.
3241 (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
3242 * scanner.c (g95_new_file): Comment update.
3244 2003-04-09 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3246 * g95.h, lang-options.h: Add -Wimplicit-interface.
3247 * options.c (g95_init_options, g95_parse_arg): Set it.
3248 * interface.c (check_intents): Warn about call with implicit
3250 * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
3253 2003-04-05 Paul Brook <paul@nowt.org>
3255 * iresolve.c (g95_resolve_spread): Don't resole based on type.
3256 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
3258 2003-03-29 Paul Brook <paul@nowt.org>
3260 * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
3261 (g95_resolve_unpack): Ditto.
3262 * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
3263 (g95_conv_intrinsic_function): Use it. Remove PACK and UNPACK.
3264 (g95_is_intrinsic_libcall): Add PACK and UNPACK.
3266 2003-03-25 Paul Brook <paul@nowt.org>
3268 * arith.c (g95_unary_user, g95_user): Remove dead functions.
3270 * array.c (g95_free_array_ref): Ditto.
3272 * symbol.c (g95_use_derived_tree): Ditto.
3273 * intrinsic.c (add_functions): Use simplification for SCALE.
3274 * primary.c (g95_match_rvalue): Test sym, not symtree.
3276 2003-03-25 Paul Brook <paul@nowt.org>
3278 * trans-decl.c (build_function_decl): Add parameter before it gets
3279 turned into a constant.
3280 * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
3281 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
3282 * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
3284 2003-03-22 Paul Brook <paul@nowt.org>
3286 * trans-array.c (g95_conv_array_initializer): Allow scalar
3288 * trans-decl.c (g95_finish_var_decl): Result variables are not
3290 * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
3291 (g95_conv_intrinsic_function): Use it.
3292 * trans-types.h (g95_type_spec): Remove dead declaration.
3294 2003-03-21 Paul Brook <paul@nowt.org>
3296 * trans-decl.c (g95_build_function_decl): Mark string parameters.
3298 2003-03-20 Paul Brook <paul@nowt.org>
3300 * trans-decl.c (g95_build_function_decl): Put character length
3301 parameters at the end of the function declaration.
3302 * trans-expr.c (g95_conv_function_call): Ditto.
3303 * trans-types.c (g95_get_function_type): Ditto.
3305 2003-03-20 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3307 * resolve.c (resolve_formal_arglist): Don't impose intent for
3308 procedure arguments of pure functions.
3309 (resolve_select): Remove redundant assignment.
3311 2003-03-19 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3313 * arith.c (validate_logical), g95.h, options.c (g95_init_options):
3315 * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
3316 * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
3318 * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
3320 * symbol.c (g95_add_type): Fix typo in comment.
3323 2003-03-16 Paul Brook <paul@nowt.org>
3325 * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
3326 * expr.c (g95_build_call): Remove.
3327 * f95-lang.c (puchdecl_top_level): New function.
3328 * g95.h (g95_code): Store resolved symbol, not just the name.
3329 * intrinsic.c (g95_intrinsic_namespace): New global namespace.
3330 (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
3331 (g95_get_intrinsic_sub_symbol): New function.
3332 * iresolve.c (g95_resolve_cpu_time): Use it.
3333 (g95_resolve_random_number): Ditto.
3334 * resolve.c: Set code->resolved_sym instead of code->sub_name.
3335 * trans-decl.c (g95_get_extern_function_decl): Give external decls
3336 the correct DECL_CONTEXT. Add global symbold to the global scope.
3337 * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
3340 2003-03-16 Paul Brook <paul@nowt.org>
3342 * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
3343 * options.c (g95_parse_arg): Ditto.
3344 * module.c (mio_symbol_attribute): Handle the always_explicit bit.
3345 * resolve.c (resolve_formal_arglist): The always_explicit sould be set
3346 for the procedure, not the parameter.
3347 * trans-array.c (g95_trans_g77_array): New function.
3348 (g95_trans_assumed_size): Use it.
3349 (g95_trans_dummy_array_bias): Ditto.
3350 (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
3351 (g95_conv_expr_descriptor): ... to here. Update callers.
3352 * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
3353 (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
3354 * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
3355 * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
3356 * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
3357 (g95_sym_type): Ditto.
3359 2003-03-15 Paul Brook <paul@nowt.org>
3361 * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
3363 * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
3365 2003-03-14 Paul Brook <paul@nowt.org>
3367 * trans-array.c (g95_array_is_packed): Remove.
3368 (g95_conv_array_base): Correctly handle all descriptorless cases.
3369 (g95_conv_array_stride): Use descriptorless strides.
3370 (g95_trans_dummy_array_bias): Don't always repack the array.
3371 (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
3373 * trans-types.c (g95_get_nodesc_array_type): Differentiate between
3374 dummy and non-dummy arrays...
3375 (g95_sym_type, g95_get_derived_type): ... like these.
3376 (g95_get_array_type_bounds): Allow discontiguous arrays.
3378 2003-03-12 Paul Brook <paul@nowt.org>
3380 * array.c (g95_resolve_array_spec): Fix comment.
3381 * g95.h (symbol_attributes): New flag always_explicit.
3382 * resolve.c (resolve_formal_arglist): Set it always_explicit.
3383 * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
3384 * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
3385 (g95_trans_array_bounds): Allow assumed shape arrays.
3386 (g95_trans_repack_array): Remove.
3387 (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
3388 * trans-decl.c (g95_build_qualified_array): Only ignore absent
3389 bounds for assumed size arrays.
3390 (g95_build_dummy_array_decl): Use descriptorless arrays.
3391 * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
3392 (g95_trans_pointer_assign): Fix typo.
3393 * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
3395 (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
3396 * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
3397 Also modify callers.
3398 * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
3400 2003-03-08 Paul Brook <paul@nowt.org>
3402 * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
3403 (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
3404 * resolve.c (compare_spec_to_ref): Allow full array sections.
3406 2003-03-08 Paul Brook <paul@nowt.org>
3408 * expr.c (g95_simplify_expr): Also simplify array index and
3409 substring expressions.
3410 * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
3411 * trans-array.c (g95_trans_array_bounds): New function.
3412 (g95_trans_auto_array_allocation): Use it.
3413 (g95_trans_assumed_size): Rewrite.
3414 * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
3415 (gfor_fndecl_repack): Remove.
3416 (g95_build_qualified_array): Handle absent upper bounds.
3417 (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
3418 (g95_get_symbol_decl): Update.
3419 (g95_build_intrinsic_function_decls): Initialize new decls.
3420 * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
3421 (gfor_fndecl_repack): Remove.
3422 * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
3423 * trans-types.c: (g95_build_array_type): Merge duplicated code..
3424 (g95_get_nodesc_array_type): Handle absent bounds.
3425 * trans-types.h (g95_get_nodesc_array_type): Declare.
3427 2003-03-04 Paul Brook <paul@nowt.org>
3429 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
3432 2003-03-02 Paul Brook <paul@nowt.org>
3434 * options.c (g95_init_options): Drfault to 1.
3435 (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
3436 * trans-array.c (g95_conv_array_data, g95_conv_array_base,
3437 g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
3438 Handle non-constant size automatic arrays.
3439 (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
3440 generic bound functions.
3441 (g95_trans_auto_array_allocation): Don't create a descriptor.
3442 (g95_trans_assumed_size): New function (broken).
3443 (g95_trans_dummy_array_bias): Remove unused var.
3444 * trans-array.h (g95_trans_assumed_size): Declare.
3445 * trans-decl.c (create_index_var): New fuction.
3446 (g95_build_qualified_array): New function.
3447 (g95_get_symbol_decl): Use it.
3448 (g95_trans_deferred_vars): Handle assumed shape seperately.
3449 * trans-types.c (get_element_type): Handle heap allocated arrays.
3450 (g95_is_nodesc_array): Include non-const size arrays.
3451 (g95_get_nodesc_array_type): Ditto.
3453 2003-02-23 Paul Brook <paul@nowt.org>
3455 * trans-array.c (g95_array_init_size): Should use stride, not size of
3458 2003-02-18 Paul Brook <paul@nowt.org>
3460 * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
3461 after intrinsic function check.
3463 2003-02-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3465 * io.c (match_io): Fix missing return value and remove useless
3467 * match.c (g95_match): Remove useless assignment.
3468 * module.c (parse_string): Remove useless post increment.
3469 * simplify.c (g95_simplify_verify): Remove useless assignment.
3471 2003-02-15 Paul Brook <paul@nowt.org>
3473 * expr.c (restricted_intrinsic): Handle bad values gracefully.
3474 * g95.h (symbol_attribute): Add referenced member.
3475 (g95_symbol): Add dummy_order member.
3476 (g95_set_sym_referenced): Declare.
3477 * match.c (g95_match_assignment, g95_match_call): Use it
3478 * primary.c (match_actual_arg, g95_match_rvalue,
3479 g95_match_variable): Ditto.
3480 * symbol.c (next_dummy_order): New variable.
3481 (g95_set_sym_referenced): New function.
3482 (check_done): New function.
3483 (g95_add_*): Use it.
3484 * trans-decl.c: Make formatting conform to GCC standards.
3485 (g95_defer_symbol_init): Add dummy variables in the right order.
3486 (g95_get_symbol_decl): Only accept referenced variables.
3487 (g95_create_module_variable): Module variables are always required.
3488 (generatr_local_decls): New function.
3489 (generate_local_vars): New function.
3490 (g95_generate_function_code): Use it.
3492 2003-02-13 Paul Brook <paul@nowt.org>
3494 * trans-decl.c (g95_conv_struct_cons): Remove.
3495 (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
3496 * trans-expr.c (g95_conv_structure): New function.
3497 (g95_conv_expr): Use it.
3499 2003-02-09 Paul Brook <paul@nowt.org>
3501 * trans-array.c (g95_array_init_size): Don't evaluate the linit
3502 expressions multiple times.
3503 (g95_trans_auto_arry_allocation): Use pointer not tmp.
3505 2003-02-08 Paul Brook <paul@nowt.org>
3507 * module.c (mio_symtree_ref): Declare as static.
3508 (mio_expr): Remove dead code.
3509 (read_module): Set the symtree link for fixups.
3510 * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
3511 (build_round_expr): ... to this.
3512 (g95_conv_intrinsic_aint): New function.
3513 (g95_conv_intrinsic_function): Use it.
3515 2003-02-08 Paul Brook <paul@nowt.org>
3517 * trans-array.c (g95_trans_array_constructor_value): Use the acutal
3518 offset after modificaton, not the increment expression.
3519 * dependency.c: Kill excess whitespace.
3521 2003-02-07 Sanjiv Gupta <sanjivg@noida.hcltech.com>
3523 * dependency.h: Remove some function declarations.
3524 * dependency.c (get_no_of_elements): Change this function not to
3526 * other: Add comments for all modified functions.
3528 2003-02-06 Paul Brook <paul@nowt.org>
3530 * g95spec.c (lang_specific_functions): Fix initializer warning.
3531 * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
3532 for structure type names.
3533 * trans-decl.c (g95_cons_structure_cons): New function.
3534 (g95_get_symbol_decl): Use it.
3535 * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
3538 2003-02-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3540 * resolve.c (compare_cases): Add const to casts.
3542 2003-01-30 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3544 * g95.h (g95_check_f): Change a1 to f1m.
3545 * intrinsic.c (add_sym_1m, check_specific,
3546 g95_intrinsic_func_interface): Use it.
3548 * module.c (init_pi_tree): Remove useless cast.
3549 (fp2): Fix argument type.
3551 * parse.c (parse_select_block): Add comment.
3553 2003-02-05 Toon Moene <toon@moene.indiv.nluug.nl>
3555 * lang-options.h: Fix warning involving C90 concatenated
3558 2003-02-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
3559 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3561 * io.c (format_asterisk): Complete initializer to kill warning.
3562 * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
3563 DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
3564 (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
3565 new defines to complete initializers. Kills all warnings.
3567 * Make-lang.in: Comment cleanup.
3569 2003-02-05 Paul Brook <paul@nowt.org>
3571 * array.c (g95_free_constructor): Handle NULL expressions.
3572 * resolve.c (resolve_structure_cons): Ditto.
3573 * decl.c (g95_match_null): New Function.
3574 (variable_decl): Use it.
3575 * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
3576 * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
3577 * trans-types.c (g95_set_decl_attributes): Remove empty function.
3579 2003-02-05 Paul Brook <paul@nowt.org>
3581 * trans.h (build1_v): New macro.
3582 (build_v): Remove pointless and incorrect prototype.
3583 * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
3584 * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
3586 2003-02-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
3588 * Make-lang.in (F95_OBJS): Remove one more dead file.
3590 2003-02-01 Paul Brook <paul@nowt.org>
3592 * lang-specs.h: Don't pass -ffixed-form to the linker.
3593 * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
3595 2003-02-01 Paul Brook <paul@nowt.org>
3597 * Make-lang.in (F95_OBJS): Remove dead files.
3598 * trans-array.c (g95_array_init_size): Do the right thing when
3600 * trans-decl.c (g95_generate_function_code): Initialize deffered
3601 symbol list before translating contained subroutines.
3602 * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
3603 scalar invariant values here...
3604 (g95_conv_variable, g95_conv_function_call): ... instead of here ...
3605 * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
3607 2003-01-29 Paul Brook <paul@nowt.org>
3609 * trans-array.c (g95_add_loop_code): Put pre code in the right block.
3610 (g95_walk_elemental_function_args): Reverse chains before adding.
3611 (g95_reverse_ss): Move about a bit.
3612 * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
3615 2003-01-28 Paul Brook <paul@nowt.org>
3617 * intrinsic.c (resolve_intrinsic): Use correct union member.
3618 * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
3620 * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
3621 use associated variables.
3622 * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
3623 * trans-expr.c (g95_conv_expr_present): ... to here.
3624 * trans.h: Declare it.
3625 * trans-types.c (g95_sym_type): Assume subroutine if not specified.
3627 2003-01-28 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3629 * array.c (expand_iterator): Suppress useless assignment.
3630 * decl.c (match_char_spec): Ditto.
3631 * io.c (match_io_iterator): Ditto.
3632 * primary.c (match_real_constant): Ditto.
3633 * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
3634 Ditto. Also, use g95_intrinsic_op not int for intrinsic operators.
3635 * matchexp.c (match_add_operand, match_level_5): Likewise.
3636 * module.c (parse_atom, find_enum): Likewise.
3637 * resolve.c: move #include <string.h>
3638 (resolve_select): Fix serious typo.
3640 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.n>
3642 * Make-lang.in: Don't build with broken tree-ssa-pre.
3644 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.nl>
3646 * resolve.c (resolve_index): Add a TODO.
3647 * symbol.c: Remove useless "#include <ctype.h>".
3649 2003-01-27 Paul Brook <paul@nowt.org>
3651 * check.c (check_rest): Allow different type kinds as an extension.
3652 * g95.h (g95_resolve_f): Add f1m.
3653 * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
3654 * intrinsic.h: Chenge prototypes for MIN and MAX.
3655 * iresolve.c (g95_resolve_minmax): New function.
3656 (g95_resolve_min, g95_resolve_max): Use it.
3657 * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
3659 (g95_conv_intrinsic_present): Fix logic.
3661 2003-01-27 Steven Bossche <s.bosscher@student.tudelft.nl>
3663 * g95.h (g95_case): Don't be a tree, be a double linked list.
3664 * match.c (match_case_selector): Remove redundant semantics check.
3665 Clean up a few goto's to make it a tiny little bit faster.
3666 * resolve.c (case_tree): Die.
3667 (compare_cases): Accept and compare unbounded cases too.
3668 (check_case_overlap): Don't build a tree. Instead, merge-sort the
3669 whole list of g95_cases passed from resolve_select.
3670 (sane_logical_select): Die.
3671 (check_case_expr): Return FAILURE if a CASE label is of the wrong
3673 (resolve_select): Fixup case expression for computed GOTOs, put it
3674 in expr, not expr2, for easier handing in the parse tree dumper and
3675 the code generator. Rewrite the rest of the function: Kill
3676 unreachable case labels and unreachable case blocks.
3677 * dump-parse-tree.c (g95_show_code_node): Always dump expr for
3678 an EXEC_SELECT, not case2 anymore.
3679 * trans-const.c (g95_conv_constant_to_tree): New function.
3680 (g95_conv_constant): Use it.
3681 * trans-const.h: Declare prototype for the new function.
3682 * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
3683 g95_trans_character_select): New static functions.
3684 (g95_trans_select): Rewrite.
3686 2003-01-26 Paul Brook <paul@nowt.org>
3688 * intrinsic.c (add_fnctions): Properly add dreal.
3689 * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
3690 (g95_conv_intrinsic_function): Use it.
3691 * trans-io.c (build_dt): Abort on internal files (unimplemented).
3693 2003-01-26 Paul Brook <paul@nowt.org>
3695 Widespread changes to the handling of symbols in expressions. These
3696 are now linked via g95_symtree nodes.
3697 * parse.c (g95_fixup_sibling symbols): New function.
3698 (parse_contained): Use it.
3699 * g95.h (symbol_attribute): Add contained. Indicates a symbol is a
3700 contained procedure that has bee correctly fixed up.
3701 (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
3703 2003-01-24 Paul Brook <paul@nowt.org>
3705 * trans-array.c (g95_walk_expr): Function result attributes are in
3707 * trans-expr.c (g95_conv_function_call,
3708 g95_trans_arrayfunc_assign): Ditto.
3709 * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
3711 2003-01-23 Steven Bosscher <s.bosscher@student.tudelft.nl>
3713 * expr.c (check_restricted): Fix error message.
3714 * symbol.c (free_st_labels): Plug memleak.
3716 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
3718 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
3719 reduce_binary_aa, reduce_binary, eval_intrinsic,
3720 eval_intrinsic_f2): Use typesafe prototypes for eval functions.
3721 * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
3722 for typesafe intrinsics helper functions.
3723 (g95_intrinsic_sym): Use them.
3724 * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
3725 add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
3726 add_sym_5, add_conv, resolve_intrinsic, do_simplify,
3727 check_specific, g95_intrinsic_func_interface,
3728 g95_intrinsic_sub_interface): Adjust all calls to intrinsics
3730 * trans-decl.c (g95_get_extern_function_decl): Likewise.
3731 * Make-lang.in: Don't disable warnings for strict prototypes
3732 any longer, everything is typesafe now.
3734 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
3736 * bbt.c (duplicate_node): Make static.
3737 * module.c (module_name): Make static.
3738 * scanner.c (include_dirs): Make static.
3740 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
3742 Hard coded _gfor_'s should not show up anymore.
3743 * g95.h (PREFIX): New macro.
3744 * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
3746 (g95_resolve_random_number): Likewise.
3747 * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
3748 * trans-io.c: Remove 'prefix' macro. Replace all uses with
3749 the new PREFIX macro from g95.h.
3751 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
3753 The troubles of forking... Andy implemented this just now too.
3754 Let's stick to that and keep the trees close.
3755 * g95.h (g95_st_label): 'format' member is now a g95_expr.
3756 * io.c: Revert previous changes.
3757 (g95_match_format): Match the format string as a character
3759 * match.h (g95_statement_label): Declare external.
3760 * parse.c: Revert previous changes.
3761 * symbol.c (g95_free_st_label): Free a g95_expr instead
3763 * trans-io.c: Revert previous changes.
3764 (build_dt): Use set_string to set the format string.
3766 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
3768 * io.c (format_string): Make non-static.
3769 (g95_match_format): Remember the format string.
3770 (terminate_io): Add I/O termination for empty I/O lists.
3771 * match.h: Declare external format_string.
3772 * parse.c (check_statement_label): Attack the format string
3773 to a format label for FORMAT statements.
3774 * trans-io.c (g95_add_field): Define prefix macro. Replace
3775 all uses of PREFIX define with a use of this macro.
3776 (build_dt): Implement formatted I/O for format labels.
3778 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
3780 * lang-options.h: Kill "-std=F".
3781 * options.c: Remove unimplemented "-std=F". Modify
3783 * misc.c (g95_terminal_width): New function.
3784 * error.c (g95_error_init_1): Use g95_terminal_width.
3785 * g95.h: Add prototype for g95_terminal_width, remove
3788 2003-01-19 Steven Bosscher <s.bosscher@student.tudelft.nl>
3790 * Make-lang.in: Fix typo.
3792 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
3794 * g95.h (struct g95_case): Remove unused cruft, new member
3795 'where' to keep track of the locus of the default case.
3796 * match.c (g95_match_case): Add locus to the current case.
3797 (match_case_selector): Likewise.
3798 * parse.c (parse_select_block): Move semantics check for
3799 multiple DEFAULT cases out of here to...
3800 * resolve.c (check_case_overlap): ...here. Return sooner
3802 (check_case_expr): Take two g95_cases now, use to sure the
3803 expression kinds are the same.
3804 (resolve_select): Cleanup.
3806 2003-01-18 Paul Brook <paul@nowt.org>
3808 * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
3809 * trans-decl.c (g95_set_symbol_decl): Handle non-array result
3811 (g95_get_extern_function_decl): Put decls in the correct context.
3813 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
3815 * trans-io.c: Port changes from Andy to set ERR flag.
3817 2003-01-17 Paul Brook <paul@nowt.org>
3819 * trans-array.c: Add various comments.
3820 (g95_ss_terminator): Declare as const.
3821 (g95_walk_expr): Remove first parameter and update all callers.
3822 (g95_walk_op_expr): Initialize scalar SS properly.
3823 * trans-array.h (g95_walk_expr): Update prototype.
3824 * trans-expr.c: Update for new g95_walk_expr.
3825 * trans-intrinsic.c: Ditto.
3826 * trans-io.c: Ditto.
3827 * trans.h: Various comments for SS chains.
3829 2003-01-17 Paul Brook <paul@nowt.org>
3831 * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
3833 * intrinsic.c (add_functions): Use them.
3834 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
3835 * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
3837 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
3839 Fallout of a small merge conflict:
3840 * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
3842 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
3844 * initrinsic.c: New add_sym_* functions for strong typing.
3845 (add_conv): Make prototype strict.
3846 * dump-parse-tree.c, dependency.c: Include config.h
3847 * resolve.c, trans-io.c: Fix typos.
3849 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
3851 * dump-parse-tree.c (g95_show_code_node): Show the
3852 condition for a computed GOTO that was transformed
3853 to a SELECT CASE construct.
3854 * resolve.c (check_case_overlap): Revert previous switch
3855 to treaps, it was too slow and didn't catch all trouble.
3856 (resolve_symbol): Be more flexible about module procedures.
3857 * symbol.c (check_conflict): Point to relevant section in
3858 the standard for dubious conflict. Allow procedure
3859 dummy arguments to be optional again.
3860 * trans-io (add_field): Rename to g95_add_field. Change
3862 * trans-stmt (trans_select): Handle unbounded cases for
3863 integer SELECT CASE constructs. Fix/add more comment.
3865 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
3867 * g95.h: Uses GCC's function attribute macros.
3868 * error.c, module.c, parse.c, g95.h: More function attributes.
3870 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
3872 * trans-decl.c (get_label_decl): Use TREE_LINENO instead
3873 of DECL_SOURCE_LINE, and TREE_FILENAME instead of
3876 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
3878 * f95-lang.c (pushdecl): Use TREE_LINENO instead of
3880 * trans.c (g95_trans_code): Use annotate_all_with_file_line
3881 instead of nowdead wrap_all_with_wfl.
3883 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
3885 * parse.c (g95_parse_file): In verbose mode, dump the parse tree
3886 before generating code, so we can still see it even if the code
3887 generation phase dies.
3889 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
3891 * decl.c (build_sym): Split out initialization expression parts...
3892 (add_init_expr_to_sym): ...to here.
3893 (variable_decl): Add the symbol following an attribute list to the
3894 symbol tree before parsing the optional initialization expression
3895 if the symbol is not of a derived type.
3896 * primary.c (g95_match_rvalue): Don't assume a symbol always has
3897 a value if it is a PARAMETER.
3899 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
3901 * misc.c: Don't #include <mcheck.h>
3902 * module.c: Ditto. Kill uses of mtrace, muntrace. If there
3903 ever was a glibc bug, then either this was never reported to
3904 glibc people, or it has been fixed for so long that there's
3905 no information you can find about it, anywhere.
3907 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
3910 * module.c (attr_bits, bt_types, array_spec_types):
3911 Switch 'const' and 'static'.
3912 * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
3914 GNU'ify source code:
3915 * trans-io.c: Numerous fixes, one fixed warning and a few
3916 TODO markers so that we don't forget about them.
3918 2003-01-13 Paul Brook <paul@nowt.org>
3920 * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
3921 * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
3923 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
3924 * match.c (g95_match_stop): Fix dumb == -> != error.
3926 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
3928 * dump-parse-tree.c (show_indent): Add line breaks. This
3929 whole dumping process needs cleanups.
3930 * f95-lang.c (g95_mark_addressable): Fix prototype to match
3931 the langhook. Fix 'return's accordingly.
3932 * g95-support.h: Adjust prototype.
3933 * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
3934 * lang-options.h: Add '-fsyntax-only'.
3935 * options.c (g95_init_options): Init 'no_backend'.
3936 (g95_parse_arg): Deal with '-fsyntax-only'.
3937 * parse.c (g95_parse_file): Do not generate code if 'no_backend'
3940 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
3942 * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
3943 arguments. Also make sure that if a symbol is marked INTRINSIC,
3944 an intrinsic with the symbol's name actually exists.
3945 (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
3946 Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
3947 ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
3949 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
3951 * resolve.c (resolve_contained_functions): Fix condition, don't
3952 throw internal_error if a child namespace has no name. Apparently
3953 this can be the case?
3955 2003-01-11 Paul Brook <paul@nowt.org>
3957 Port changes from Andy's tree:
3958 * g95.h (g95_code): Add stop_code.
3959 * match.c (g95_match_stop): Detter syntax checking.
3960 * resolve.c (resolve_generic_f0): Return match type.
3961 (resolve_generic_f): Remove dead/duplicated code.
3962 (resolve_specific_f): Ditto.
3963 * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
3964 * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
3965 * trans-stmt.c (g95_trans_stop): Handle new STOP format.
3967 2003-01-11 Paul Brook <paul@nowt.org>
3969 * trans-array.c: Various documentation/comment changes.
3970 * trans-stmt.c: Ditto.
3973 2003-01-10 Paul Brook <paul@nowt.org>
3975 * options.c/h: Add -fdump-parse-tree as alias of -v.
3977 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3979 * dump-parse-tree.c (g95_show_namespace): Fixed another
3980 typo. Sorry, it's Friday...
3982 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3985 * trans-array.c, trans-array.h, trans.c, trans-const.c,
3986 trans-const.h, trans-decl.c, trans-expr.c, trans.h
3987 trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
3988 trans-types.c: Fix bogus copyright years, add 2003.
3989 * trans-types.h: Give copyright header.
3991 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
3993 * dump-parse-tree.c (g95_show_namespace): Fixed typo.
3994 * expr.c, options.c, scanner.c: Add some more 'const' markers.
3995 * intrinsic.c: Some constant strings moved to read-only memory.
3996 * io.c (format_asterisk): Move to...
3999 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
4001 * dump-parse-tree.c (g95_show_namespace): Dump implicit
4002 types for ranges instead of per-letter. Indent the
4003 'CONTAINS' just like everything else.
4004 * resolve.c (resolve_contained_functions): Clarify comment.
4005 Explain non-obvious conditional expression. Improve
4006 diagnostics if tyoe cannot be resolved.
4007 Port semi-fix from Andy's tree:
4008 (was_declared): Move up before first use.
4009 (generic_sym, specific_sym): New functions. Code moved
4010 out if procedure_kind.
4011 (procedure_kind): Simplify using new functions.
4012 (resolve_generic_f): Make sure the functions we find in
4013 a parent namespace is generic.
4014 (resolve_specific_f): Ditto for specific functions.
4016 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
4018 * trans-stmt.c, trans.c: Fix some code style issues. Add
4019 some more comment (but still not enough!).
4021 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
4023 * symbol.c (flavors, procedures, intents, acces_types,
4024 access_types, ifsrc_types): Make const.
4025 * misc.c (g95_string2code): Make 'm' param 'const'.
4026 * module.c (find_enum, write_atom, mio_name): Make
4028 (attr_bits, bt_types, array_spec_types, array_ref_types,
4029 ref_types, expr_types): Make const.
4030 * g95.h: Adjust external decls.
4032 2003-01-09 Paul Brook <paul@nowt.org>
4034 * Testsuite: Add a load of new cases.
4036 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
4038 * Make-file.in: Add dependency on back end header files;
4039 a parallel build should work now.
4040 * f95-lang-c (lang_identifier): Remove bogus comment.
4041 (g95_be_parse_file): Fix prototype.
4042 (g95_init): Make static.
4043 (g95_finish): Make static.
4044 * error.c (g95_syntax_error): Kill. Make define in...
4045 * g95.h (g95_syntax_error): Define.
4046 (g95.options): Make 'source' member 'const'.
4047 * interface.c (g95_match_interface): Explain
4048 hard-to-read condition.
4049 (g95_match_end_interface): Ditto.
4050 * trans_const.c (g95_build_string_const): Make 's' parameter
4052 * trans_const.h: Adjust protoype accordingly.
4053 * trans-decl.c: Include tree-dump.h
4054 (g95_generate_function_code): Build fixes for recent changes
4055 in the tree-ssa branch.
4057 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
4059 * format.c: Kill, move code from here...
4061 * Make-lang.in: Adjust.
4064 * BUGS: Mention where to submit bugs. Move old content...
4065 * TODO: ...to here. New file.
4067 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
4068 Fix most warnings, and suppress the ones we can't fix for now.
4069 * Make-lang.in: Suppress warnings about bad proto's in g95.h,
4070 these warnings just clutter the screen and there's not much
4071 we can do about them for now anyway.
4072 * check.c, iresolve.c: Mark unused function parameters.
4073 * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
4074 they should be resolved before they get here.
4075 * error.c: Remove unused FILE *status_out.
4076 * f95-lang.c (g95_init): Remove bogus cast.
4077 * Many files: Make things 'const' where required.
4078 * g95.h: Fix prototypes for all modified functions above.
4079 (g95_options): Remove 'object' member.
4081 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
4083 * Make-file.in: Cleanup bogus targets. Add more comment.
4084 * lang-options.h: New option '-w'.
4085 * g95.h: add no_options field to struct g95_options.
4086 * options.c (g95_init_options): Default no_warnings to off.
4087 (g95_parse_arg): Recognise the '-w' switch and its alias,
4089 * error.c (g95_warning, g95_warning_now): Don't emit warning if
4090 no_warning option is set.
4091 * iresolve.c (g95_resolve_shape): Fix warning.
4093 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
4095 * primary.c (g95_next_string_char): Rename next_string_char, and
4096 make static. Adjust callers accordingly.
4097 * resolve.c (resolve_generic_f0): Return try, not match. Adjust
4098 callers accordingly.
4099 * g95.h: Split out all g95_match* functions to...
4100 * match.h: ...here. New file.
4101 * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
4102 matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
4104 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
4106 * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
4107 g95_merge_new_implicit): New functions.
4108 (g95_match_implicit_none, g95_match_implicit): Move from here...
4109 * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
4110 Modify to use the new functions in symbol.c.
4111 * g95.h: Add and move prototypes.
4113 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
4115 * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
4116 node compare function.
4117 (g95_insert_bbt): Likewise.
4118 (g95_insert_bbt_with_overlap): Likewise.
4119 (g95_delete_bbt): Likewise.
4120 (delete_treap): Likewise. Also fix a potential bug when calling it.
4121 * module.c (compare_pointers): Change proto to compare_fn.
4122 (compare_integers): Likewise.
4123 (compare_true_names): Likewise.
4124 (find_true_name): Adjust call to compare_true_names to match proto.
4125 (require_atom, write_atom, mio_name): Fix 'const' warnings.
4126 (init_pi_tree): Make compare a compare_fn instead of (int *).
4127 * resolve.c (compare_cases): Change proto to compare_fn.
4128 * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
4129 it static, and rename to compare_symtree.
4130 (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
4132 * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
4133 of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
4135 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
4136 * Make-lang.in: Fix spaces/tabs issues from previous patch.
4137 * patch.options: Blow away Paul's checkin mistake :-)
4138 * io.c (terminate_io): Fix memory leak (Arnaud).
4140 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
4142 * Make-lang.in: Teach about building DVI, info manual.
4143 * g95.texi: New file.
4145 2003-01-02 Paul Brook <paul@nowt.org>
4147 * trans-array.c (g95_reverse_ss): Make static and don't use.
4148 (g95_conv_ss_descriptor): Don't use g95_loopinfo
4149 (g95_conv_array_parameters): Modify for pointer assignments.
4150 (g95_walk_subexpr): New function.
4151 (g95_walk_expr*): Use it.
4152 * trans-array.h (g95_reverse_ss): Remove prototype.
4153 * trans-expr.c (g95_trans_pointer_assign): Implement.
4154 (Many): Set se.want_pointer before calling g95_conv_array_parameter.
4155 * trans-intrinsic.c: Sync with scalarizer changes.
4156 * trans-io.c: Ditto.
4158 2002-12-29 Paul Brook <paul@nowt.org>
4160 * trans-array.c: Document calling convention for arrays.
4162 2002-12-19 Paul Brook <paul@nowt.org>
4164 * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
4165 assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
4166 optional parameters for some intrinsics.
4167 (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
4168 * trans-expr.c (g95_conv_function_call): Pass NULL for absent
4169 optional parameters.
4170 * trans.h (g95_se): Add ignore_optional flag.
4172 2002-12-15 Paul Brook <paul@nowt.org>
4174 * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
4175 * trans-decl.c (g95_generate_function_code): Use TDI_original.
4177 2002-12-14 Paul Brook <paul@nowt.org>
4179 * trans-stmt.c (g95_trans_call): Use resolved symbol name.
4181 2002-12-12 Paul Brook <paul@nowt.org>
4183 * trans-array.c (g95_trans_array_constructor_subarray): Fully
4184 initialize the scalarizer.
4185 (various): Update to new format of g95_expr->value.constructor.
4187 2002-12-08 Paul Brook <paul@nowt.org>
4189 * trans-array.c (g95_put_offset_into_var): New function.
4190 (g95_trans_array_constructor_subarray): New function.
4191 (g95_trans_array_constructor_value): Use it.
4192 (g95_array_cons_size): Don't abort() on array components.
4194 2002-12-08 Paul Brook <paul@nowt.org>
4196 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
4197 * support.c: Update #includes.
4198 (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
4199 * trans-array.c: Update #includes.
4201 * trans-const.c: Ditto.
4202 * trans-io.c: Ditto.
4203 * trans-types.c: Ditto.
4204 (g95_init_types): Set size_type_node.
4205 * trans-decl.c: Update #includes.
4206 (gfor_fndecl_adjust{l,r}): Declare and initialize.
4207 * trans-stmt.c: Update #includes.
4208 (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
4209 (g95_trans_select): Fix check for unbounded ranges.
4210 * trans-expr.c: Update #includes.
4211 (g95_conv_string_tmp): New function.
4212 (g95_conv_concat_op): Use it.
4213 * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
4214 * Trans-intrisic.c: Update #includes.
4215 (g95_conv_intrinsic_strcmp): New function.
4216 (g95_conv_intrinsic_adjust): Ditto.
4217 (g95_conv_intrinsic_function: Use them.
4219 2002-11-30 Paul Brook <paul@nowt.org>
4221 * trans-array.c (g95_walk_function_expr): Handle non-array return by
4223 * trans-dec.c (g95_build_function_decl): Handle character return
4225 (g95_get_fake_result_decl): Ditto.
4226 (g95_trans_deferred_vars): Ditto.
4227 * trans-expr.c (g95_conv_function_call): Ditto.
4228 (g95_trans_arrayfunc_assign) Limit to array valued functions.
4229 * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
4230 (g95_conv_intrinsic_function): Use it.
4231 * trans-types.c (g95_sym_type): Handle functions returning strings.
4232 (g95_return_by_reference): Ditto.
4233 (g95_get_function_type): Ditto.
4235 2002-11-18 Paul Brook <paul@nowt.org>
4237 * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
4238 requires a temporary.
4239 (g95_trans_select): Handle computed gotos.
4240 * trans-types.c (g95_build_array_type): Warn about non-functional
4241 assumed shape arrays.
4242 * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
4244 * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
4245 (g95_conv_intrinsic_int): New function.
4246 (g95_conv_intrinsic_mod): New function.
4247 (g95_conv_intrinsic_ichar): New function.
4248 (g95_conv_intrinsic_function): Use them.
4249 (g95_conv_intrinsic_dim): Use g95_evaluate_now.
4251 2002-11-17 Toon Moene <toon@moene.indiv.nluug.nl>
4253 * trans-types.c (g95_build_array_type): Assumed
4254 sized arrays can have rank > 1.
4255 * trans.c (g95_trans_code): Remove erroneous
4256 warning about CONTINUE.
4257 * trans-expr.c (g95_conv_variable): Remove
4260 2002-11-15 Paul Brook <paul@nowt.org>
4262 * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
4264 2002-10-31 Paul Brook <paul@nowt.org>
4266 * f95-tree.c: Remove tree copying stuff that's now in gimple.c
4267 * trans-expr.c (g95_conv_component_ref): Handle character string
4269 (g95_conv_string_parameter): Ditto.
4270 * trans-types.c (g95_get_derived_type): Add length decl to caracter
4273 2002-10-10 Paul Brook <paul@nowt.org>
4275 * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
4276 * trans-expr.c (g95_conv_function_call): Remove unreliable return value
4278 * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
4279 (g95_conv_intrinsic_function): Handle size and shape intrinsics.
4280 (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
4281 * trans-types.c (pvoid_type_node): Declare and initialize.
4282 * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
4283 (g95_array_allocate): Fix when base==data.
4284 (g95_conv_array_parameter): Correctly handle reduced rank sections.
4285 * trans-io.c (g95_trans_write): Correctly handle string modifiers.
4287 2002-10-09 Paul Brook <paul@nowt.org>
4289 * (g95_conv_expr_reference): Handle character strings correctly.
4291 2002-10-07 Paul Brook <paul@nowt.org>
4293 (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
4295 * trans-array.c (g95_build_array_initializer): Remove.
4296 (g95_conv_array_initializer): New Function.
4297 (g95_trans_auto_arry_allocation): Cleanup.
4298 (g95_trans_init_character_array): Remove.
4299 * g95spec.c: Link in libgforbegin.
4300 * trans.c (g95_generate_code): Rename main function to MAIN__.
4301 (g95_create_var): New function.
4302 (g95_create_var_np): New function.
4303 (g95_evaluate_now): New function.
4304 (g95_start_block): New function.
4305 (g95_finish_block): New function.
4306 (g95_add_expr_to_block): New function.
4307 (g95_add_block_to_block): New function.
4308 * trans-expr.c (g95_conv_componen_ref): New function.
4309 * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
4310 (F95_OBJS): Add dependency.o.
4311 * f95-lang.c (g95_is_simple_stmt): Remove.
4312 * f95-tree.c (mark_not_simple): New function.
4313 (unshare_all_trees): New function.
4314 (create_tmp_var, create_tmp_alias_var): Remove.
4315 * support.c (declare_tmp_vars, tree_last_decl): Remove.
4316 * trans*: Convert to new IR using GENERIC trees. Don't bother about
4317 SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
4319 2002-10-01 Paul Brook <paul@nowt.org>
4321 * trans-array.c: Add support for descriptorless arrays.
4322 (g95_conv_array_data): New function.
4323 (g95_conv_array_base): New function.
4324 * trans-array.h: Declare these here.
4325 * trans-decl.c(g95_create_mopdule_variable): Perform variable
4326 initialization and creation here.
4327 (g95_create_module_vars): Instead of here.
4328 * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
4329 * trans-intrinsic.c: Ditto.
4330 * trans-types.c (g95_is_nodesc_array): New function.
4331 (g95_get_nodesc_array_type): New function.
4332 (g95_sym_type, g95_get_derived_type): Use them.
4333 * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
4335 2002-09-28 Paul Brook <paul@nowt.org>
4337 * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
4338 * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
4341 2002-09-24 Paul Brook <paul@nowt.org>
4343 * f95-lang.c (listify): Remove declaration.
4344 (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
4346 * f95-tree.c (get_name): New function.
4347 * trans.c (module_namespace): Remove.
4348 * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
4349 * trans-types.c: Ditto.
4351 2002-09-19 Paul Brook <paul@nowt.org>
4353 * trans-array.c (g95_get_array_cons_size): New Function.
4354 (g95_con_ss_startstride): Handle Array constructors.
4355 (g95_conv_loop_setup): Ditto.
4356 (g95_conv_array_parameter): Ditto.
4357 * tras-decl.c (g95_finish_var_decl): Make initializes variables
4360 2002-09-19 Paul Brook <paul@nowt.org>
4362 * trans.c (g95_simple_fold_tmp): Detect variables inside
4364 * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
4366 2002-09-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
4368 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
4370 2002-09-14 Paul Brook <paul@nowt.org>
4372 * trans.c (g95_create_module_variable): Move to trans-decl.c.
4373 * trans-const.c (g95_conv_string_init): New Function.
4374 * trans-const.h: Declare it.
4375 * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
4376 variables. Don't bail on intrinsic symbols.
4377 (get_extern_function_decl): Handle specific intrinsic functions.
4378 * trans-types.c (g95_sym_type): Dummy functions don't return
4380 * trans-array.c (g95_build_array_initializer): New Function.
4381 (g95_trans_auto_array_allocation): Build initializer for static decls.
4382 Don't use mpz_addmul, it's GMP4 only.
4384 2002-09-12 Paul Brook <paul@nowt.org>
4386 * trans-decl.c (g95_generate_code): Fix thinko with return variable.
4387 (g95_get_extern_function_decl, g95_build_function_decl): Mangle
4388 assembler names for module procedures.
4390 2002-09-11 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
4392 * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
4395 2002-09-10 Paul Brook <paul@nowt.org>
4397 * trans-array.c: Change format of G95_SS_TEMP strictures.
4398 (g95_check_fncall_dependancy): New function.
4399 (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
4401 * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
4403 (g95_build_function_decl): Don't assume result arrays are packed.
4404 (g95_trans-deferred-vars): Handle array result variables.
4405 (g95_generate_fuction_code): Clear saved_function_decls.
4406 * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
4408 (g95_trans_arrayfunc_assign): New function.
4409 (g95_trans_assignment): Use it.
4410 * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
4411 (g95_se): Add direct_byref.
4412 * trans-types.c: Use sym->result rather than sym where appropriate.
4413 * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
4414 Update other functions to use this.
4415 (g95_is_intrinsic_libcall): New function.
4416 (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
4417 (g95_walk_intrinsic_function): Ditto.
4419 2002-09-08 Paul Brook <paul@nowt.org>
4421 * trans-types.c: Change rank field to dtype field in array descriptor.
4422 * trans-array.c: Implement filling of dtype array descriptor field.
4423 * trans-intrinsic.c: Fix broken LEN intrinsic.
4425 2002-09-07 Paul Brook <paul@nowt.org>
4427 * trans-intrinsic.c: Remove outdated todo intrinsic list.
4428 (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
4429 (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
4431 2002-09-06 Paul Brook <paul@nowt.org>
4433 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
4434 (gt-f95-trans-types.h): Add dependancy information.
4435 * config-lang.in (gtfiles): Add trans-types.c
4436 * f95-lang.c (g95_be_parse_file): Pass error and warning counts
4437 back to top-level code.
4438 * trans-array.c, trans-types.c: Change format of array descriptor.
4439 (g95_conv_descriptor_dimension): New function.
4440 * trans-types.h (g95_conv_descriptor_rank): define.
4441 * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
4444 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
4446 * trans-array.c, trans-types.c: Add rank information to descriptor.
4448 2002-09-06 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
4450 * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
4452 2002-09-04 Paul Brook <paul@nowt.org>
4454 * f95-lang.c (g95_create_decls): New function.
4455 (g95_init): Move initialization of external decls to above, and call
4456 from g95_be_parse_file.
4457 * trans.c (g95_finish_stmt): Don't amputate the decl chain.
4458 * trans-types.c (g95_init_types): Always name integer and char types.
4459 (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
4461 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
4463 * Make-lang.in: Add options.c to F95_PARSER_OBJS
4465 2002-09-02 Paul Brook <paul@nowt.org>
4467 * g95_generate_code: Clear the attr for __fortran_main.
4468 * trans-types.c (g95_finish_type): New function.
4469 * g95_init_io_state_type: Use g95_finish_type.
4470 * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
4472 2002-09-01 Paul Brook <paul@nowt.org>
4474 * README.backend: Warn about the dangers of extra config.h files.
4475 Remove obsolete libgfor stuff.
4476 * config-lang.in: Add target-libgfor dependancy.
4477 * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
4479 2002-09-01 Toon Moene <toon@moene.indiv.nluug.nl>
4481 * g95_conv_mpz_to_tree: Free storage pointed to by q,
4484 2002-08-30 Paul Brook <paul@nowt.org>
4486 * trans-intrinsic.c (g95_conv_intrinsic_function,
4487 g95_walk_intrinsic_function): Added ANY and ALL.
4488 (g95_conv_intrinsic_anyall): New function.
4489 * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in