1 2004-10-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
4 * simplify.c (twos_complement): New function.
5 (gfc_simplify_ishft, gfc_simplify_ishftc): Revise.
7 * simplify.c (gfc_simplify_abs): Use mpfr_hypot for CABS.
9 2004-10-06 Paul Brook <paul@codesourcery.com>
11 * trans-stmt.c (gfc_trans_simple_do): New function.
12 (gfc_trans_do): Use it. Evaluate iteration bounds before entering
13 loop. Update comments.
15 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
18 * iresolve.c (gfc_resolve_pack): Choose function depending if mask
22 * intrinsic.c (add_sym_5): Remove.
23 (add_subroutines): Add resolution function for MVBITS.
24 * intrinsic.h (gfc_resolve_mvbits): Declare resolution function for
26 * iresolve.c (gfc_resolve_mvbits): New function.
27 (gfc_resolve_random_number): Remove empty line at end of function.
29 * trans-const.c (gfc_build_cstring_const): New function.
30 (gfc_init_cst): Use new function.
31 * trans-const.h (gfc_build_cstring_const): Add prototype.
32 * trans-io.c (set_string, set_error_locus): Use new function.
33 * trans-stmt.c (gfc_trans_goto): Use new function.
36 * parse.c (accept_statement): Don't treat END DO like END IF and
38 (parse_do_block): Generate possible END DO label inside END DO
42 * check.c (gfc_check_system_sub): New function.
43 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SYSTEM.
44 * intrinsic.c (add_functions): Add 'system'.
45 (add_subroutines): Add 'system'.
46 * intrinsic.h (gfc_check_etime_sub, gfc_check_getcwd_sub):
47 Move prototypes to other suborutines.
48 (gfc_check_system_sub, gfc_resolve_system, gfc_resolve_system_sub):
50 (gfc_resolve_system_clock): Fix formatting of prototype.
51 * iresolve.c (gfc_resolve_system, gfc_resolve_system_sub): New
53 * trans-intrinsic.c (gfc_conv_intrinsic_function): Deal with
56 2004-10-04 Erik Schnetter <schnetter@aei.mpg.de>
58 * scanner.c (preprocessor_line): Accept preprocessor lines without
59 file names. Check file names for closing quotes. Handle escaped
62 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
63 Paul Brook <paul@codesourcery.com>
65 * trans-array.c (gfc_conv_expr_descriptor): Check for substriungs.
66 Use gfc_get_expr_charlen.
67 * trans-expr.c (gfc_get_expr_charlen): New function.
68 * trans.h (gfc_get_expr_charlen): Add prototype.
70 2004-10-04 Kazu Hirata <kazu@cs.umass.edu>
72 * trans-intrinsic.c: Fix a comment typo.
74 2004-10-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
76 * simplify.c (range_check): Remove blank line at beginning of function.
77 (gfc_simplify_dint): Same at end of function.
78 (gfc_simplify_exponent, gfc_simplify_fraction): Simplify calculations.
79 (gfc_simplify_bound): Fix indentation.
80 (gfc_simplify_log10): Simplify calculation.
81 (gfc_simplify_min, gfc_simplify_max): Remove blank line at beginning
83 (gfc_simplify_nearest): Same at end of function.
84 (gfc_simplify_nint, gfc_simplify_idnint): Same at beginning of
86 (gfc_simplify_rrspacing, gfc_simplify_set_exponent,
87 gfc_simplify_spacing): Simplify calulations.
89 2004-10-03 Feng Wang <fengwang@nudt.edu.cn>
91 * trans-intrinsic.c: Fix comments on spacing and rrspacing
92 (gfc_conv_intrinsic_rrspacing): Add fold on constant trees.
94 2004-10-01 Jan Hubicka <jh@suse.cz>
96 * f95-lang.c (gfc_expand_function): Update call of
97 tree_rest_of_compilation.
98 * trans-decl.c (gfc_generate_constructors): Likewise.
100 2004-09-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
102 * trans-intrinsic.c: Comment fixes.
104 2004-09-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
106 * decl.c (add_init_expr_to_sym, variable_decl): Comment fixes.
108 2004-09-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
110 * trans-types.c (gfc_return_by_reference): Remove superfluous
113 * intrinsic.h (gfc_resolve_getcwd): Update prototype.
114 * iresolve.c (gfc_resolve_getcwd): Add second argument to function.
117 * trans-expr.c (gfc_trans_arrayfunc_assign): Look at resolved
118 function to determine return type.
120 2004-09-20 Jan Hubicka <jh@suse.cz>
122 * trans-decl.c (build_entry_thunks): Finalize the function; do not lower
124 (gfc_generate_function_code): Likewise.
126 2004-09-20 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
129 * simplify.c (gfc_simplify_reshape): Set shape of return value
132 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
133 Zack Weinberg <zack@codesourcery.com>
135 * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class
136 enumeration constants.
138 2004-09-17 Paul Brook <paul@codesourcery.com>
140 * gfortran.h (struct gfc_linebuf): Don't use C99 empty arrays.
141 (gfc_linebuf_header_size): Define.
142 * scanner.c (load_file): Use it.
144 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
146 * array.c, data.c, decl.c, dependency.c, error.c, f95-lang.c,
147 interface.c, intrinsic.c, io.c, misc.c, module.c, parse.h,
148 resolve.c, scanner.c, trans-array.c, trans-array.h,
149 trans-common.c, trans-const.h, trans-decl.c, trans-expr.c,
150 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
151 trans.h: Fix comment typos. Follow spelling conventions.
153 2004-09-16 Victor Leikehman <lei@il.ibm.com>
156 * trans-io.c (transfer_array_component): New function.
157 (transfer_expr): For array fields, call transfer_array_component.
159 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
161 * gfortran.texi: Fix a typo.
163 2004-09-15 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
165 * parse.c (eof_buf): Rename eof to eof_buf.
166 (unexpected_eof): Same.
167 (gfc_parse_file): Same.
169 2004-09-15 Steven G. Kargl <kargls@comcast.net>
171 * check.c (gfc_check_getcwd_sub): New function.
172 * gfortran.h (GFC_ISYM_GETCWD): New symbol.
173 * intrinsic.c (add_functions): Add function definition;
175 * intrinsic.c (add_subroutines): Add subroutine definitions.
176 * intrinsic.h: Add prototypes.
177 * iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub):
179 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol.
181 2004-09-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
184 * module.c (write_symbol): Don't fill in module name here.
185 (write_symbol0): Fill in here instead.
187 2004-09-14 Kazu Hirata <kazu@cs.umass.edu>
189 * data.c, decl.c, f95-lang.c, gfortran.h, match.c,
190 trans-array.c, trans-common.c, trans-expr.c,
191 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.h: Fix
192 comment typos. Follow spelling conventions.
194 2004-09-09 Paul Brook <paul@codesourcery.com>
196 * scanner.c (get_file): Add ATTRIBUTE_UNUSED.
198 2004-09-08 Paul Brook <paul@codesourcery.com>
200 * array.c: Don't include assert.h.
201 * data.c: Don't include assert.h. Replace assert and abort with
202 gcc_assert and gcc_unreachable.
203 * dependency.c: Ditto.
209 * trans-array.c: Ditto.
210 * trans-common.c: Ditto.
211 * trans-const.c: Ditto.
212 * trans-decl.c: Ditto.
213 * trans-expr.c: Ditto.
214 * trans-intrinsic.c: Ditto.
216 * trans-stmt.c: Ditto.
217 * trans-types.c: Ditto.
220 2004-09-07 Per Bothner <per@bothner.com>
221 Paul Brook <paul@codesourcery.com>
223 * error.c (show_locus): Handle mapped locations.
224 * f95-lang.c (gfc_be_parse_file): Initialize mapped locations.
225 * gfortran.h: Include input.h.
226 (struct gfc_linebuf): Use source_location.
227 * scanner.c (get_file): Initialize linemap.
228 (preprocessor_line): Pass extra argument to get_file.
229 (load_file): Ditto. Setup linemap.
230 (gfc_new_file): Handle mapped locations.
231 * trans-common.c (build_field, build_equiv_decl, build_common_decl):
232 Set decl source locations.
233 (gfc_trans_common): Set blank common block location.
234 * trans-decl.c (gfc_set_decl_location): New function.
235 (gfc_get_label_decl, gfc_get_symbol_decl): Use it.
236 (trans_function_start): Move call to gfc_set_backend_locus..
237 (build_function_decl): ... to here.
238 (build_entry_thunks): Set and restore the backend locus.
239 (gfc_generate_constructors): Remove excess arguments to
241 (gfc_generate_block_data): Add comments. Set the decl locus.
242 * trans-io.c (set_error_locus): Handle mapped locations.
243 * trans.c (gfc_get_backend_locus, gfc_get_backend_locus): Ditto.
244 (gfc_trans_code): Use SET_EXPR_LOCATION.
245 (gfc_generate_code): Override the location of the new symbol.
246 * trans.h (gfc_set_decl_location): Add prototype.
248 2004-08-31 Paul Brook <paul@codesourcery.com>
250 * trans-types.c (gfc_type_for_mode): Return NULL for unknown modes.
252 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
255 * trans-intrinsic.c (gfc_conv_intrinsic_merge): Do the right thing for
258 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
263 * resolve.c (resolve_transfer): New function.
264 (resolve_code): Call resolve_transfer in case of EXEC_TRANSFER.
266 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
269 * trans-types.c (gfc_init_types): Make gfc_character1_type_node an
272 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
274 * CONTRIB, NEWS, README, TODO: Remove obsolete files.
276 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
279 * trans-types.c (gfc_return_by_reference): Remove TODO error,
280 add comment pointing out possible issue WRT compatibility with g77.
282 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
284 * trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace
285 all occurences of 'gfc_strlen_type_node' by
286 'gfc_charlen_type_node'.
287 * trans-types.h: Same. Also update comment accordingly.
289 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
291 * primary.c: Update copyright boilerplate to say GCC.
292 * f95-lang.c: Change initial comment to say gfortran.
294 2004-08-31 Paul Brook <paul@codesourcery.com>
296 * trans-types.h: Add comments.
297 (intmax_type_node, string_type_node, const_string_type_node): Remove.
299 2004-08-30 Richard Henderson <rth@redhat.com>
301 * Make-lang.in (fortran/f95-lang.o): Update dependencies.
302 (fortran/trans-decl.o, fortran/trans-types.o): Likewise.
303 * gfortran.h (gfc_integer_info): Add c_char, c_short, c_int,
305 (gfc_logical_info): Add c_bool.
306 (gfc_real_info): Add mode_precision, c_float, c_double, c_long_double.
307 * trans-array.c (gfc_array_allocate): Use TYPE_PRECISION
308 rather than gfc_int[48]_type_node for allocate choice.
309 * trans-decl.c (gfc_build_intrinsic_function_decls): Cache
310 local copies of some kind type nodes.
311 (gfc_build_builtin_function_decls): Likewise.
312 * trans-expr.c (gfc_conv_power_op): Likewise.
313 * trans-intrinsic.c (gfc_conv_intrinsic_index,
314 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify,
315 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Likewise.
316 * trans-stmt.c (gfc_trans_pause, gfc_trans_stop,
317 gfc_trans_character_select, gfc_trans_allocate): Likewise.
318 * trans-io.c (gfc_pint4_type_node): Move into ...
319 (gfc_build_io_library_fndecls): ... here. Cache local copies of
320 some kind type nodes.
321 * trans-types.c (gfc_type_nodes): Remove.
322 (gfc_character1_type_node, gfc_strlen_type_node): New.
323 (gfc_integer_types, gfc_logical_types): New.
324 (gfc_real_types, gfc_complex_types): New.
325 (gfc_init_kinds): Fill in real mode_precision.
326 (gfc_build_int_type, gfc_build_real_type): New.
327 (gfc_build_complex_type, gfc_build_logical_type): New.
328 (c_size_t_size): New.
329 (gfc_init_types): Loop over kinds.
330 (gfc_get_int_type, gfc_get_real_type): Use gfc_validate_kind.
331 (gfc_get_complex_type, gfc_get_logical_type): Likewise.
332 (gfc_get_character_type_len): Likewise.
333 (gfc_type_for_size): Loop over kinds; use a reduced set of
335 (gfc_type_for_mode): Loop over kinds.
336 (gfc_signed_or_unsigned_type): Use gfc_type_for_size.
337 (gfc_unsigned_type, gfc_signed_type): Use gfc_signed_or_unsigned_type.
338 * trans-types.h (F95_INT1_TYPE, F95_INT2_TYPE, F95_INT4_TYPE,
339 F95_INT8_TYPE, F95_INT16_TYPE, F95_REAL4_TYPE, F95_REAL8_TYPE,
340 F95_REAl16_TYPE, F95_COMPLEX4_TYPE, F95_COMPLEX8_TYPE,
341 F95_COMPLEX16_TYPE, F95_LOGICAL1_TYPE, F95_LOGICAL2_TYPE,
342 F95_LOGICAL4_TYPE, F95_LOGICAL8_TYPE, F95_LOGICAL16_TYPE,
343 F95_CHARACTER1_TYPE, NUM_F95_TYPES, gfc_type_nodes,
344 gfc_int1_type_node, gfc_int2_type_node, gfc_int4_type_node,
345 gfc_int8_type_node, gfc_int16_type_node, gfc_real4_type_node,
346 gfc_real8_type_node, gfc_real16_type_node, gfc_complex4_type_node,
347 gfc_complex8_type_node, gfc_complex16_type_node,
348 gfc_logical1_type_node, gfc_logical2_type_node,
349 gfc_logical4_type_node, gfc_logical8_type_node,
350 gfc_logical16_type_node, gfc_strlen_kind): Remove.
351 (gfc_character1_type_node): Turn in to a variable.
352 (gfc_strlen_type_node): Likewise.
354 2004-08-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
356 * gfortran.h (gfc_namespace): Add new field is_block_data.
357 * parse.c (accept_statement): Remove special handling for BLOCK DATA.
358 (parse_block_data): Record BLOCK DATA name, set is_block_data field.
359 * trans.c (gfc_generate_code): Handle BLOCK DATA units.
360 * trans.h (gfc_generate_block_data): Add prototype.
361 * trans-decl.c (gfc_generate_block_data): New function.
363 2004-08-29 Richard Henderson <rth@redhat.com>
365 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_export.
366 * trans-types.c (gfc_init_kinds): Reject integer kinds larger
367 than two HOST_WIDE_INT.
369 2004-08-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
372 * decl.c (free_variable, free_value, gfc_free_data, var_list,
373 var_element, top_var_list, match_data_constant, top_val_list,
374 gfc_match_data): Move here from match.c.
375 (match_old_style_init): New function.
376 (variable_decl): Match old-style initialization.
377 * expr.c (gfc_get_variable_expr): New function.
378 * gfortran.h (gfc_get_variable_expr): Add prototype.
379 * gfortran.texi: Start documentation for supported extensions.
380 * match.c: Remove the functions moved to decl.c.
381 * match.h (gfc_match_data): Move prototype to under decl.c.
382 * symbol.c (gfc_find_sym_tree, gfc_find_symbol): Add/correct
385 2004-08-29 Steven G. Kargl <kargls@comcast.net>
386 Paul Brook <paul@codesourcery.com>
388 * check.c (gfc_check_besn, gfc_check_g77_math1): New functions.
389 * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Define.
390 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
391 (build_builtin_fntypes): New function.
392 (gfc_init_builtin_functions): Use it.
393 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_{J,Y}{0,1,N}
394 and GFC_ISYM_ERF{,C}.
395 (gfc_c_int_kind): Declare.
396 * intrinsic.c (add_functions): Add [d]bes* and [d]erf*.
397 * intrinsic.h (gfc_check_besn, gfc_check_g77_math1, gfc_resolve_besn,
398 gfc_resolve_g77_math1): Add prototypes.
399 * resolve.c (gfc_resolve_besn, gfc_resolve_g77_math1): New functions.
400 * mathbuiltins.def: Add comment. Change third argument. Use
401 DEFINE_MATH_BUILTIN_C. Add bessel and error functions.
402 * trans-intrinsic.c (BUILT_IN_FUNCTION): Define.
403 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
404 * trans-types.c (gfc_c_int_kind): Declare.
405 (gfc_init_kinds): Set it.
407 2004-08-29 Steven G. Kargl <kargls@comcast.net>
408 Paul Brook <paul@codesourcery.com>
410 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
411 (gfc_check_f, gfc_simplify_f): Add f0.
412 * intrinsic.c (do_check): Call f0. Flatten.
413 (add_sym_0): Fix prototype. Set f0.
414 (add_functions): Add getgid, getgid and getuid.
415 (resolve_intrinsic): Remove obsolete comment.
416 (do_simplify): Call f0.
417 * intrinsic.h (gfc_resolve_getgid, gfc_resolve_getpid,
418 gfc_resolve_getuid): Add prototypes.
419 * iresolve.c (gfc_resolve_getgid, gfc_resolve_getpid,
420 gfc_resolve_getuid): New functions.
421 * trans-intrinsic.c (gfc_conv_intrinsic_function): Handle
424 2004-08-28 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
426 * error.c (gfc_error_init_1): Remove blank line in front of
427 function body. Add missing blank.
428 (gfc_buffer_error, error_char, error_string): Remove blank line in
429 front of function body.
430 (show_locus): Add comma in comment.
431 (gfc_clear_warning, gfc_warning_check, gfc_clear_error,
432 gfc_push_error, gfc_pop_error): Remove blank line in front of
434 (gfc_get_errors): Typo fix in comment in front of function. Remove
435 blank line in front of function body.
437 2004-08-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
439 * gfortran.h (gfc_default_*_kind): Remove prototypes, add extern
440 variable declaration of same name.
441 * arith.c, check.c, decl.c, dump_parse_tree.c, expr.c,
442 intrinsic.c, io.c, iresolve.c, match.c, options.c, primary.c,
443 resolve.c, simplify.c, symbol.c, trans-const.c, trans-io.c:
444 Replace all calls to gfc_default_*_kind with variable accesses.
445 * trans-types.c: Same as above.
446 (gfc_default_*_kind_1): Rename to gfc_default_*_kind, remove
447 static qualifier. Replace all occurences.
448 (gfc_default_*_kind): Remove functions.
450 2004-08-26 Richard Henderson <rth@redhat.com>
452 * arith.c: Include system.h, not real system headers.
453 (MPZ_NULL, MPF_NULL, DEF_GFC_INTEGER_KIND, DEF_GFC_LOGICAL_KIND,
454 DEF_GFC_REAL_KIND, GFC_SP_KIND, GFC_SP_PREC, GFC_SP_EMIN, GFC_SP_EMAX,
455 GFC_DP_KIND, GFC_DP_PREC, GFC_DP_EMIN, GFC_DP_EMAX, GFC_QP_KIND,
456 GFC_QP_PREC, GFC_QP_EMIN, GFC_QP_EMAX): Remove.
457 (gfc_integer_kinds, gfc_logical_kinds, gfc_real_kinds,
458 gfc_index_integer_kind, gfc_default_integer_kind,
459 gfc_default_real_kind,gfc_default_double_kind,
460 gfc_default_character_kind, gfc_default_logical_kind,
461 gfc_default_complex_kind, validate_integer, validate_real,
462 validate_logical, validate_character,
463 gfc_validate_kind): Move to trans-types.c.
464 (gfc_set_model_kind): Use gfc_validate_kind.
465 (gfc_set_model): Just copy the current precision to default.
466 (gfc_arith_init_1): Use mpfr precision 128 for integer setup.
467 * f95-lang.c (gfc_init_decl_processing): Invoke gfc_init_kinds.
468 * gfortran.h: Update file commentary.
469 * trans-types.c (MAX_INT_KINDS, MAX_REAL_KINDS): New.
470 (gfc_default_integer_kind_1, gfc_default_real_kind_1,
471 gfc_default_double_kind_1, gfc_default_character_kind_1,
472 gfc_default_logical_kind_1, gfc_default_complex_kind_1): New.
473 (gfc_init_kinds): New.
474 (gfc_init_types): Don't set gfc_index_integer_kind here.
475 * trans-types.h (gfc_init_kinds): Declare.
476 * doc/invoke.texi: Clarify DOUBLE PRECISION behaviour wrt -r8.
478 2004-08-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
480 * check.c (gfc_check_atan2): New function.
481 * intrinsic.c (add_functions): Use gfc_check_atan2 for ATAN2
482 * intrinsic.h (gfc_check_atan2): Add prototype.
484 2004-08-25 Richard Henderson <rth@redhat.com>
486 * arith.c (gfc_validate_kind): Add may_fail argument; abort if
487 false and we don't validate the kind.
488 (gfc_check_integer_range, gfc_check_real_range): Update to match.
489 * check.c (kind_check): Likewise.
490 * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Likewise.
491 (match_char_spec, match_logical_spec): Likewise.
492 * gfortran.h (gfc_validate_kind): Likewise.
493 * options.c (gfc_handle_option): Likewise.
494 * primary.c (match_integer_constant, match_real_constant,
495 match_string_constant, match_logical_constant,
496 match_const_complex_part): Likewise.
497 * simplify.c (get_kind, gfc_simplify_bit_size, gfc_simplify_digits,
498 gfc_simplify_epsilon, gfc_simplify_huge, gfc_simplify_ibclr,
499 gfc_simplify_ibset, gfc_simplify_ishft, gfc_simplify_ishftc,
500 gfc_simplify_maxexponent, gfc_simplify_minexponent,
501 gfc_simplify_nearest, gfc_simplify_not, gfc_simplify_precision,
502 gfc_simplify_radix, gfc_simplify_range, gfc_simplify_rrspacing,
503 gfc_simplify_scale, gfc_simplify_spacing, gfc_simplify_tan,
504 gfc_simplify_tiny): Likewise.
505 * trans-intrinsic.c (gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod,
506 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
507 prepare_arg_info): Likewise.
509 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
511 * expr.c (gfc_check_assign): Add comment. Add new warning.
512 * trans-expr.c (gfc_conv_function_call): Correctly dereference
513 result of pointer valued function when not in pointer assignment.
515 2004-08-25 Paul Brook <paul@codesourcery.com>
517 * config-lang.in: Remove dead commented line.
518 * module.c: Replace g95 with gfortran in comment.
520 2004-08-25 Paul Brook <paul@codesourcery.com>
523 * arith.c (gfc_mpfr_to_mpz): Workaround mpfr bug.
525 2004-08-25 Paul Brook <paul@codesourcery.com>
528 * trans-array.c (gfc_trans_allocate_temp_array): Remove
529 string_length argument.
530 (gfc_trans_array_ctor_element): New function.
531 (gfc_trans_array_constructor_subarray): Use it.
532 (gfc_trans_array_constructor_value): Ditto. Handle constant
534 (get_array_ctor_var_strlen, get_array_ctor_strlen): New functions.
535 (gfc_trans_array_constructor): Use them.
536 (gfc_add_loop_ss_code): Update to new gfc_ss layout.
537 (gfc_conv_ss_descriptor): Remember section string length.
538 (gfc_conv_scalarized_array_ref): Ditto. Remove dead code.
539 (gfc_conv_resolve_dependencies): Update to new gfc_ss layout.
540 (gfc_conv_expr_descriptor): Ditto.
541 (gfc_conv_loop_setup): Ditto. Spelling fixes.
542 * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
543 * trans-const.c (gfc_conv_constant): Update to new gfc_ss layout.
544 * trans-expr.c (gfc_conv_component_ref): Turn error into ICE.
545 (gfc_conv_variable): Set string_length from section.
546 (gfc_conv_function_call): Remove extra argument.
547 (gfc_conv_expr, gfc_conv_expr_reference): Update to new gfc_ss layout.
548 * trans-types.c (gfc_get_character_type_len): New function.
549 (gfc_get_character_type): Use it.
550 (gfc_get_dtype): Return zero for internal types.
551 * trans-types.h (gfc_get_character_type_len): Add prototype.
552 * trans.h (struct gfc_ss): Move string_length out of union.
554 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
556 * trans.h (build2_v, build3_v): New macros.
558 * f95-lang.c (gfc_truthvalue_conversion): Use build2 instead of
560 * trans-array.c (gfc_conv_descriptor_data,
561 gfc_conv_descriptor_offset, gfc_conv_descriptor_dimension,
562 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
563 gfc_conv_descriptor_ubound, gfc_trans_allocate_array_storage,
564 gfc_trans_allocate_temp_array,
565 gfc_trans_array_constructor_subarray,
566 gfc_trans_array_constructor_value, gfc_conv_array_index_ref,
567 gfc_trans_array_bound_check, gfc_conv_array_index_offset,
568 gfc_conv_scalarized_array_ref, gfc_conv_array_ref,
569 gfc_conv_array_ref, gfc_trans_preloop_setup,
570 gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
571 gfc_conv_loop_setup, gfc_array_init_size,
572 gfc_conv_array_initializer, gfc_trans_array_bounds,
573 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
574 gfc_conv_expr_descriptor, gfc_conv_array_parameter,
575 gfc_trans_deferred_array): Use buildN and buildN_v macros instead
576 of build and build_v as appropriate.
577 * trans-common.c (create_common): Same.
578 * trans-decl.c (gfc_trans_auto_character_variable,
579 gfc_trans_entry_master_switch, gfc_generate_function_code): Same.
580 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
581 gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
582 gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
583 gfc_conv_expr_op, gfc_conv_function_call,
584 gfc_trans_structure_assign): Same.
585 * trans-intrinsic.c (build_fixbound_expr, build_round_expr,
586 gfc_conv_intrinsic_aint, gfc_conv_intrinsic_bound,
587 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
588 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
589 gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_minmax,
590 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
591 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_minmaxloc,
592 gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
593 gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_singlebitop,
594 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
595 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_strcmp,
596 gfc_conv_allocated, gfc_conv_associated, prepare_arg_info,
597 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
598 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat,
599 gfc_conv_intrinsic_iargc): Same.
600 * trans-io.c (set_parameter_value, set_parameter_ref, set_string,
601 set_flag, add_case, io_result, transfer_namelist_element,
602 transfer_expr): Same.
603 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_if_1,
604 gfc_trans_arithmetic_if, gfc_trans_do, gfc_trans_do_while,
605 gfc_trans_integer_select, gfc_trans_logical_select,
606 gfc_trans_character_select, gfc_trans_forall_loop,
607 gfc_trans_nested_forall_loop, gfc_do_allocate,
608 generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
609 compute_inner_temp_size, compute_overall_iter_number,
610 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
611 gfc_trans_forall_1, gfc_evaluate_where_mask,
612 gfc_trans_where_assign, gfc_trans_allocate): Same.
613 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Same.
614 * trans.c (gfc_add_modify_expr, gfc_finish_block,
615 gfc_build_array_ref, gfc_build_function_call,
616 gfc_trans_runtime_check): Same.
618 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
620 * trans-const.c (gfc_conv_mpz_to_tree): Change call to
621 build_int_cst to build_int_cst_wide in accordance to Nathan's
624 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
626 * trans-array.c (gfc_trans_array_constructor_value): Adjust
628 * trans-const.c (gfc_build_string_const, gfc_init_constants,
629 gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise.
630 * trans-decl.c (gfc_get_symbol_decl, build_entry_thunks,
631 gfc_trans_entry_master_switch): Likewise.
632 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
633 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
634 * trans-io.c (add_case, set_error_locus,
635 transfer_namelist_element, transfer_expr): Likewise.
636 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
637 gfc_trans_stop, gfc_trans_character_select): Likewise.
638 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
639 * trans.c (gfc_trans_runtime_check): Likewise.
641 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
643 * trans-decl.c, trans-types.c: Add and remove blank lines as
646 2004-08-24 Richard Henderson <rth@redhat.com>
648 * trans-const.c (gfc_conv_mpz_to_tree): Fix 64-bit shift warning.
650 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
652 * resolve.c (merge_argument_lists): Revert unintentionally
655 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
657 * trans-decl.c (build_function_decl): Fix spelling in comment.
658 (build_entry_thunks): Remove code with no function.
659 (gfc_build_intrinsic_function_decls): Remove empty line.
661 * resolve.c (resolve_entries): Fix a bunch of comment typos.
663 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
665 * f95-lang.c (gfc_init_decl_processing): Adjust
666 build_common_tree_nodes call.
668 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
670 * trans-types.c: Spelling and formatting fixes.
672 2004-08-23 Richard Henderson <rth@redhat.com>
674 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_getlimbn instead
675 of going through an intermediate string. Fix 32/64 int/long bug.
677 2004-08-23 Eric Christopher <echristo@redhat.com>
679 * trans-types.c (gfc_type_for_mode): Remove VECTOR_TYPE_SUPPORTED_P
680 usage. Use build_vector_type_for_mode for vector types.
682 2004-08-22 Richard Henderson <rth@redhat.com>
685 * data.c (find_con_by_offset): Search ordered list; handle
686 elements with repeat counts.
687 (gfc_assign_data_value_range): New.
688 * gfortran.h (struct gfc_data_value): Make repeat unsigned.
689 (gfc_assign_data_value_range): Declare.
690 * match.c (top_val_list): Extract repeat count into a temporary.
691 * resolve.c (values): Make left unsigned.
692 (next_data_value): Don't decrement left.
693 (check_data_variable): Use gfc_assign_data_value_range.
695 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
697 * trans-const.c, trans-decl.c, trans-expr.c: Spelling fixes.
699 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
701 * check.c (gfc_check_reduction): Rename to ...
702 (check_reduction): ... this. Make static. Don't check type of
704 (gfc_check_minval_maxval, gfc_check_prodcut_sum): New functions.
705 * intrinsic.c (add_functions): Change MAXVAL, MINVAL, PRODUCT and
706 SUM to use new check functions.
707 (check_specific): Change logic to call new functions.
708 * intrinsic.h (gfc_check_minval_maxval, gfc_check_product_sum):
710 (gfc_check_reduction): Remove prototype.
712 2004-08-20 Paul Brook <paul@codesourcery.com>
713 Canqun Yang <canqun@nudt.edu.cn>
716 * trans-array.c (gfc_conv_array_parameter): Pass correct pointer
717 for automatic arrays.
718 * trans-types.c (gfc_get_nodesc_array_type): Add comment.
720 2004-08-19 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
724 * match.c (match_simple_forall, match_simple_where): Forward-declare.
725 (gfc_match_if): Order statement list alphabetically, add WHERE and
726 FORALL, remove double PAUSE.
727 (gfc_match_simple_where, match_forall_header,
728 gfc_match_simple_forall): New functions.
729 (gfc_match_forall): Use match_forall_header.
731 2004-08-19 Paul Brook <paul@codesourcery.com>
734 * gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0.
735 * symbol.c (gfc_clear_attr): Use memset.
737 2004-08-19 Paul Brook <paul@codesourcery.com>
741 * data.c (assign_substring_data_value): Remove.
742 (create_character_intializer): New function.
743 (gfc_assign_data_value): Track the typespec for the current
744 subobject. Use create_character_intializer.
746 2004-08-19 Erik Schnetter <schnetter@aei.mpg.de>
749 * check.c (gfc_check_reduction): New function.
750 (gfc_check_minval_maxval): Removed.
751 (gfc_check_product): Removed.
752 (gfc_check_sum): Removed.
753 * intrinsic.h: Add/remove declarations for these.
754 * gfortran.h: Add field f3red to union gfc_check_f.
755 * intrinsic.c (add_sym_3red): New function.
756 (add_functions): Register maxval, minval, product, and sum intrinsics
757 through add_sym_3red.
758 (check_specific): Handle f3red union field.
759 * iresolve.c: Whitespace change.
761 2004-08-18 Paul Brook <paul@codesourcery.com>
763 * trans-types.c (gfc_sym_type): Use pointer types for optional args.
765 2004-08-18 Victor Leikehman <lei@il.ibm.com>
768 * trans-io.c (transfer_namelist_element): New. Recursively handle
769 derived-type variables. Pass string lengths.
770 (build_dt): Code moved to build_namelist, with some
771 changes and additions.
772 (gfc_build_io_library_fndecls): Declare the fifth
773 argument in st_set_nml_var_char -- string_length.
775 2004-08-17 Paul Brook <paul@codesourcery.com>
776 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
779 * decl.c (get_proc_name): Update mystery comment.
780 (gfc_match_entry): Check for errors earlier. Add entry point to list.
781 * dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes.
782 * gfortran.h (symbol_attribute): Add entry_master. Document entry.
783 (struct gfc_entry_list): Define.
784 (gfc_get_entry_list): Define.
785 (struct gfc_namespace): Add refs and entries.
786 (enum gfc_exec_op): Add EXEC_ENTRY.
787 (struct gfc_code): Add ext.entry.
788 * module.c (ab_attribute, attr_bits): Remove AB_ENTRY.
789 (mio_symbol_attribute): Don't save/reture addr->entry.
790 (mio_namespace_ref): Refcount namespaces.
791 * parse.c (accept_statement): Handle ST_ENTRY.
792 (gfc_fixup_sibling_symbols): Mark symbol as referenced.
793 (parse_contained): Fixup sibling references to entry points
794 after parsing the procedure body.
795 * resolve.c (resolve_contained_fntype): New function.
796 (merge_argument_lists, resolve_entries): New functions.
797 (resolve_contained_functions): Use them.
798 (resolve_code): Handle EXEC_ENTRY.
799 (gfc_resolve): Call resolve_entries.
800 * st.c (gfc_free_statement): Handle EXEC_ENTRY.
801 * symbol.c (gfc_get_namespace): Refcount namespaces.
802 (gfc_free_namespace): Ditto.
803 * trans-array.c (gfc_trans_dummy_array_bias): Treat all args as
804 optional when multiple entry points are present.
805 * trans-decl.c (gfc_get_symbol_decl): Remove incorrect check.
806 (gfc_get_extern_function_decl): Add assertion. Fix coment.
807 (create_function_arglist, trans_function_start, build_entry_thunks):
809 (gfc_build_function_decl): Rename ...
810 (build_function_decl): ... to this.
811 (gfc_create_function_decl): New function.
812 (gfc_generate_contained_functions): Use it.
813 (gfc_trans_entry_master_switch): New function.
814 (gfc_generate_function_code): Use new functions.
815 * trans-stmt.c (gfc_trans_entry): New function.
816 * trans-stmt.h (gfc_trans_entry): Add prototype.
817 * trans-types.c (gfc_get_function_type): Add entry point argument.
818 * trans.c (gfc_trans_code): Handle EXEC_ENTRY.
819 (gfc_generate_module_code): Call gfc_create_function_decl.
820 * trans.h (gfc_build_function_decl): Remove.
821 (gfc_create_function_decl): Add prototype.
823 2004-08-15 Andrew Pinski <apinski@apple.com>
826 * f95-lang.c (gfc_init_builtin_functions): Initialize the builtins
827 for cabs{,f} and copysign{,f}.
828 * trans-decl.c (gfor_fndecl_math_cabsf): Delete.
829 (gfor_fndecl_math_cabs): Delete.
830 (gfor_fndecl_math_sign4): Delete.
831 (gfor_fndecl_math_sign8): Delete.
832 (gfc_build_intrinsic_function_decls): Remove the
833 initializing of cabs{,f} and copysign{,f} functions.
834 * trans-intrinsic.c (gfc_conv_intrinsic_abs): Use the builtins
835 instead of the functions definitions.
836 (gfc_conv_intrinsic_sign): Likewise.
837 * trans.h (gfor_fndecl_math_cabsf): Delete.
838 (gfor_fndecl_math_cabs): Delete.
839 (gfor_fndecl_math_sign4): Delete.
840 (gfor_fndecl_math_sign8): Delete.
842 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
844 * trans-array.c (gfc_trans_array_constructor_value): Use
846 * trans-const.c (gfc_build_string_const,
847 gfc_init_constants, gfc_conv_mpz_to_tree,
848 gfc_conv_constant_to_tree): Likewise.
849 * trans-decl.c (gfc_get_symbol_decl): Likewise.
850 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
851 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
852 * trans-io.c (add_case, set_error_locus, build_dt,
853 transfer_expr): Likewise.
854 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
855 gfc_trans_stop, gfc_trans_character_select): Likewise.
856 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
857 * trans.c (gfc_trans_runtime_check): Likewise.
859 2004-08-14 Paul Brook <paul@codesourcery.com>
861 * trans-decl.c (gfc_build_function_decl): Remove dead code.
863 2004-08-14 Paul Brook <paul@codesourcery.com>
865 * trans-arry.c (gfc_trans_auto_array_allocation): Remove unused var.
867 2004-08-13 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
869 * gfortran.h: Add comments.
870 * parse.c (parse_contained): Fix comment typo.
871 * resolve.c (was_declared): Ditto.
874 2004-08-11 Paul Brook <paul@codeourcery.com>
877 * intrinsic.c (add_functions): Add dfloat as an alias for dble.
879 2004-08-10 Richard Henderson <rth@redhat.com>
881 * f95-lang.c (gfc_init_builtin_functions): Remove
882 __builtin_stack_alloc, add __builtin_alloca.
883 * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR.
884 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
886 2004-08-10 Paul Brook <paul@codesourcery.com>
888 * trans-io.c (transfer_expr): Handle pointters.
890 2004-08-10 Paul Brook <paul@codesourcery.com>
893 * trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT.
894 (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta.
895 (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary):
896 Handle GFC_SS_COMPONENT.
897 (gfc_conv_ss_startstride): Ditto. Set ss->shape.
898 (gfc_conv_loop_setup): Tweak commends. Remove dead code.
900 (gfc_conv_array_initializer): Call specific initializer routines.
901 * trans-expr.c (gfc_trans_structure_assign): New function.
902 (gfc_trans_subarray_assign): New function.
903 (gfc_trans_subcomponent_assign): New fucntion
904 (gfc_conv_structure): Use them.
905 * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT.
908 2004-08-08 Victor Leikehman <lei@il.ibm.com>
910 * simplify.c (gfc_simplify_shape): Bugfix.
911 * expr.c (gfc_copy_shape_excluding): New function.
912 * gfortran.h (gfc_get_shape): Bugfix.
913 (gfc_copy_shape_excluding): Added declaration.
914 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
915 gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound,
916 gfc_resolve_ubound, gfc_resolve_transpose): Added compile
917 time resolution of shape.
919 2004-08-06 Janne Blomqvist <jblomqvi@cc.hut.fi>
921 * intrinsic.c (add_subroutines): Add getenv and
922 get_environment_variable. (add_sym_5s): New function.
923 * intrinsic.h (gfc_resolve_get_environment_variable): Add
925 * iresolve.c (gfc_resolve_get_environment_variable): New
928 2004-08-06 Feng Wang <fengwang@nudt.edu.cn>
930 * f95-lang.c (gfc_init_builtin_functions): Fix the number of
931 __builtin_pow[f] arguments.
933 2004-08-06 Steven G. Kargl <kargls@comcast.net>
935 * arith.c: Add #define for model numbers. Remove global GMP variables.
936 (natural_logarithm,common_logarithm,exponential,sine,
937 cosine,arctangent,hypercos,hypersine ): Remove.
938 (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions.
939 (arctangent2,gfc_arith_init_1,gfc_arith_done_1
940 gfc_check_real_range, gfc_constant_result, gfc_range_check,
941 gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times,
942 gfc_arith_divide,complex_reciprocal,complex_pow_ui,
943 gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real,
944 gfc_convert_complex,gfc_int2real,gfc_int2complex,
945 gfc_real2int,gfc_real2real,gfc_real2complex,
946 gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP
947 to MPFR, use new functions.
948 * arith.h: Remove extern global variables.
949 (natural_logarithm,common_logarithm,exponential, sine, cosine,
950 arctangent,hypercos,hypersine): Remove prototypes.
951 (arctangent2): Update prototype from GMP to MPFR.
952 (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes.
953 * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR.
954 * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR.
955 * gfortran.h (GFC_REAL_BITS): Remove.
956 (arith): Add ARITH_NAN.
957 Include mpfr.h. Define GFC_RND_MODE.
958 Rename GCC_GFORTRAN_H GFC_GFC_H.
959 (gfc_expr): Convert GMP to MPFR.
960 * module.c: Add arith.h, correct type in comment.
961 (mio_gmp_real): Convert GMP to MPFR.
962 (mio_expr): Use gfc_set_model_kind().
963 * primary.c: Update copyright date with 2004.
964 (match_real_constant,match_const_complex_part): Convert GMP to MPFR.
965 * simplify.c: Remove global GMP variables
966 (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag,
967 gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint,
968 gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan,
969 gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx,
970 gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh,
971 gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon,
972 gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor,
973 gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int,
974 gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log,
975 gfc_simplify_log10,simplify_min_max,gfc_simplify_mod,
976 gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint,
977 gfc_simplify_rrspacing,gfc_simplify_scale,
978 gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin,
979 gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt,
980 gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny,
981 gfc_simplify_init_1,gfc_simplify_done_1): Convert GMP to MPFR.
983 * trans-const.c (gfc_conv_mpfr_to_tree): Rename from
984 gfc_conv_mpf_to_tree. Convert it to use MPFR
985 (gfc_conv_constant_to_tree): Use it.
986 * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree().
987 * trans-intrinsic.c: Add arith.h, remove gmp.h
988 (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR.
990 2004-08-06 Victor Leikehman <lei@il.ibm.com>
991 Paul Brook <paul@codesourcery.com>
993 * trans-array.c (gfc_trans_allocate_array_storage,
994 gfc_trans_allocate_temp_array, gfc_add_loop_ss_code,
995 gfc_conv_loop_setup): For functions, if the shape of the result
996 is not known in compile-time, generate an empty array descriptor for
997 the result and let the callee to allocate the memory.
998 (gfc_trans_dummy_array_bias): Do nothing for pointers.
999 (gfc_conv_expr_descriptor): Use function return values directly.
1000 * trans-expr.c (gfc_conv_function_call): Always add byref call
1002 (gfc_trans_pointer_assignment): Add comments.
1003 (gfc_trans_arrayfunc_assign): Don't chain on expression.
1005 2004-08-01 Roger Sayle <roger@eyesopen.com>
1007 * options.c (gfc_init_options): Don't warn about the use GNU
1008 extensions by default.
1009 (gfc_post_options): Warn about GNU extensions with -pedantic.
1010 (gfc_handle_option): Don't warn about GNU extensions with -std=gnu.
1012 2004-07-30 Richard Henderson <rth@redhat.com>
1014 * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL
1017 2004-07-25 Richard Henderson <rth@redhat.com>
1019 * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL
1020 and DECL_IGNORED_P on RESULT_DECL.
1021 (gfc_generate_constructors): Likewise.
1023 2004-07-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1026 * lang.opt (ffixed-line-length-none, ffixed-line-length-): New
1028 (ffixed-line-length-80, ffixed-line-length-132): Remove.
1029 * options.c (gfc_handle_options): Deal with changed options.
1030 * scanner.c (load_line): Change second arg to 'char **',
1031 allocate if pointing to NULL. Keep track of buffer's length.
1032 Adapt buffer size to overlong lines. Pad lines to full length
1034 (load_file): Adapt to new interface of load_line.
1036 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
1038 * trans.h (builtin_function): Declare.
1040 2004-07-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1043 (parts ported from g95)
1044 * parse.h (gfc_state_data): New field do_variable.
1045 (gfc_check_do_variable): Add prototype.
1046 * parse.c (push_state): Initialize field 'do_variable'.
1047 (gfc_check_do_variable): New function.
1048 (parse_do_block): Remember do iterator variable.
1049 (parse_file): Initialize field 'do_variable'.
1050 * match.c (gfc_match_assignment, gfc_match_do,
1051 gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate):
1052 Add previously missing checks.
1053 (gfc_match_return): Reformat error message.
1054 * io.c (match_out_tag): New function.
1055 (match_open_element, match_close_element,
1056 match_file_element, match_dt_element): Call match_out_tag
1057 instead of match_vtag where appropriate.
1058 (match_io_iterator, match_io_element): Add missing check.
1059 (match_io): Reformat error message.
1060 (match_inquire_element): Call match_out_tag where appropriate.
1062 * parse.c (gfc_check_do_variable): Fix error locus.
1064 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1067 * trans-decl.c (gfc_build_function_decl): Create a new chardecl
1068 for every assumed length character dummy argument.
1071 * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion.
1074 * simplify.c (gfc_simplify_bound): Copy the bound expression.
1076 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1079 * trans-array.c gfc_trans_g77_array,
1080 gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init
1081 for assumed length characters.
1082 (gfc_conv_expr_descriptor): Set se->string_length if dealing
1083 with a character expression.
1084 (gfc_cvonv_array_parameter): Pass string length when passing
1085 character array according to g77 conventions.
1087 2004-07-12 Paul Brook <paul@codesourcery.com>
1089 * expr.c (gfc_check_assign_symbol): Handle pointer assignments.
1090 * trans-array.c (gfc_trans_auto_array_allocation): Remove
1091 initialization code.
1092 * trans-common.c (create_common): Use gfc_conv_initializer.
1093 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer.
1094 * trans-expr.c (gfc_conv_initializer): New function.
1095 (gfc_conv_structure): Use it.
1096 * trans.h (gfc_conv_initializer): Add prototype.
1098 2004-07-11 Paul Brook <paul@codesourcery.com>
1101 * parse.c (gfc_fixup_sibling_symbols): Also look for untyped
1103 (parse_contained): Mark contained symbols as referenced.
1105 2004-07-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1108 * module.c (gfc_dump_module, gfc_use_module): Print locus
1109 when opening of module file fails.
1112 * io.c (match_io): Flag 'WRITE(...), ...' as extension.
1115 * match.c (gfc_match_program): A program name is obligatory.
1116 (gfc_match_return): RETURN in main program is an extension.
1117 (gfc_match_block_data): A space is required before a block data
1121 * primary.c (match_boz_constant): Call gfc_notify_std only if
1122 we actually have a non-standard boz-literal-constant.
1125 * expr.c (gfc_check_assign): Print ranks if incompatible. Issue
1126 warning if assigning NULL().
1128 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
1130 * f95-lang.c (set_block): Remove.
1131 (gfc_clear_binding_stack): New.
1132 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
1133 (struct binding_level): Remove block_created_by_back_end.
1134 (clear_binding_level): Likewise.
1135 (poplevel): Don't handle block_created_by_back_end.
1137 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1139 * trans-decl.c (gfc_create_module_variable): Nothing to do if
1140 symbol is in common, because we ...
1141 (gfc_generate_module_vars): Call gfc_trans_common.
1143 2004-07-10 Paul Brook <paul@codesourcery.com>
1145 * trans-array.c (gfc_build_null_descriptor): New function.
1146 (gfc_trans_static_array_pointer): Use it.
1147 * trans-array.h (gfc_build_null_descriptor): Add prototype.
1148 * trans-expr.c (gfc_conv_structure): Handle array pointers.
1150 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1153 * decl.c (gfc_match_save): Use-associated common block
1155 * gfortran.h (gfc_common_head): Add new field 'name'.
1156 Fix typo in comment after #endif.
1157 * match.c (gfc_get_common): Add new argument from_common,
1158 mangle name if flag is set, fill in new field in structure
1160 (match_common): Set new arg in call to gfc_get_common,
1161 use-associated common block doesn't collide.
1162 * match.h (gfc_get_common): Adapt prototype.
1163 * module.c (load_commons): Set new arg in call to
1165 * symbol.c (free_common_tree): New function.
1166 (gfc_free_namespace): Call new function.
1167 * trans-common.c (several functions): Remove argument
1168 'name', use name from gfc_common_head instead.
1170 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1172 * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
1173 and RHS match. Return early if the RHS is NULL().
1176 * match.c (match_common): Fix error reporting for used common.
1179 * trans-expr.c (gfc_conv_structure): Handle initialization
1180 of scalar pointer components.
1182 * parse.c (decode_statement): Fix matching of BLOCK DATA.
1184 * trans-decl.c (generate_local_decl): Remove workaround obsoleted
1185 by fix for PR 15481.
1187 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1189 * trans-common.c: Fix whitespace issues, make variable names
1191 (create_common): Additionally, make loop logic more obvious.
1193 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1194 Paul Brook <paul@codesourcery.com>
1197 * trans-common.c (calculate_length): Remove ...
1198 (get_segment_info): Merge into here. Save field type.
1199 (build_field): Use saved type.
1200 (create_common, new_condition, new_segment, finish_equivalences):
1201 Use new get_segment_info.
1202 * trans-types.c: Update comment.
1204 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1207 * moduele.c (mio_symbol): Don't I/O initial values unless
1208 symbol is a parameter.
1210 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1213 * resolve.c (resolve_symbol): Verify that the shape of a
1214 parameter array is not only explicit, but also constant.
1215 * array.c (gfc_is_compile_time_shape): New function.
1216 * gfortran.h (gfc_is_compile_time_shape): Add prototype.
1218 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1224 * module.c (write_symbol, write_symtree): Remove workaround.
1225 * primary.c (match_actual_arglist): Enhance comment.
1226 (gfc_match_rvalue): Handle function call with first argument
1227 a keyword argument correctly.
1228 * resolve.c (resolve_symbol): Change call to
1229 gfc_set_default_type to issue error if no implicit type
1231 * trans-decl.c (gfc_create_module_variable): Remove workaround.
1233 2004-07-08 Paul Brook <paul@codesourcery.com>
1235 * intrinsic.c (add_sym_4s): New function.
1236 (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
1238 2004-07-04 Janne Blomqvist <jblomqvi@cc.hut.fi>
1239 Paul Brook <paul@codesourcery.com>
1243 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
1244 GFC_ISYM_COMMAND_ARGUMENT_COUNT.
1245 * intrinsic.c (add_functions): Identify iargc. Add
1246 command_argument_count.
1247 (add_subroutines): Resolve getarg. Add get_command and
1248 get_command_argument.
1249 * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
1250 gfc_resolve_get_command_argument): Add prototypes.
1251 * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
1252 gfc_resolve_get_command_argument): New functions.
1253 * trans-decl.c (gfor_fndecl_iargc): New variable.
1254 (gfc_build_intrinsic_function_decls): Set it.
1255 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
1256 (gfc_conv_intrinsic_function): Use it.
1257 * trans.h (gfor_fndecl_iargc): Declare.
1259 2004-07-04 Matthias Klose <doko@debian.org>
1261 * Make-lang.in: Generate and install gfortran man page.
1262 * invoke.texi: Remove extra '@c man end'.
1264 2004-07-04 Richard Henderson <rth@redhat.com>
1266 * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
1268 2004-07-04 Paul Brook <paul@codesourcery.com>
1270 * decl.c (gfc_match_implicit_range): Don't use typespec.
1271 (gfc_match_implicit): Handle character selectors.
1272 * gfortran.h (gfc_set_implicit): Remove prototype.
1273 (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
1274 * parse.c (accept_statement): Don't call gfc_set_implicit.
1275 * symbol.c (new_ts): Remove.
1276 (gfc_set_implicit_none): Use same loop bounds as other functions.
1277 (gfc_set_implicit): Remove.
1278 (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
1279 (gfc_merge_new_implicit): Combine with gfc_set_implicit.
1281 2004-06-30 Richard Henderson <rth@redhat.com>
1283 * match.c (var_element): Remove unused variable.
1285 * trans-decl.c (gfc_generate_function_code): Don't set
1286 x_whole_function_mode_p.
1287 (gfc_generate_constructors): Likewise.
1289 2004-06-30 Richard Henderson <rth@redhat.com>
1291 * trans-decl.c (gfc_generate_function_code): Don't set
1292 immediate_size_expand.
1293 (gfc_generate_constructors): Likewise.
1295 2004-06-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1298 * decl.c (gfc_match_type_spec): Rename second argument to
1299 'implicit_flag', reverse meaning. Don't match_char_spec if
1300 'implicit_flag' is set. Rename to ...
1301 (match_type_spec): ... this.
1302 (gfc_match_implicit_none, match_implicit_range): Move here
1304 (gfc_match_implicit): Move here from match.c, try to
1305 match_char_len if match_implicit_range doesn't succeed for
1306 CHARACTER implicits. Call renamed fucntion match_type_spec.
1307 (gfc_match_data_decl, match_prefix): Call renamed function
1309 * match.c (gfc_match_implicit_none, match_implicit_range,
1310 gfc_match_implicit): Move to decl.c.
1311 * match.h (gfc_match_implicit_none, gfc_match_implicit):
1312 Move protoypes to section 'decl.c'.
1313 (gfc_match_type_spec): Remove prototype.
1315 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1317 * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
1320 2004-06-29 Steven Bosscher <stevenb@suse.de>
1322 Make sure types in assignments are compatible. Mostly mechanical.
1323 * trans-const.h (gfc_index_one_node): New define.
1324 * trans-array.c (gfc_trans_allocate_array_storage,
1325 gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
1326 gfc_trans_array_constructor_value, gfc_trans_array_constructor,
1327 gfc_conv_array_ubound, gfc_conv_array_ref,
1328 gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
1329 gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
1330 gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
1331 gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
1332 types in assignments, conversions and conditionals for expressions.
1333 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
1334 gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
1335 gfc_conv_function_call, gfc_trans_pointer_assignment,
1336 gfc_trans_scalar_assign): Likewise.
1337 * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
1338 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
1339 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
1340 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
1341 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
1342 gfc_conv_allocated, gfc_conv_associated,
1343 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
1344 * trans-io.c (set_string): Likewise.
1345 * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
1346 gfc_do_allocate, generate_loop_for_temp_to_lhs,
1347 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
1348 compute_overall_iter_number, gfc_trans_assign_need_temp,
1349 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
1350 gfc_evaluate_where_mask, gfc_trans_where_assign,
1351 gfc_trans_where_2): Likewise.
1352 * trans-types.c (gfc_get_character_type, gfc_build_array_type,
1353 gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
1355 * trans.c (gfc_add_modify_expr): Add sanity check that types
1356 for the lhs and rhs are the same for scalar assignments.
1358 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1360 * dump-parse-tree.c (show_common): New function.
1361 (gfc_show_namespace): Show commons.
1363 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1364 Andrew Vaught <andyv@firstinter.net>
1368 * decl.c (gfc_match_save): Adapt to new common structures,
1369 don't allow saving USE-associated common.
1370 * dump-parse-tree (gfc_show_attr): (saved_)common are not
1371 symbol attributes any longer.
1372 (gfc_show_symbol): Don't show old-style commons any longer.
1373 (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
1375 * gfortran.h (symbol_attribute): Remove common and saved_common
1377 (gfc_symbol): Remove common_head element.
1378 (gfc_common_head): New struct.
1379 (gfc_get_common_head): New macro.
1380 (gfc_symtree): Add field 'common' to union.
1381 (gfc_namespace): Add field 'common_root'; change type of field
1382 'blank_common' to blank_common.
1383 (gfc_add_data): New prototype.
1384 (gfc_traverse_symtree): Expect a symtree as first argument
1385 instead of namespace.
1386 * match.c (gfc_get_common): New function.
1387 (match_common_name): Change to take char * as argument, adapt,
1388 fix bug with empty name.
1389 (gfc_match_common): Adapt to new data structures. Disallow
1390 redeclaration of USE-associated COMMON-block. Fix bug with
1392 (var_element): Adapt to new common structures.
1393 * match.h (gfc_get_common): Declare.
1394 * module.c: Add 2004 to copyright years, add commons to module
1395 file layout description.
1396 (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
1397 for removed attributes.
1398 (mio_symbol): Adapt to new way of storing common relations.
1399 (load_commons): New function.
1400 (read_module): Skip common list on first pass, load_commons at
1402 (write_commons): New function.
1403 (write_module): Call write_commons().
1404 * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
1405 functions related to removed attributes.
1406 (gfc_add_data): New function.
1407 (gfc_clear_attr): Don't set removed attributes.
1408 (gfc_copy_attr): Don't copy removed attributes.
1409 (traverse_symtree): Remove.
1410 (gfc_traverse_symtree): Don't traverse symbol
1411 tree of the passed namespace, but require a symtree to be passed
1412 instead. Unify with traverse_symtree.
1413 (gfc_traverse_ns): Call gfc_traverse_symtree according to new
1415 (save_symbol): Remove setting of removed attribute.
1416 * trans-common.c (gfc_sym_mangled_common_id): Change to
1417 take 'char *' argument instead of 'gfc_symbol'.
1418 (build_common_decl, new_segment, translate_common): Adapt to new
1419 data structures, add new
1421 (create_common): Adapt to new data structures, add new
1422 argument name. Fix typo in intialization of derived types.
1423 (finish_equivalences): Add second argument in call to
1425 (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
1426 (gfc_trans_common): Adapt to new data structures.
1427 * trans-decl.c (gfc_create_module_variables): Remove test for
1430 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1432 * io.c: Add 2004 to copyright years.
1434 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1435 Andrew Vaught <andyv@firstinter.net>
1437 * gfortran.h (gfc_gsymbol): New typedef.
1438 (gfc_gsym_root): New variable.
1439 (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
1440 * parse.c (global_used): New function.
1441 (parse_block_data): Check for double empty BLOCK DATA,
1442 use global symbol table.
1443 (parse_module): Use global symbol table.
1444 (add_global_procedure, add_global_program): New functions.
1445 (gfc_parse_file): Use global symbol table.
1446 * symbol.c (gfc_gsym_root): New variable.
1447 (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
1450 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1452 * module.c (mio_gmp_real): Correct writing of negative numbers.
1454 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1457 * expr.c (check_intrinsic_op): Allow comparison of characters.
1460 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1461 Andrew Vaught <andyv@firstinter.net>
1463 * decl.c (contained_procedure): New function.
1464 (match_end): Verify correctness of END STATEMENT in
1467 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1468 Andrew Vaught <andyv@firstinter.net>
1471 * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
1472 (decode_statement): Enforce required space in free-form.
1474 2004-06-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1476 * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
1477 * trans-array.c (gfc_conv_descriptor_data): Add operand
1479 (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
1480 (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
1481 (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
1482 * trans-common.c (create_common): Likewise.
1483 * trans-expr.c (gfc_conv_component_ref): Likewise.
1484 * trans-io.c (set_parameter_value): Likewise.
1485 (set_parameter_ref, set_string, set_flag, io_result): Likewise.
1486 (transfer_expr): Likewise.
1487 * trans-decl.c (gfc_trans_auto_character_variable):
1488 Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
1489 (gfc_gimplify_function): New function.
1490 (gfc_generate_function-code): Properly handle nested functions.
1491 * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
1493 2004-06-22 Janne Blomqvist <jblomqvi@cc.hut.fi>
1496 * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
1497 (gfc_resolve_inquire): Resolve the iolength tag. Return
1498 SUCCESS at end of function if no failure has occured.
1499 * resolve.c (resolve_code): Resolve if iolength is encountered.
1500 * trans-io.c: (ioparm_iolength, iocall_iolength,
1501 iocall_iolength_done): New variables.
1502 (last_dt): Add IOLENGTH.
1503 (gfc_build_io_library_fndecls ): Set iolength related variables.
1504 (gfc_trans_iolength): Implement.
1505 (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
1507 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de
1510 * scanner.c (load_line): Don't truncate preprocessor lines.
1511 Reformat error message.
1512 (preprocessor_line): Issue warning in case of malformed
1515 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1517 * resolve.c (resolve_symbol): Add comment in function body.
1518 (check_data_variable): Change type of mark to ar_type, adapt code
1521 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1523 * array.c (gfc_insert_constructor): Avoid redundant call to
1524 mpz_comp. Add 2004 to copyright years.
1526 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
1528 * trans.h (stmtblock_t): Change has_scope to unsigned int.
1530 2004-06-20 Steven G. Kargl <kargls@comcast.net>
1532 * arith.c (gfc_range_check): correct complex underflow.
1534 2004-06-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1537 * match.c (match_case_selector): Call gfc_match_init_expr
1538 instead of gfc_match_expr.
1539 * resolve.c (validate_case_label_expr): No need to check for
1540 constant, since it wouldn't have been matched with the fix to
1543 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1546 * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
1549 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1552 * trans-deecl.c (generate_local_decl): Do not issue warning for
1553 unused variables if they're use associated.
1555 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1556 Andrew Vaught <andyv@firstinter.net>
1559 * gfortran.h (gfc_check_f): Add new field f3ml.
1560 * check.c (gfc_check_minloc_maxloc): Take argument list instead
1561 of individual arguments, reorder if necessary.
1562 * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
1563 * intrinsic.c (add_sym_3ml): New function.
1564 (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
1565 (check_specific): Catch special case MINLOC, MAXLOC.
1567 2004-06-14 Paul Brook <paul@codesourcery.com>
1569 * intrinsic.c (add_sym_2s): Use correct function types.
1571 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1573 * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize. Move data.c
1574 * data.c (gfc_get_section_index): Remove dependency on trans.h.
1576 2004-06-12 Steven G. Kargl <kargls@comcast.net>
1578 * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
1579 gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
1580 * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
1581 GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
1582 * trans-intrinsic.c: Use symbols.
1583 * intrinsic.c (add_sym_2s): New function.
1584 * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
1585 * intrinsic.h: Function prototypes.
1586 * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
1587 gfc_resolve_srand): New functions.
1589 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1592 * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
1593 contained procedure.
1595 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1598 * interface.c (compare_parameter, compare_actual_formal): Don't
1599 check types and array shapes for NULL()
1600 * trans-expr.c (conv_function_call): No double indirection for
1603 2004-06-09 Toon Moene <toon@moene.indiv.nluug.nl>
1605 * trans-expr.c (gfc_conv_cst_int_power): Compute
1606 x**(-n) by converting it to (1/x)**n instead of
1609 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1612 * module.c (write_symbol, write_symtree): Don't write symbols
1613 wrongly added to namespace.
1614 * trans-decl.c (gfc_create_module_variable): Don't create a
1615 backend decl for a symbol incorrectly added to namespace.
1617 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1620 * resolve.c (resolve_symbol): Verify that parameter array has an
1621 explicit shape. Fix typos and coding style issues in surrounding
1624 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1627 * gfortran.texi: The documentation doesn't contain infomration on
1628 how to report bugs, and shouldn't, so remove the line which
1631 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1633 * intrinsic.c (sort_actual): Keep track of type of missing
1634 arguments. (Missing from previous commit.)
1636 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1638 * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
1639 * interface.c (compare_actual_formal): Keep type of omitted
1641 * trans-expr.c (gfc_conv_function_call): Add string length
1642 argument for omitted string argument.
1644 2004-06-03 Paul Brook <paul@codesourcery.com>
1646 * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
1647 lists instead of compound expr chains.
1648 (gfc_trans_code): Annotate statement lists.
1650 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1652 * trans-array.c: Fix spelling in comments.
1654 2004-06-02 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1657 * data.c (assign_substring_data_value): New function.
1658 (gfc_assign_data_value): Call the new function if we're dealing
1659 with a substring LHS.
1661 2004-06-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1664 * gfortran.h (GFC_VERSION): Remove.
1665 * gfortran.texi (version-gfortran): Remove, replace by version-GCC
1668 2004-05-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1670 * trans-types.c: Fix spelling & layout in comments.
1672 2004-05-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1675 * trans-const.c (gfc_conv_string_init): Allow variable string
1676 length lower than initialization string length.
1678 2004-05-30 Paul Brook <paul@codesourcery.com>
1681 * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
1682 * trans-expr.c (gfc_trans_string_copy): New function.
1683 (gfc_conv_statement_function): Use them. Create temp vars. Enforce
1685 (gfc_conv_string_parameter): Use gfc_trans_string_copy.
1686 * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
1687 * trans.h (struct gfc_saved_var): Define.
1688 (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
1690 2004-05-30 Steven G. Kargl <kargls@comcast.net>
1692 * iresolve.c (gfc_resolve_random_number): Clean up conditional.
1694 2004-05-29 Steven G. Kargl <kargls@comcast.net>
1696 * simplify.c (gfc_simplify_log): Remove useless line of code.
1698 2004-05-29 Paul Brook <paul@codesourcery.com>
1700 * trans-common.c (find_equivalence): Find multiple rules.
1702 2004-05-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1704 * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
1705 (gfc_current_locus): Declare new global variable.
1706 * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
1707 (gfc_current_locus1): Rename ...
1708 (gfc_current_locus): ... to this.
1709 (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
1710 skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
1711 gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
1712 gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
1713 and gfc_current_locus(), respectively.
1714 * array.c (match_subscript, gfc_match_array_ref, match_array_list,
1715 match_array_cons_element, gfc_match_array_constructor):
1716 Read/modify gfc_current_locus instead of calling gfc_set_locus()
1717 and gfc_current_locus().
1718 * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
1719 match_attr_spec, gfc_match_function_decl, gfc_match_end,
1720 attr_decl1, gfc_match_save): Likewise.
1721 * error.c (error_print, gfc_internal_error): Likewise.
1722 * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
1723 * interface.c (gfc_add_interface): Likewise.
1724 * io.c (gfc_match_format, match_dt_format, match_dt_element,
1725 match_io_iterator, match_io): Likewise.
1726 * match.c (gfc_match_space, gfc_match_eos,
1727 gfc_match_small_literal_int, gfc_match_st_label,
1728 gfc_match_strings, gfc_match_name, gfc_match_iterator,
1729 gfc_match_char, gfc_match, gfc_match_assignment,
1730 gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
1731 gfc_match_nullify, gfc_match_call, match_implicit_range,
1732 gfc_match_implicit, gfc_match_data, match_case_selector,
1733 gfc_match_case, match_forall_iterator): Likewise.
1734 * matchexp.c (gfc_match_defined_op_name, next_operator,
1735 match_level_1, match_mult_operand, match_ext_mult_operand,
1736 match_add_operand, match_ext_add_operand, match_level_2,
1737 match_level_3, match_level_4, match_and_operand, match_or_operand,
1738 match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
1739 * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
1740 * parse.c (match_word, decode_statement, next_free, next_fixed,
1741 add_statement, verify_st_order, parse_if_block, gfc_parse_file):
1743 * primary.c (match_digits, match_integer_constant,
1744 match_boz_constant, match_real_constant, match_substring,
1745 next_string_char, match_charkind_name, match_string_constant,
1746 match_logical_constant, match_const_complex_part,
1747 match_complex_constant, match_actual_arg, match_keyword_arg,
1748 gfc_match_actual_arglist, gfc_match_structure_constructor,
1749 gfc_match_rvalue, gfc_match_variable): Likewise.
1750 * st.c (gfc_get_code): Likewise.
1751 * symbol.c (check_conflict, check_used, check_done,
1752 duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
1753 gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
1754 gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
1756 2004-05-26 Roger Sayle <roger@eyesopen.com>
1758 * io.c (format_asterisk): Silence compiler warnings by correcting
1759 the number of elements of a "locus" initializer.
1761 2004-05-25 Roger Sayle <roger@eyesopen.com>
1764 * matchexp.c: Allow unary operators after arithmetic operators
1766 (match_ext_mult_operand, match_ext_add_operand): New functions.
1767 (match_mult_operand): Tweak to call match_ext_mult_operand.
1768 (match_add_operand): Tweak to call match_ext_mult_operand.
1769 (match_level_2): Rearrange to call match_ext_add_operand.
1771 2004-05-25 Paul Brook <paul@codesourcery.com>
1773 * expr.c (check_inquiry): Remove bogus tests.
1775 2004-05-23 Paul Brook <paul@codesourcery.com>
1778 * expr.c (restricted_args): Remove redundant checks/argument.
1779 (external_spec_function): Update to match.
1780 (restricted_intrinsic): Rewrite.
1782 2004-05-23 Paul Brook <paul@codesourcery.com>
1783 Victor Leikehman <lei@haifasphere.co.il>
1785 * gfortran.h (struct gfc_symbol): Add equiv_built.
1786 * trans-common.c: Change int to HOST_WIDE_INT. Capitalize error
1788 (current_length): Remove.
1789 (add_segments): New function.
1790 (build_equiv_decl): Create initialized common blocks.
1791 (build_common_decl): Always add decl to bindings.
1792 (create_common): Create initializers.
1793 (find_segment_info): Reformat to match coding conventions.
1794 (new_condition): Use add_segments.
1795 (add_condition, find_equivalence, add_equivalences): Move iteration
1796 inside functions. Only process each segment once.
1797 (new_segment, finish_equivalences, translate_common): Simplify.
1799 2004-05-23 Steven G. Kargl <kargls@comcast.net>
1801 * check.c (gfc_check_random_seed): Issue for too many arguments.
1803 2004-05-22 Steven G. Kargl <kargls@comcast.net>
1805 * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
1807 2004-05-22 Paul Brook <paul@codesourcery.com>
1809 * dump-parse-tree.c (gfc_show_equiv): New function.
1810 (gfc_show_namespace): Use it.
1812 2004-05-22 Victor Leikehman <lei@haifasphere.co.il>
1815 * symbol.c (gfc_add_common): Disable checks to work around other more
1816 fundamental inadequacies.
1818 2004-05-22 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1820 * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
1822 (gfc_build_function_decl): Likewise.
1824 2004-05-22 Steven G. Kargl <kargls@comcast.net>
1826 * check.c (gfc_check_system_clock): New function.
1827 * intrinsic.c (add_sym_3s): New function.
1828 (add_subroutines): Use it.
1829 * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
1831 * iresolve.c (gfc_resolve_system_clock): New function.
1833 2004-05-22 Steven G. Kargl <kargls@comcast.net>
1835 * invoke.texi: Document -Wunderflow and spell check.
1836 * lang.opt: Add Wunderflow.
1837 * gfortran.h (gfc_option_t): Add warn_underflow option.
1838 * options.c (gfc_init_options, set_Wall): Use it.
1839 * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
1840 * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
1841 gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
1842 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
1843 * arith.c (common_logarithm): Fix typo in comment.
1845 2004-05-21 Roger Sayle <roger@eyesopen.com>
1847 * io.c (check_format): As a GNU extension, allow the comma after a
1848 string literal to be optional in a format. Use gfc_notify_std to
1849 issue an error/warning as appropriate.
1851 2004-05-21 Roger Sayle <roger@eyesopen.com>
1853 * io.c (check_format): Use gfc_notify_std to determine whether to
1854 issue an error/warning for omitting the digits from the X format.
1856 2004-05-20 Roger Sayle <roger@eyesopen.com>
1858 * io.c (check_format): Allow the number before the X format to
1859 be optional when not -pedantic.
1861 2004-05-18 Feng Wang <fengwang@nudt.edu.cn>
1862 Paul Brook <paul@codesourcery.com>
1864 * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
1865 Create decls for __builtin_pow{,f}.
1866 * gfortran.h (PREFIX_LEN): Define.
1867 * trans-decl.c (gfor_fndecl_math_powi): Add.
1868 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
1869 (gfc_build_intrinsic_function_decls): Create decls for powi.
1870 * trans-expr.c (powi_table): Add.
1871 (gfc_conv_integer_power): Remove.
1872 (gfc_conv_powi): New function.
1873 (gfc_conv_cst_int_power): New function.
1874 (gfc_conv_power_op): Use new powi routines.
1875 * trans.h (struct gfc_powdecl_list): Add.
1876 (gfor_fndecl_math_powi): Add.
1877 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
1879 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1881 * trans.c, trans-decl.c: Fix comment typos.
1883 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1885 * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
1887 2004-05-18 Steve Kargl <kargls@comcast.net>
1889 * arith.c (gfc_int2complex): Fix incorrect range checking.
1891 2004-05-18 Paul Brook <paul@codesourcery.com>
1894 * decl.c (add_init_expr_to_sym): Remove incorrect check.
1895 (default_initializer): Move to expr.c.
1896 (variable_decl): Don't assign default initializer to variables.
1897 * expr.c (gfc_default_initializer): Move to here.
1898 * gfortran.h (gfc_default_initializer): Add prototype.
1899 * resolve.c (resolve_symbol): Check for illegal initializers.
1900 Assign default initializer.
1902 2004-05-17 Steve Kargl <kargls@comcast.net>
1904 * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
1906 2004-05-17 Steve Kargl <kargls@comcast.net>
1908 * arith.c (gfc_real2complex): Range checking wrong part of complex
1911 2004-05-16 Paul Brook <paul@codesourcery.com>
1913 * options.c (gfc_handle_module_path_options): Fix buffer overrun.
1915 2004-05-16 Paul Brook <paul@codesourcery.com>
1917 * arith.c (gfc_range_check): Fix logic error.
1919 2004-05-16 Steve Kargl <sgk@troutmask.apl.washington.edu>
1921 * arith.c: Fix comment typos.
1923 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1926 * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
1927 not initialized in a disallowed fashion.
1928 * match.c (gfc_match_common): Likewise.
1929 (var_element): Verify that variable is not in the blank COMMON,
1930 if it is in a common.
1932 2004-05-15 Joseph S. Myers <jsm@polyomino.org.uk>
1934 * Make-lang.in (f95.generated-manpages): Remove.
1935 (f95.srcextra): New.
1936 (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
1937 f95.maintainer-clean): Generate info and dvi files in objdir/doc.
1940 (f95.install-info): Remove.
1941 (install-info): New.
1943 2004-05-15 Victor Leikehman <lei@haifasphere.co.il>
1945 * decl.c (add_init_expr_to_sym): Check for variable size arrays.
1947 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1949 * primary.c (match_boz_constant): Use gfc_notify_std() for
1950 issuing a warning or an error.
1952 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1955 * primary.c (match_structure_constructor): Rename ...
1956 (gfc_match_structure_constructor): ... to this. Make non-static.
1957 (gfc_match_rvalue): Call renamed function.
1958 * match.h (gfc_match_structure_constructor): Declare.
1959 * match.c (gfc_match_data_constant): Handle structure
1962 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1966 * gfortran.h (gfc_linebuf): New typedef.
1968 (gfc_file): Revamped, use new gfc_linebuf.
1969 (locus): Revamped, use new types.
1970 (gfc_current_file): Remove.
1971 (gfc_current_form, gfc_source_file): New global variables.
1972 * match.c (gfc_match_space, gfc_match_strings): Use
1973 gfc_current_form to find source form.
1974 * module.c (gfc_dump_module): Use gfc_source_file when printing
1976 * error.c (show_locus, show_loci) Use new data structures to print
1978 * scanner.c (first_file, first_duplicated_file, gfc_current_file):
1980 (file_head, current_file, gfc_current_form, line_head, line_tail,
1981 gfc_current_locus1, gfc_source_file): New global variables.
1982 (gfc_scanner_init1): Set new global variables.
1983 (gfc_scanner_done1): Free new data structures.
1984 (gfc_current_locus): Return pointer to gfc_current_locus1.
1985 (gfc_set_locus): Set gfc_current_locus1.
1986 (gfc_at_eof): Set new variables.
1987 (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
1988 to new locus structure.
1989 (gfc_check_include): Remove.
1990 (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
1991 (gfc_skip_comments): Use gfc_current_form, find locus with
1993 (gfc_next_char): Use gfc_current_form.
1994 (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
1995 (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
1997 (get_file): New function.
1998 (preprocessor_line, include_line): New functions.
1999 (load_file): Move down, rewrite to match new data structures.
2000 (gfc_new_file): Rewrite to match new data structures.
2001 * parse.c (next_statement): Remove code which is now useless. Use
2002 gfc_source_form and gfc_source_file where appropriate.
2003 * trans-decl.c (gfc_get_label_decl): adapt to new data structures
2004 when determining locus of frontend code.
2005 * trans-io.c (set_error_locus): Same.
2006 * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
2007 * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
2009 (all): Add missing initializers.
2011 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2013 * Make-lang.in (trans-common.o): Remove redundant dependency.
2014 (data.c): Replace object file name ...
2015 (data.o): ... by the correct one.
2017 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2019 * dump-parse-tree.c (gfc_show_array_ref): Print colon only
2020 for ranges when dumping array references.
2022 2004-05-14 Victor Leikehman <lei@haifasphere.co.il>
2024 * decl.c (variable_decl): Always apply default initializer.
2026 2004-05-08 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
2029 * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
2030 handle zero correctly.
2032 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2034 * match.c (gfc_match): Eliminate dead code.
2036 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2038 * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
2039 Detect bad continuation line in fixed form sources.
2041 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2044 * iresolve.c (gfc_resolve_nearest): Add new function.
2045 * intrinsic.h: ... declare it here.
2046 * intrinsic.c (add_functions): ... add it as resolving function
2049 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2052 * match.c (gfc_match_do): Allow infinite loops with
2053 label-do-stmt. Do not enforce space after comma.
2055 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2058 * parse.c (parse_interface): Allow empty INTERFACE, remove
2061 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2063 * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
2064 decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
2065 expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
2066 intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
2067 matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
2068 primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
2069 trans-array.c, trans-array.h, trans-common.c, trans-const.c,
2070 trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
2071 trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
2072 trans-types.h, trans.c, trans.h: Update copyright years and
2074 * data.c: Likewise, also removed two whitespace-only lines.
2075 * gfortranspec.c, lang.opt: Update copyright years.
2077 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2080 * trans-decl.c (generate_local_decl): Don't warn for unused
2081 variables which are in common blocks.
2083 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2085 * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
2086 trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
2087 trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
2089 2004-05-13 Victor Leikehman <lei@haifasphere.co.il>
2092 * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
2094 2004-05-13 Joseph S. Myers <jsm@polyomino.org.uk>
2096 * gfortran.texi: Use @table @emph instead of @itemize @emph.
2097 Remove "set DEVELOPMENT".
2098 (Compiling GFORTRAN): Remove.
2100 2004-05-09 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
2102 * array.c (match_subscript, match_array_ref): Add comments
2103 explaining argument 'init'.
2104 * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
2105 trans-expr.c, trans.c: Fix some typos in comments.
2106 * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
2107 * primary.c (match_digits, match_integer_constant): Add comment
2108 explaining signflag.
2110 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
2113 * primary.c: Include system.h and flags.h, needed for pedantic.
2114 (match_boz_constant): Allow "x" for hexadecimal constants, warn if
2117 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
2120 * match.c (match_data_constant): Handle case where
2121 gfc_find_symbol sets sym to NULL
2123 2004-04-28 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
2125 * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
2126 dependency on mathbuiltins.def
2128 2004-04-24 Victor Leikehman <lei@il.ibm.com>
2130 * trans-io.c (transfer_expr): Implemented recursive printing
2133 2004-04-24 Andrew Pinski <pinskia@physics.uc.edu>
2135 * gfortranspec.c: Do not include multilib.h.
2137 2004-04-24 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
2139 * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
2140 2004 to copyright years.
2141 * trans-expr.c, trans-decl.c: Comment update, we now generate
2142 GENERIC, not SIMPLE. Add 2004 to copyright years.
2144 2004-04-24 Paul Brook <paul@codesourcery.com>
2146 * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
2148 2004-04-24 Feng Wang <fengwang@nudt.edu.cn>
2151 * arith.c (gfc_arith_divide): Fix complex divide.
2153 2004-04-23 Andrew Pinski <pinskia@physics.uc.edu>
2155 * gfortranspec.c: Include the target headers.
2157 2004-04-18 Feng Wang <fengwang@nudt.edu.cn>
2161 * arith.c (arctangent2): New function.
2162 * arith.h (arctangent2): Add function prototype.
2163 * simplify.c (gfc_simplify_atan2): Use it.
2164 (gfc_simplify_log): Use it.
2166 2004-04-12 Diego Novillo <dnovillo@redhat.com>
2168 * fortran/f95-lang.c (gfc_expand_stmt): Remove.
2169 (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
2171 2004-04-11 Bud Davis <bdavis9659@comcast.net>
2174 * trans-io.c (build_dt): Change REC to value.
2176 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
2179 * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
2180 the real value when converting mpf to string.
2182 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
2185 * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
2188 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
2191 * simplify.c (simplify_min_max): Convert the type of the result.
2193 2004-04-11 Paul Brook <paul@codesourcery.com>
2195 * gfortran.texi: Use full target triplet.
2197 2004-04-11 Paul Brook <paul@codesourcery.com>
2199 * Make-lang.in (GFORTRAN_TEXI): Set it.
2200 (fortran/dfortran.dvi): Use it. Add fortran to include paths.
2201 (fortran/gfortran.info): Ditto.
2202 * gfortran.texi: Major update.
2203 * invoke.texi: New file.
2205 2004-04-10 Paul Brook <paul@codesourcery.com>
2207 * trans-array.c (gfc_trans_allocate_temp_array,
2208 gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
2209 * trans-decl.c (gfc_build_dummy_array_decl,
2210 gfc_get_symbol_decl, gfc_build_function_decl,
2211 gfc_create_module_variable): Ditto.
2212 * trans-expr.c (gfc_conv_variable): Ditto.
2213 * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
2214 * trans.h (GFC_DECL_STRING): Remove.
2215 (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
2216 GFC_DECL_ASSIGN): Renumber flags.
2218 2004-04-05 Paul Brook <paul@codesourcery.com>
2222 * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
2224 * gfortran.h (struct gfc_charlen): Add backend_decl.
2225 * trans-array.c (gfc_trans_allocate_temp_array,
2226 gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
2227 (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
2228 Remove old, broken string handling.
2229 (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
2230 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
2231 gfc_trans_deferred_array): Handle character arrays.
2232 * trans-const.c (gfc_conv_const_charlen): New function.
2233 * trans-const.h (gfc_conv_const_charlen): Add prototype.
2234 * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
2236 (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
2237 (gfc_create_string_length): New function.
2238 (gfc_get_symbol_decl): Create lengths for character variables.
2239 (gfc_get_fake_result_decl): Ditto.
2240 (gfc_build_function_decl): Only set length for assumed length
2241 character arguments.
2242 (gfc_trans_dummy_character): New function.
2243 (gfc_trans_auto_character_variable): Rewrite.
2244 (gfc_trans_deferred_vars): Handle more types of character variable.
2245 (gfc_create_module_variable): String lengths have moved.
2246 (gfc_generate_function_code): Initialize deferred var chain earlier.
2247 * trans-expr.c (gfc_conv_init_string_length): Rename ...
2248 (gfc_trans_init_string_length): ... to this.
2249 (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
2250 gfc_conv_function_call): Update to new format for character variables.
2251 (gfc_conv_string_length): Remove.
2252 (gfc_conv_string_parameter): Update assertion.
2253 * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
2254 * trans-io.c (set_string): Use new macro names.
2255 * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
2256 * trans-types.c (gfc_get_character_type): Use existing length expr.
2257 (gfc_is_nodesc_array): Make public.
2258 (gfc_get_dtype_cst): Rename ...
2259 (gfc_get_dtype): ... to this. Handle unknown size arrays.
2260 (gfc_get_nodesc_array_type): Use new name.
2261 (gfc_sym_type): New character variable code.
2262 (gfc_get_derived_type): Ditto.
2263 (gfc_get_function_type): Evaluate character variable lengths.
2264 * trans-types.h (gfc_strlen_kind): Define.
2265 (gfc_is_nodesc_array): Add prototype.
2266 * trans.h: Update prototypes.
2267 (struct lang_type): Update comments.
2268 (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
2269 (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
2271 2004-04-04 Paul Brook <paul@codesourcery.com>
2273 * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
2274 * options.c (gfc_init.options, gfc_handle_option): Ditto.
2275 * trans-expr.c (gfc_conv_function_call): Ditto.
2276 * trans-types.c (gfc_is_nodesc_array): Ditto
2277 * lang.opt (fg77-calls): Remove.
2279 2004-04-04 Paul Brook <paul@codesourcery.com>
2281 * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
2282 (gfc_conv_descriptor_base): Rename ...
2283 (gfc_conv_descriptor_offset): ... to this.
2284 (gfc_trans_allocate_array_storage): Set offset to zero.
2285 (gfc_conv_array_base): Rename ...
2286 (gfc_conv_array_offset): ... to this.
2287 (gfc_conv_array_index_ref): Add offset parameter.
2288 (gfc_conv_array_ref): Include offset.
2289 (gfc_trans_preloop_setup): Use existing offset.
2290 (gfc_trans_allocate_temp_array, gfc_array_allocate,
2291 gfc_trans_auto_array_allocation, gfc_trans_g77_array,
2292 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
2293 gfc_conf_ss_descriptor): Set offset.
2294 * trans-array.h: Rename prototypes.
2295 * trans-const.h (gfc_index_zero_node): Define.
2296 * trans-decl.c (gfc_build_qualified_array): Change base to offset.
2297 * trans-types.c (gfc_get_array_type_bounds): Ditto.
2298 (gfc_get_nodesc_array_type): Calculate offset before upper bound.
2300 2004-03-25 Diego Novillo <dnovillo@redhat.com>
2302 * convert.c (convert): Don't handle WITH_RECORD_EXPR.
2304 2004-03-24 Bud Davis <bdavis9659@comcast.net>
2307 * arith.c (gfc_convert_integer,gfc_convert_real): Removed leading '+'
2308 before conversion by gmp library call.
2310 2004-03-24 Bud Davis <bdavis9659@comcast.net>
2313 * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
2315 2004-02-24 Richard Henderson <rth@redhat.com>
2317 * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
2319 2004-02-19 Loren J. Rittle <ljrittle@acm.org>
2321 * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
2322 (fortran/gfortran.info): ... to here.
2325 2004-02-16 Richard Henderson <rth@redhat.com>
2327 * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
2328 * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
2329 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
2330 (gfc_expand_function): Rename from expand_function_body, make static,
2331 don't do anything except invoke tree_rest_of_compilation.
2332 (gfc_be_parse_file): Invoke cgraph.
2333 (gfc_expand_decl): Remove.
2334 (gfc_init_builtin_functions): Add __builtin_init_trampoline and
2335 __builtin_adjust_trampoline.
2336 * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
2337 (gfc_finalize): New.
2338 (gfc_generate_function_code): Use it. Lower nested functions.
2339 * trans-expr.c (gfc_conv_function_call): Add static chain operand
2341 * trans.c (gfc_build_function_call): Likewise.
2342 * trans.h (expand_function_body): Remove.
2344 2004-02-15 Victor Leikehman <lei@il.ibm.com>
2347 * trans-decl.c (gfc_build_function_decl) For functions
2348 returning CHARACTER pass an extra length argument,
2349 following g77 calling conventions.
2350 * trans-types.c (gfc_get_function_type) Ditto.
2351 * trans-expr.c (gfc_conv_function_call) Ditto.
2353 2004-02-14 Paul Brook <paul@codesourcery.com>
2355 * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
2357 2004-02-12 Paul Brook <paul@nowt.org>
2361 2004-02-08 Steve Kargl <sgk@troutmask.apl.washington.edu>
2363 * gfortran.texi: Fix typos.
2365 2004-02-07 Bud Davis <bdavis9659@comcast.net>
2368 * intrinsic.c (add_conversions) Use logical conversion instead
2370 * trans-types.c (gfc_get_logical_type) implemented logical*1
2373 2004-01-17 Paul Brook <paul@codesourcery.com>
2375 * lang-specs.h: Remove %<fixed-form.
2377 2004-01-15 Toon Moene <toon@moene.indiv.nluug.nl>
2379 * lang-specs.h: Enable preprocessing of source files
2380 ending in .F, .fpp, .FPP, .F90 and .F95.
2382 2004-01-13 Toon Moene <toon@moene.indiv.nluug.nl>
2385 * lang-specs.h: Enable compilation of files ending
2386 in .f, .for and .FOR.
2388 2004-01-11 Paul Brook <paul@codesourcery.com>
2390 * trans-stmt.c (gfc_trans_if_1): New function.
2391 (gfc_trans_if): Use it.
2393 2004-01-11 Erik Schnetter <schnetter@uni-tuebingen.de>
2395 * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
2396 (gfc_option_t): Add max_identifier_length.
2397 * lang.opt: Add fmax-identifier-length.
2398 * match.c (parse_name): Use limit.
2399 * options.c (gfc_init_options): Set max_identifier_length.
2400 (gfc_handle_option): Ditto.
2402 2004-01-11 Feng Wang <fengwang@nudt.edu.cn>
2404 * intrinsic.c (add_functions): Add resolve function to dcmplx.
2405 * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
2406 * iresolve.c (gfc_resolve_dcmplx): New function.
2408 2004-01-10 Paul Brook <paul@codesourcery.com>
2410 * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
2411 * trans-types.c (gfc_sym_type): Handle external dummy procedures.
2412 (gfc_return_by_reference): Correct condition.
2413 (gfc_get_function_type): Ditto.
2415 2004-01-10 Paul Brook <paul@codesourcery.com>
2417 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
2420 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
2422 * iresolve.c: Use correct kind.
2424 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
2427 * trans-decl.c (gfc_create_module_variable): Output array valued
2430 2004-01-10 Paul Brook <paul@codesourcery.com>
2432 * resolve.c (resolve_branch): Get error message right way round.
2434 2004-01-10 Canqun Yang <canqun@nudt.edu.cn>
2436 * trans-array (gfc_conv_loop_setup): Adjust comment to track
2438 (gfc_array_allocate): Don't count size of element twice.
2440 2004-01-04 Paul Brook <paul@codesourcery.com>
2442 * lang.opt (i8, r8, std=*): Remove RejectNegative.
2444 2004-01-04 Paul Brook <paul@codesourcery.com>
2446 * error.c (gfc_notify_std): New function.
2447 * gfortran.h (gfc_notify_std): Declare.
2448 (GFC_STD_*): Define.
2449 (gfc_option_t): Add warn_std and allow_std.
2450 * intrinsic.c (gfc_init_expr_extensions): Fix logic.
2451 (gfc_intrinsic_func_interface): Use gfc_notify_std.
2452 * check.c (check_rest): Use gfc_notify_std.
2453 * match.c (gfc_match_pause): Ditto.
2454 (gfc_match_assign): Ditto.
2455 (gfc_match_goto): Ditto.
2456 * resolve.c (resolve_branch): Ditto.
2457 * lang.opt: Add std=<foo> and w.
2458 * options.c (gfc_init_options): Set allow_std and warn_std.
2459 (gfc_handle_option): Handle OPT_std_* and OPT_w.
2461 2004-01-01 Paul Brook <paul@codesourcery.com>
2463 * array.c (gfc_append_constructor): Take constructor, not expression.
2464 * data.c (struct gfc_expr_stack): Remove.
2465 (expr_stack): Remove.
2466 (find_con_by_offset): Rename from find_expr_in_con.
2467 (find_con_by_component): Rename from find_component_in_con.
2468 (gfc_get_expr_stack): Remove.
2469 (gfc_assign_data_value): Rewrite.
2470 (gfc_expr_push): Remove.
2471 (gfc_expr_pop): Remove.
2472 (gfc_advance_section): Rename from
2473 gfc_modify_index_and_calculate_offset. Handle unbounded sections.
2474 (gfc_get_section_index): Handle unbounded sections.
2475 * gfortran.h: Update prototypes.
2476 * resolve.c (check_data_variable): Array section maight not be the
2479 2004-01-01 Paul Brook <paul@codesourcery.com>
2482 * resolve.c (resolve_symbol): Allow assumed length function results.
2484 2004-01-01 Steve Kargl <sgk@troutmask.apl.washington.edu>
2486 * match.c (gfc_match_pause): Fix spelling.
2488 2004-01-01 Steven Bosscher <stevenb@suse.de>
2491 * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
2492 reference from the expression.
2494 2003-12-26 Feng Wang <fengwang@nudt.edu.cn>
2496 * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
2498 * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
2499 (gfc_exec_op): New EXEC_LABEL_ASSIGN.
2500 (symbol_attribute):New variable attribute: assign.
2501 * io.c (resolve_tag):Integer variable is allowed.
2502 (match_dt_format): Add ASSIGN statement. Set assign flag.
2503 * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
2504 (gfc_match_assign): Add ASSIGN statement. Set assign flag.
2505 (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
2506 * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
2507 (next_statement): Add ST_LABEL_ASSIGNMENT.
2508 (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
2509 * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
2510 (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
2511 * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
2512 * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
2513 assign. Put them into the stuct lang_decl.
2514 * trans-io.c (set_string): Add the assign statement.
2515 * trans-stmt.c (gfc_trans_label_assign): New function.
2516 (gfc_trans_goto): Translate ASSIGNED GOTO statement.
2517 * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
2518 * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
2519 * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
2520 (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
2521 (GFC_DECL_ASSIGN(node)): New macro to access flag.
2523 2003-12-31 Huang Chun <chunhuang73@hotmail.com>
2526 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
2529 2003-12-22 Toon Moene <toon@moene.indiv.nluug.nl>
2531 * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
2532 that arguments to subroutines/functions can't alias themselves, nor global
2535 2003-12-20 Steven Bosscher <stevenb@suse.de>
2537 * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
2538 * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
2540 2003-12-12 Huang Chun <chunhuang73@hotmail.com>
2542 * primary.c (match_substring): Fix substring bug for start point
2543 or end point is NULL.
2544 * trans-expr.c (gfc_conv_substring): Ditto
2545 * trans-types.c (gfc_sym_type): Get correct type of scalar
2546 character variables.
2547 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
2550 2003-12-10 Richard Henderson <rth@redhat.com>
2552 * options.c (gfc_post_options): Don't ever use rtl inlining.
2554 2003-12-05 Canqun Yang <canqun@nudt.edu.cn>
2556 * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
2557 * trans-equivalence.c: Remove.
2558 * trans-decl.c (gfc_get_symbol_decl): Update to match.
2559 (gfc_generate_function_code): Ditto.
2560 * trans-array.c (gfc_conv_array_parameter): Ditto.
2561 * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
2562 (F95_ADDITIONAL_OBJS): Add stor-layout.o
2563 * trans.h (gfc_trans_equivalence): Remove.
2564 * gfortran.h (struct gfc_equiv): Add used field.
2565 (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
2566 equiv_offset fields.
2568 2003-12-05 Richard Henderson <rth@redhat.com>
2570 * trans.c (gfc_build_addr_expr): New.
2571 (gfc_build_indirect_ref, gfc_build_array_ref): New.
2572 * trans.h: Declare them.
2573 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
2574 trans-stmt.c, trans.c (*): Use them.
2576 * f95-lang.c (gfc_post_options): Remove dead prototype.
2577 * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
2578 * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
2581 2003-12-01 Feng Wang <fengwang@nudt.edu.cn>
2583 * io.c (gfc_match_format): Check for missing format label.
2585 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
2588 * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
2589 from interfaces in modules.
2591 2003-11-30 Paul Brook <paul@nowt.org>
2593 * trans-array.c (gfc_trans_g77_array): Make non-static.
2594 (gfc_trans_assumed_size): Remove.
2595 (gfc_trans_dummy_array_bias): Explicitly free temporary.
2596 * trans-array.h (gfc_trans_g77_array): Add prototype.
2597 (gfc_trans_assumed_size): Remove.
2598 * trans-decls.c (gfor_fndecl_push_context): Remove.
2599 (gfor_fndecl_pop_context): Remove.
2600 (gfc_build_function)decls): Don't create them.
2601 (gfc_trans_deferred_vars): Update to match. Remove dead code.
2602 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
2604 2003-11-30 Kejia Zhao <kejia_zh@nudt.edu.cn>
2606 * trans-array.c (gfc_conv_array_parameter): Simplify
2607 array argument passing for array name actual argument.
2608 * trans-expr.c (gfc_conv_function_call): Ditto
2609 * trans-types.c (gfc_is_nodesc_array):Ditto.
2611 2003-11-30 Paul Brook <paul@nowt.org>
2613 * f95-lang.c (gfc_post_options): Move ...
2614 * options.c (gfc_post_options): .. to here. Handle inlining options.
2615 * gfortran.h (gfc_post_options): Add prototype.
2617 2003-11-28 Richard Henderson <rth@redhat.com>
2619 * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
2621 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
2623 * trans.h (has_alternate_specifier): New global variable.
2624 * match.c (gfc_match_call): Handle actual arguments associated with
2625 alternate return indicators.
2626 * trans-expr.c (gfc_conv_function_call): Ditto
2627 * trans-stmt.c (gfc_trans_call): Ditto
2628 (gfc_trans_return): Handle return statement with value.
2629 * trans-decl.c (gfc_generate_function_code): Handle functions with
2631 (gfc_get_fake_result_decl): Ditto
2632 * trans-types.c (gfc_get_function_type): Ditto
2633 * resolve.c (resolve_actual_arglist): Check alternate return indicators.
2634 (resolve_formal_arglist): Check asterisk dummy.
2636 2003-11-27 Paul Brook <paul@nowt.org>
2638 * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
2639 allocation interface.
2640 (gfc_conv_ array_parameter): Ditto.
2641 (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
2642 * trans-array.c: Update prototype.
2643 * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
2644 (gfc_trans_auto_character_variable): Use new memory alloc interface.
2645 * trans-expr.c (gfc_conv_string_tmp): Ditto.
2646 (gfc_conv_function_call): Use gfc_conv_string_tmp.
2647 * trans-stmt.c (gfc_do_allocate): Use new memory alloc interface.
2648 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
2649 * trans.h (gfc_ss_info): Remove unused pdata field.
2650 * trans.c (gfc_create_var_np): Change T to V.
2652 2003-11-26 Richard Henderson <rth@redhat.com>
2654 * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
2655 * trans-intrinsic.c (gfc_intrinsic_map): ... here. Add SCALE,
2656 FRACTION, NEAREST, SET_EXPONENT.
2657 (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
2658 Fix GTY marking. Remove unnecessary const's.
2659 (LIBM_FUNCTION): Rename from I_LIB.
2660 (LIBF_FUNCTION): New.
2661 (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
2662 conventions. Assume the expr signature is correct. Mark const.
2663 (gfc_conv_intrinsic_exponent): Use library functions.
2664 (gfc_conv_intrinsic_set_exponent): Remove.
2665 (gfc_conv_intrinsic_scale): Remove.
2666 (gfc_conv_intrinsic_nearest): Remove.
2667 (gfc_conv_intrinsic_fraction): Remove.
2668 (gfc_conv_intrinsic_function): Update.
2669 * trans-decl.c (gfor_fndecl_math_exponent4): New.
2670 (gfor_fndecl_math_exponent8): New.
2671 (gfc_build_intrinsic_function_decls): Set them.
2672 * trans.h: Declare them.
2674 2003-11-25 Canqun Yang <canqun@nudt.edu.cn>
2676 * trans-common.c (gfc_layout_global_equiv): Locate the error for
2677 underflow COMMON block.
2678 (gfc_trans_one_common): Fix bug for size of COMMON block containing
2679 EQUIVALENCE object. Also fix typo in an error message.
2681 2003-11-25 Diego Novillo <dnovillo@redhat.com>
2683 * Make-lang.in: Add check-gfortran to lang_checks.
2684 (check-f95): Alias for check-gfortran.
2686 2003-11-25 Jason Merrill <jason@redhat.com>
2688 * Make-lang.in (f95.tags): Create TAGS.sub files in each
2689 directory and TAGS files that include them for each front end.
2691 2003-11-24 Paul Brook <paul@nowt.org>
2694 * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
2696 2003-11-24 Paul Brook <paul@nowt.org>
2698 * expr.c (simplify_const_ref): Return SUCCESS for things we don't
2700 * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
2702 2003-11-24 Paul Brook <paul@nowt.org>
2705 * array.c (gfc_array_ref_shape): Handle elemental dimensions.
2706 * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
2708 2003-11-20 Richard Henderson <rth@redhat.com>
2710 * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
2711 (gfc_conv_array_base): Likewise.
2712 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
2713 * trans-expr.c (gfc_conv_string_tmp): Likewise.
2714 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
2715 * trans-stmt.c (gfc_trans_character_select): Likewise.
2717 2003-11-13 Paul Brook <paul@nowt.org>
2719 * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
2721 2003-11-13 Canqun Yang <canqun@nudt.edu.cn>
2723 * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
2724 (resolve_equivalence): New function.
2725 (resolve_equivalence_derived): New function.
2727 2003-11-12 Richard Henderson <rth@redhat.com>
2729 * trans.c (gfc_trans_code): Use annotate_with_locus instead of
2730 annotate_all_with_locus.
2732 2003-11-11 Canqun Yang <canqun@nudt.edu.cn>
2734 * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
2735 * trans-decl.c (gfc_finish_var_decl): Modified.
2737 2003-11-08 Paul Brook <paul@nowt.org>
2740 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
2743 2003-11-06 Paul Brook <paul@nowt.org>
2745 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
2747 2003-11-02 Canqun Yang <canqun@nudt.edu.cn>
2749 * match.c (gfc_match_stopcode): Assign '0' to stop_code.
2751 2003-10-27 Anthony Green <green@redhat.com>
2753 * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
2754 (f95.stagefeedback): Ditto.
2756 2003-10-27 Andrew Pinski <pinskia@physics.uc.edu>
2759 * Make-lang.in (f95.stageprofile): Add.
2760 (f95.stagefeedback): Add.
2762 2003-10-23 Richard Henderson <rth@redhat.com>
2764 * f96-lang.c (gfc_gimplify_expr): Remove.
2765 (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
2766 (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
2768 2003-10-23 Richard Henderson <rth@redhat.com>
2770 * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
2772 2003-10-20 Paul Brook <paul@nowt.org>
2774 * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
2775 * trans-stmt.c (gfc_trans_do_while): Ditto.
2777 2003-10-17 Paul Brook <paul@nowt.org>
2779 * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
2781 2003-10-17 Paul Brook <paul@nowt.org>
2783 * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
2785 2003-10-17 Feng Wang <wf_cs@yahoo.com>
2787 * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
2788 (gfc_resolve_minloc): Ditto.
2789 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
2790 Return the value after subtracting the lower bound.
2792 2003-10-16 Richard Henderson <rth@redhat.com>
2794 * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
2796 2003-10-16 Steven Bosscher <steven@gcc.gnu.org>
2798 * lang.c: Remove -M option for now, it's in the way for C.
2800 2003-10-14 Jason Merrill <jason@redhat.com>
2802 * Make-lang.in (f95.tags): New rule.
2804 2003-10-13 Richard Henderson <rth@redhat.com>
2806 * trans.c (gfc_trans_code): Use annotate_all_with_locus.
2808 2003-10-13 Paul Brook <paul@nowt.org>
2810 * trans-decl.c (generate_local_decl): Don't create junk variables.
2812 2003-10-13 Paul Brook <paul@nowt.org>
2814 * resolve.c (resolve_formal_arglist): Use function result decl in
2815 preference to function decl.
2817 2003-10-12 Richard Henderson <rth@redhat.com>
2819 * f95-lang.c (gfc_define_builtin): New const_p argument. Set
2820 TREE_READONLY. Update all callers.
2822 2003-10-12 Feng Wang <wf_cs@yahoo.com>
2824 * iresolve.c (gfc_resolve_cshift): Change to match implementation.
2825 * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
2826 (gfc_is_intrinsic_libcall): Add CSHIFT.
2828 2003-10-12 Richard Henderson <rth@redhat.com>
2830 * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
2831 (gfc_trans_array_constructor_value): Likewise.
2832 (gfc_conv_array_initializer): Likewise.
2833 * trans-stmt.c (gfc_trans_character_select): Likewise.
2835 2003-11-12 Kejia Zhao <kejia_zh@yahoo.com.cn>
2837 * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
2839 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
2841 * check.c (gfc_check_repeat): Check arguments are scalar.
2842 (gfc_check_trim): New function.
2843 * intrinsic.h (gfc_check_trim): Add prototype.
2844 * intrinsic.c (add_functions): Use it.
2845 * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
2847 * trans-decl.c: Ditto.
2848 (gfc_build_intrinsic_fucntion_decls): Set them.
2849 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
2850 (gfc_conv_intrinsic_trim): New function.
2851 (gfc_conv_intrinsic_repeat): New function.
2852 (gfc_conv_intrinsic_function): Use them.
2854 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
2856 * trans-types.c (gfc_sym_type): Handle result variables.
2858 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
2860 * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
2861 gfc_get_character_type.
2863 2003-10-11 Feng Wang <wf_cs@yahoo.com>
2865 * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
2867 2003-10-11 Paul Brook <paul@nowt.org>
2869 * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
2870 (gfc_resolve_dprod): New function.
2871 (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
2872 * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
2873 (gfc_resolve_dprod): Declare.
2874 * intrinsic.c (add_functions): Use them.
2875 * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
2877 2003-10-06 Richard Henderson <rth@redhat.com>
2879 * f95-lang.c (gfc_init_builtin_functions): Add clzll.
2880 * trans-intrinsic.c (call_builtin_clz): Use it.
2882 2003-10-05 Paul Brook <paul@nowt.org>
2884 * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
2885 * trans-decl.c (gfc_generate_function_code): Set
2886 cfun->function_end_locus.
2888 2003-09-24 Jason Merrill <jason@redhat.com>
2890 * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
2893 2003-09-21 Lifang Zeng <zlf605@hotmail.com>
2894 Paul Brook <paul@nowt.org>
2896 * Make-lang.in (F95_OBJS): Add fortran/data.o.
2897 * array.c (gfc_inser_constructor): New function.
2898 (gfc_get_constructor): New function.
2899 (gfc_free_constructor): Initialize offset and repeat.
2900 (iterator_stack): Remove.
2901 (expand_info): Add offset, component and repeat fields.
2902 (expand_constructor): Set them.
2903 (expand): Set new fields.
2904 (gfc_copy_constructor): Ditto. Avoid recursion.
2905 * gfortran.h: Add prototypes for new functions.
2906 (gfc_constructor): Add offset, component and repeat.
2907 (iteratio_stack): Move to here.
2908 * resolve.c (check_data_variable): Convert data values into variable
2910 (traverse_data_list): Build implicit loop chain.
2911 (gfc_resolve): Ditto.
2912 * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
2913 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
2914 * trans-expr.c (gfc_conv_structure): Handle array initializers.
2915 (gfc_conv_expr): Update to match.
2916 * trans.h (gfc_conv_structure): Declare.
2919 2003-09-20 Kejia Zhao <kejia_zh@yahoo.com.cn>
2921 * trans.h: Add declarations for gfor_fndecl_si_kind and
2922 gfor_fndecl_sr_kind.
2923 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
2924 * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
2925 (g95_conv_intrinsic_sr_kind): New function.
2926 (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
2929 2003-09-17 Lars Segerlund <Lars.Segerlund@comsys.se>
2931 * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
2932 instead of _4 and _8 as postfix for libgfortran calls.
2934 2003-09-16 Paul Brook <paul@nowt.org>
2936 * array.c (compare_bounds): New function.
2937 (gfc_compare_array_spec): Use it.
2939 2003-09-14 Paul Brook <paul@nowt.org>
2941 * primary.c (gfc_match_rvalue): Make sure sym->result is set.
2942 * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
2944 2003-09-14 Paul Brook <paul@nowt.org>
2946 * check.c (dim_rank_check): Allow assumed bounds if requested.
2947 (gfc_check_lbound): Call it.
2948 (gfc_check_ubound): Ditto.
2949 (gfc_check_size): Change to match.
2950 * simplify.c (gfc_simplify_bound): New function.
2951 (gfc_simplify_lbound): New function.
2952 (gfc_simplify_ubound): New function.
2953 * intrinsic.h: Declare them.
2954 * intrinsic.c (add_functions): Use them.
2956 2003-09-14 Paul Brook <paul@nowt.org>
2958 * io.c (format_lex): Initialize negative_flag.
2959 (check_format): Intialize repeat.
2960 * trans-io.c (gfc_new_nml_name_expr): Declare static.
2961 (gfc_new_var_expr): Ditto.
2963 2003-09-14 Paul Brook <paul@nowt.org>
2965 * trans-array.c (gfc_conv_array_initializer): Handle derived types.
2966 * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
2968 2003-09-12 Paul Brook <paul@nowt.org>
2970 * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
2972 2003-09-12 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
2974 * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
2975 for a correct expression.
2977 2003-09-10 Kejia Zhao <kejia_zh@yahoo.com.cn>
2979 * trans-intrinsic.c (real_compnt_info): New struct.
2980 (prepare_arg_info): New function.
2981 (gfc_conv_intrinsic_set_exponent): New function.
2982 (gfc_conv_intrinsic_scale): New function.
2983 (gfc_conv_intrinsic_nearest): New function.
2984 (gfc_conv_intrinsic_fraction): New function.
2985 (gfc_conv_intrinsic_exponent): New function.
2986 (gfc_conv_intrinsic_spacing): New function.
2987 (gfc_conv_intrinsic_rrspacing): New function.
2988 (gfc_conv_intrinsic_function): Use them.
2990 2003-08-24 XiaoQiang Zhang (zhangapache@yahoo.com>
2992 * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
2993 build_int_2 changed from (high, low) to (low, high).
2994 * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
2995 ioparm_namelist_read_mode, iocall_set_nml_val_int,
2996 iocall_set_nml_val_float, iocall_set_nml_val_char,
2997 iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
2998 (gfc_build_io_library_fndecls): Add variable initialization.
2999 (gfc_new_nml_name_expr, get_new_var_expr): New function.
3000 (build_dt): Add namelist support.
3001 * io.c (value): New variable.
3002 (check_format): Support FMT_H now.
3004 2003-09-07 Paul Brook <paul@nowt.org>
3006 * io.c (gfc_resolve_dt): Error if format label is not defined.
3008 2003-09-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
3010 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
3011 about case_switch's break. The other is about building the condition
3012 statement tree, which judges the argument in the range of the
3013 corresponding integer type.
3014 * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
3015 for the large values.
3017 2003-09-05 Paul Brook <paul@nowt.org>
3019 * f95-lang.c (expand_function_body): Gimplify the function.
3021 2003-09-04 Jeff Law <law@redhat.com>
3023 * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
3026 2003-09-04 Paul Brook <paul@nowt.org>
3028 * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
3029 (gfc_expand_stmt): New function.
3030 (LANG_HOOKS_RTL_EXPAND_STMT): Define.
3031 (expand_function_body): Use tree_rest_of_compilation.
3032 * trans-decl.c (gfc_generate_function_code): Don't free cfun.
3034 2003-09-03 Jeff Law <law@redhat.com>
3036 * f95-lang.c (gfc_init_builtin_functions): C arrays start at
3039 2003-08-30 Paul Brook <paul@nowt.org>
3041 * f95-lang.c (builtin_function): Remove #if 0 code.
3042 (gfc_define_builtin): New function.
3043 (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
3044 * mathbuiltins.def: New file.
3045 * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
3046 (gfc_intrinsic_map): Use mathbuiltins.def.
3047 (gfc_intrinsic_builtin_t): Remove.
3048 (gfc_build_intrinsic_lib_fndecls): Update.
3049 * trans-types.c (gfc_init_types): Remove redundant initilaization of
3050 signed_size_type_node.
3052 2003-08-29 Paul Brook <paul@nowt.org>
3054 * arith.c (gfc_real_kinds): Use correct minimum exponents.
3056 2003-08-22 Kejia Zhao <kejia_zh@yahoo.com.cn>
3058 * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
3059 (gfc_conv_intrinsic_function): Add MODULO.
3061 2003-08-22 Jason Merrill <jason@redhat.com>
3063 * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
3065 2003-08-22 Andreas Jaeger <aj@suse.de>
3067 * Make-lang.in (f95.install-common): Add DESTDIR support.
3068 * (f95.install-info): Likewise.
3069 (f95.uninstall): Likewise.
3071 2003-08-19 Diego Novillo <dnovillo@redhat.com>
3073 * trans-types.c (gfc_init_types): Initialize
3074 signed_size_type_node with size_type_node.
3076 2003-08-18 Paul Brook <paul@nowt.org>
3078 * dependency.c (gfc_dependency): New enum.
3079 (check_another_array_ref): Remove.
3080 (gfc_get_array_from_component): Remove.
3082 (get_range): Remove.
3083 (get_no_of_elements): Use mpz_t, not mpf_t.
3084 (transform_sections): New function.
3085 (gfc_check_range_range): Rename ...
3086 (gfc_check_section_vs_section): ... to this. Use new function.
3087 (gfc_is_inside_range): Rewrite to match.
3088 (gfc_check_element_vs_section): Ditto.
3089 (gfc_check_element_vs_element): Ditto.
3091 (gfc_dep_resolver): Ditto. Remove unused parameter.
3092 * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
3093 gfc_check_element_vs_element, gfc_is_inside_range,
3094 gfc_get_array_from_component): Remove prototypes for static functions.
3095 (gfc_dep_resolver): Update prototype.
3096 * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
3098 2003-08-15 Paul Brook <paul@nowt.org>
3100 * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
3101 return values to parent scope.
3102 (gfc_build_dummy_array_decl): Ditto.
3104 2003-08-14 Paul Brook <paul@nowt.org>
3106 * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
3107 size of the type, not the pointer.
3108 * resolve.c (resolve_symbol): Give more accurate error message.
3110 2003-08-10 Paul Brook <paul@nowt.org>
3112 * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
3114 2003-08-10 Paul Brook <paul@nowt.org>
3116 * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
3119 2003-08-10 Chun Huang <compiler@sohu.com>
3121 * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
3122 (resolve_symbol): Ditto.
3123 * trans-expr.c (gfc_conv_statement_function): New function.
3124 (gfc_conv_function_expr): Use it.
3126 2003-08-10 Paul Brook <paul@nowt.org>
3128 * trans-array.c (gfc_conv_ss_startstride): Handle functions.
3129 (walk_function_expr): Set section rank.
3130 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
3132 2003-08-10 Paul Brook <paul@nowt.org>
3134 * intrinsic.c (add_sym): Prefix names with correct string.
3135 (add_sym_0s): New function.
3136 (add_subroutines): Register abort.
3138 2003-08-10 Erik Schnetter <schnetter@uni-tuebingen.de>
3140 * gfortran.h: Introduce options to control the mangling.
3141 * lang.opt: Likewise.
3142 * options.c (gfc_init_options): Handle the options.
3143 * trans-common.c (gfc_sym_mangled_common_id): New function.
3144 (gfc_build_common_decl): Call it.
3145 * trans-decl.c (gfc_sym_mangled_function_id): New function.
3146 (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
3148 2003-08-09 Paul Brook <paul@nowt.org>
3150 * module.c (mio_symbol): Always ouput a namespace for formal args.
3151 (load_needed): Namespace now belong to their proper symbol.
3152 (gfc_dump_module): Change G95=>GFORTRAN.
3154 2003-08-05 Paul Brook <paul@nowt.org>
3156 * options.c: Force -fg77-calls.
3158 2003-08-02 Paul Brook <paul@nowt.org>
3160 * Makelang.in: Rename G95_* to GFORTRAN_*.
3161 * All sources: Rename G95_* to GFC_*.
3163 2003-08-01 Paul Brook <paul@nowt.org>
3165 * fortran/Make-lang.in: Use GMPLIBS.
3166 * fortran/config-lang.in: Set need_gmp.
3167 * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
3169 2003-07-27 Andreas Jaeger <aj@suse.de>
3171 * trans-decl.c (gfc_generate_constructors): Convert prototype to
3173 * trans-const.c (gfc_init_constants): Likewise.
3174 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
3176 * gfortranspec.c: Convert to ISO C90.
3177 (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
3179 2003-07-26 Paul Brook <paul@nowt.org>
3181 * lang.opt: Add -fdump-parse-tree.
3182 * options.c (gfc_handle_option): Ditto.
3183 * resolve.c (resolve_forall_iterators): Convert to proper type.
3184 * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
3186 2003-07-26 Paul Brook <paul@nowt.org>
3188 * Makefile.in: Add build dependencies on files common with rest of gcc.
3190 2003-07-26 Lifang Zeng <zlf605@hotmail.com>
3192 * trans.h: Declare g95_trans_pointer_assignment.
3193 * trans-expr.c (g95_trans_pointer_assignment): New function.
3194 (g95_trans_pointer_assign): Use it.
3195 * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
3196 (g95_trans_pointer_assign_need_temp): New function.
3198 2003-07-26 Paul Brook <paul@nowt.org>
3200 * gfortran.texi: Replace references to g95.
3202 2003-07-26 Paul Brook <paul@nowt.org>
3204 Rename g95_* to gfc_*.
3206 2003-07-25 Paul Brook <paul@nowt.org>
3208 * gfortran.h: Rename from g95.h.
3209 * trans-types.c (boolean_type_node, booelan_true_node,
3210 boolean_false_node): Remove.
3211 * trans-types.h: Ditto.
3213 2003-07-25 Chun Huang <compiler@sohu.com>
3215 * parse.c (accept_statement): Implement BLOCK DATA statement.
3216 * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
3219 2003-07-24 Lifang Zeng <zlf605@hotmail.com>
3221 * trans-stmt.c (temporary_list): Define.
3222 (g95_trans_assign_need_temp): New function.
3223 (g95_trans_forall_1): Modified for WHERE.
3224 (g95_trans_where_assign): Modified.
3225 (g95_trans_where_2): Modified.
3226 (g95_evaluate_where_mask): Modified.
3227 (g95_trans_where): Modified.
3228 (g95_get_temp_expr): Removed.
3229 (g95_add_to_where_stmt_list): Removed.
3230 (compute_overall_iter_number): Modified for WHERE.
3231 * trans.h: Remove where_stmt_list.
3233 2003-07-24 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3235 * lang.opt: Correct description of options -J and -M.
3237 2003-07-23 Steven Bosscher <steven@gcc.gnu.org>
3239 * lang.opt: Move help text to here.
3240 * lang-options.h: Remove.
3242 2003-07-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3243 * iresolve.c (g95_resolve_transpose): Proper variable in switch.
3244 * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
3247 2003-07-22 Steven Bosscher <steven@gcc.gnu.org>
3248 Paul Brook <paul@nowt.org>
3250 * check.c (check_rest): Use global pedantic flag.
3251 * io.c (data_desc): Ditto.
3252 * error.c (g95_warning, g95_warning_now): Use global flag.
3253 * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
3254 (expand_function_body): Update to new prototypes.
3255 (g95_init): Use new option names.
3256 * g95.h (g95_option_t): Standardize names.
3257 (g95_init_options, g95_handle_option): Update prototypes.
3258 * interface.c: Use new option names.
3265 * simplify.c: Ditto.
3267 * trans-array.c: Ditto.
3268 * trans-expr.c: Ditto.
3269 * trans-types.c: Ditto.
3270 * trans-decl.c: Ditto.
3271 (g95_build_library_function_decl): Remove obsolete VPARAMS.
3273 * options.c (g95_display_help): Remove.
3274 (g95_init_options): Convert to new scheme.
3276 (g95module_option): Ditto, rename from g95_parse_arg.
3277 (g95_handle_module_path_options): New function.
3278 * trans-equivalence.c: Fix error message.
3279 * lang.opt: Corrections.
3281 2003-07-21 Steven Bosscher <steven@gcc.gnu.org>
3283 * lang.opt: New file.
3285 2003-07-21 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3287 * decl.c (match_attr_spec): Set colon_seen.
3289 2003-07-14 Paul Brook <paul@nowt.org>
3291 * trans-array.c: Update comment.
3292 (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
3293 * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
3294 minmaxloc,minmaxval): Ditto.
3295 * trans-io.c (g95_trans_transfer): Ditto.
3296 * trans-stmt.c: Remove unneeded prototypes.
3297 (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
3298 (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
3299 (compute_inner_temp_size): Remove bits of dead code. Add comments.
3300 Don't share loopinfo.
3301 (compute_overall_iter_number): Declare as static.
3302 (allocate_temp_for_forall_nest): Ditto.
3303 (g95_trans_forall_1): Don't pass shared loopinfo.
3304 * trans.c (g95_start_block): Expand comment.
3306 2003-07-12 Paul Brook <paul@nowt.org>
3308 * arith.c (g95_index_integer_kind): Remove unused initializer.
3309 * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
3310 index by size of element.
3311 (generate_loop_for_rhs_to_temp): Ditto.
3312 (allocate_temp_for_forall_nest): Use element size, not index size.
3314 2003-07-11 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3316 * arith.c (g95_index_integer_kind): Add a TODO.
3317 * simplify.c (g95_simplify_nearest): Add a TODO.
3319 2003-07-09 Chun Huang <compiler@sohu.com>
3321 * trans.h: Add declarations for gfor_fndecl_string_scan and
3322 gfor_fndecl_string_verify.
3323 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
3324 * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
3325 (g95_conv_intrinsic_verify): New function.
3326 (g95_conv_intrinsic_function): Add SCAN and VERIFY.
3327 * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
3328 of parameter 'BACK=.TRUE.'
3330 2003-07-05 Lifang Zeng <zlf605@hotmail.com>
3332 * trans-stmt.c (iter_info, forall_info): Define.
3333 (g95_trans_forall_block): Remove.
3334 (g95_trans_forall_loop): Use forall info blocks.
3335 (g95_trans_nested_forall_loop): New function.
3336 (g95_do_allocate): Handle things other than logical masks.
3337 (generate_loop_for_temp_to_lhs): New function.
3338 (generate_loop_for_rsh_to_temp): New function.
3339 (compute_inner_temp_size): New function.
3340 (compute_overall_iter_number): New function.
3341 (allocate_temp_for_forall_nest): New function.
3342 (g95_trans_forall): Move body ...
3343 (g95_trans_forall_1): ... to here. Handle loops with temporaries.
3345 2003-07-02 Paul Brook <paul@nowt.org>
3347 * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
3348 in correct scope. Change callers to match.
3349 * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
3350 * iresolve.c (g95_resolve_reshape): Only use constant shapes.
3352 2003-07-02 Paul Brook <paul@nowt.org>
3354 * trans-array.c (g95_conv_loop_setup): Remove dead var. Use
3355 expression shape for all expressions.
3356 * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
3358 2003-07-03 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3360 * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
3361 g95_parse_arg), intrinsic.c (g95_convert_type): support of
3363 * intrinsic.c, g95.h: Add g95_convert_type_warn,
3364 * resolve.c (g95_resolve_index): Call it.
3366 2003-07-02 Paul Brook <paul@nowt.org>
3368 * iresolve.c (g95_resolve_reshape): Set expression shape.
3369 (g95_resolve_shape): Ditto.
3370 * simplify.c (g95_simplify_shape): Move common code outside condition.
3371 * trans-array.c (g95_conv_array_initializer): Teach it how to count.
3373 2003-07-01 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3375 * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
3378 2003-06-29 Paul Brook <paul@nowt.org>
3380 * array.c (g95_simplify_iterator_var): Don't bother with return value.
3381 * expr.c (find_array_element, find_component_ref): New functions.
3382 (remove_subobject_ref): New function.
3383 (simplify_const_ref): Use them. Rename from simplify_component_ref.
3384 (simplify_ref_chain): New function.
3385 (g95_simplify_expr): Use it. Simplify parameter variable subobjects.
3386 (g95_specification_expr): Simplify the expression.
3387 * resolve.c (resolve_operator): Check simplifications return code.
3388 (g95_resolve_expr): Ditto.
3390 2003-06-26 Paul Brook <paul@nowt.org>
3392 * expr.c (simplify_component_ref): New function.
3393 (g95_simplify_expr): Use it.
3394 * resolve.c (resolve_structure_cons): Handle references.
3396 2003-06-25 Paul Brook <paul@nowt.org>
3398 * trans-io.c (build_dt): Handle internal units.
3400 2003-06-25 Canqun Yang <canqun@yahoo.com.cn>
3402 * trans-common.c (g95_build_common_decl): Array index range starts at 0.
3403 (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
3404 Use g95_array_index_type instead of integer_type_node.
3405 (g95_build_common_decl, g95_set_common_master_type): Use
3406 g95_character1_type_node instead of char_type_node.
3407 * trans-equivalence.c (g95_layout_local_equiv): As above.
3409 2003-06-24 Steven G. Kargl <kargls@attbi.com>
3411 * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
3412 remove last remains of -fquiet.
3414 2003-06-22 Paul Brook <paul@nowt.org>
3416 * resolve.c (resolve_operator): Don't fail if we can't simplify.
3417 (g95_resolve_expr): Ditto.
3418 (resolce_code): Mark as static.
3419 * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
3420 gimplifer doesn't (yet).
3422 2003-06-20 Paul Brook <paul@nowt.org>
3424 * g95.h: Add ST_PAUSE and EXEC_PAUSE.
3425 * match.c (g95_match_if): Add ST_PAUSE.
3426 (g95_match_stopcode): New function.
3427 (g95_match_pause, g95_match_stop): Use it.
3428 * parse.c (g95_ascii_statement): Handle ST_PAUSE.
3429 (decode_stmt, next_statement, parse_executable): Ditto.
3430 * resolve.c (resolve_code): Ditto.
3431 * st.c (g95_free_statement): Ditto.
3432 * trans-stmt.c (g95_trans_pause): New function.
3433 * trans-stmt.h: Declare it.
3434 * trans.c (g95_trans_code): Use it.
3435 * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
3437 (g95_build_builtin_function_decls): Initialize them.
3439 * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
3441 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3443 * io.c (g95_match_open , g95_match_close, g95_match_inquire,
3444 match_filepos): Fix error handling.
3446 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3448 * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
3449 Add assertions on arguments.
3450 * resolve.c (expression_shape): Remove useless &.
3451 * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
3452 g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
3453 g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
3454 g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
3455 g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
3456 g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
3457 (g95_simplify_not, g95_simplify_scale): Add assertions.
3459 2003-06-15 Paul Brook <paul@nowt.org>
3461 Clean up stuff to work with the ssa optimizers.
3462 * convert.c (convert): Handle BOOLEAN_TYPEs.
3463 * f95-lang.c (g95_truthvalue_conversion): Implement.
3464 * trans-array.c (g95_trans_array_constructor_value): Group multiple
3466 * trans.h (g95_truthvalue_conversion): Declare.
3467 * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
3468 * trans-stmt.c (g95_trans_character_select): Don't create array
3469 assignments. Mark labels as indirect jump targets.
3470 * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
3471 (g95_get_dtype_cst): Handle LOGICAL types.
3473 2003-06-14 Paul Brook <paul@nowt.org>
3475 * f95-lang.c (g95_gimplify_expr): New function.
3476 * trans-array.c (g95_trans_array_constructor_value): Don't create
3478 (g95_conv_expr_descriptor): Rename simple->gimple.
3479 * trans-expr.c (conv_expr_op): Use proper logical operators.
3480 * trans-intrinsic.c (build_fixbound_expr): New function.
3481 (build_fix_expr): Ditto.
3482 (g95_conv_intinsic_aint): Use them. Use builtin functions.
3483 (g95_conv_intrinsic_function): Add FLOOR and CEILING.
3485 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3487 * array.c (g95_compare_array_spec): Remove unreachable code.
3488 * expr.c (g95_copy_expr): Likewise.
3489 * intrinsic.c (g95_convert_type): Likewise.
3490 * misc.c (g95_code2string): Likewise.
3491 * simplify.c (g95_simplify_ishft, g95_simplify_real,
3492 g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
3493 * trans-stmt.c (g95_trans_select): Likewise.
3494 * primary.c (extend_ref): Add an assertion.
3495 * simplify.c (g95_convert_constant): Add const.
3496 * intrinsic.h: Remove g95_check_x_ni.
3497 * f95-lang.c (g95_finish): Call g95_release_include_path.
3499 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3501 * resolve.c (resolve_contained_functions): Fix typo introduced on
3504 2003-06-09 Paul Brook <paul@nowt.org>
3506 * g95.h: Include system.h not hwint.h.
3507 * many: use safe-ctype.h not ctype.h. Change isalpha -> ISALPHA, etc.
3508 * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
3510 2003-06-09 Paul Brook <paul@nowt.org>
3512 * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
3513 * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
3514 * trans-decl.c (g95_add_decl_to_functions): Make non-static.
3515 (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
3516 (g95_generate_function_code): Translate COMMON and EQUIVALENCE
3518 * trans.h (g95_trans_equivalence, g95_trans_common,
3519 g95_add_decl_to_function): Declare.
3520 * trans-common.c, trans-equivalence.c: New files.
3522 2003-06-08 Steven Bosscher <steven@gcc.gnu.org>
3524 * intrinsic.c (g95_intrinsic_extension): Remove.
3525 (add_functions): Substitute g95_check_x for g95_check_x_ni
3527 (g95_init_expr_extensions): New function.
3528 (g95_intrinsic_func_interface): Use it.
3529 * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
3530 * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
3531 g95_check_precision, g95_check_present, g95_check_radix,
3532 g95_check_range, g95_check_selected_real_kind): Do not set
3533 g95_intrinsic_extension.
3534 (g95_check_x_ni): Remove now duplicate of g95_check_x.
3536 * expr.c (check_inquiry): Add FIXME, fixup some code style.
3538 2003-06-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3540 * g95.h (ref_type): Name this type explicitly.
3541 * module.c (MIO_NAME): Add specialisations of mio_name.
3542 (mio_symbol_attribute, mio_typespec, mio_array_ref,
3543 mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
3544 (ab_attribute): Name this type explicitly.
3545 (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
3547 2003-06-05 Kejia Zhao <kejia_zh@yahoo.com.cn>
3549 * trans-intrinsic.c (g95_conv_allocated): New function.
3550 (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
3552 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
3554 * f95-lang.c: Don't include g95-support.h
3555 (g95_mark_addressable): Add prototype.
3556 (g95_init_decl_processing): Remove C front end hack.
3557 * f95-tree.c: Remove file.
3558 * support.c: Remove file.
3559 * g95-support.h: Remove file.
3560 * trans-types.c (g95_init_types): Set up boolean
3561 type related tree nodes.
3562 * Make-lang.in: Remove rules for dead files and
3563 dependencies on them.
3565 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
3567 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
3568 C front end dependency. Also, convert.c does not depend on
3569 g95-support.h anymore.
3570 * convert.c: Don't include c-common.h and g95-support.h
3571 * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
3572 (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
3573 stmts_are_full_exprs_p, current_stmt_tree,
3574 current_scope_stmt_stack): Remove.
3575 * g95-support.h (unsigned_conversion_warning): Kill proto.
3576 (boolean_type_node, boolean_true_node, boolean_false_node):
3577 Don't define here. Instead, make then true tree nodes in
3579 * support.c (c_global_trees): Die, C front end, die!!!
3580 (g95_init_c_decl_hacks): Don't touch intmax_type_node,
3581 uintmax_type_node, string_type_node and const_string_type_node.
3582 (decl_constant_value, overflow_warning): Make static functions.
3583 They are in death row too, though.
3584 (default_conversion, c_expand_asm_operands): Remove.
3585 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
3586 trans.c: Don't include c-common.h.
3587 * trans-types.c (boolean_type_node, boolean_true_node,
3588 boolean_false_node): Make them real tree nodes.
3589 * trans-types.h (intmax_type_node, string_type_node,
3590 const_string_type_node): Hack to work around C dependencies
3591 in builtin-types.def.
3593 2003-06-04 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3595 * decl.c (decl_types): Add some iterators-like sentinels.
3596 * decl.c (match_attr_spec): Use them.
3597 Use "decl_types" instead of "int".
3598 Add cast in call to g95_match_strings.
3599 * dump-parse-tree.c (g95_show_namespace): Use "g95_intrinsic_op"
3601 * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
3602 (g95_interface_info): Use "g95_intrinsic_op".
3603 * dump-parse-tree.c (g95_show_namespace): Use them.
3604 * interface.c (g95_check_interfaces): Use them.
3605 * module.c (read_module, write_module): Use them.
3606 * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
3607 Use "g95_intrinsic_op".
3608 * interface.c (check_operator_interface): Use "g95_intrinsic_op".
3609 Add a default case in switch statement.
3610 * intrinsic.h (g95_generic_isym_id): Moved to...
3611 * g95.h (g95_generic_isym_id): here.
3612 (g95_intrinsic_sym): Use "g95_generic_isym_id".
3613 * intrinsic.c (make_generic): Use "g95_generice_isym_id".
3614 * trans-intrinsic.c (g95_intrinsic_map_t,
3615 g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
3616 * match.c (g95_match_intrinsic_op): Add cast in call to
3619 2003-06-03 Steven Bosscher <steven@gcc.gnu.org>
3621 * support.c (skip_evaluation, warn_conversion, lvalue_p,
3622 lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
3623 constant_fits_type_p, convert_and_check,
3624 unsigned_conversion_warning): Remove these ugly remnants
3625 we inherited from the C front end.
3626 (function_types_compatible): Remove '#if 0'-edcode.
3627 (build_modify_expr): Likewise.
3628 (convert_for_assignment): Don't use the deceased functions.
3629 The parameter fundecl is now unused.
3630 (decl_constant_value): Always just return decl. In fact
3631 this function is not used at present, but it might be in
3632 the future, when we start using the tree inliner.
3633 (overflow_warning, default_conversion, c_expand_asm_operands):
3634 Abort when these are called, they are part of the C type
3635 checking implementation and therefore poison to Fortran.
3637 2003-06-04 Steven Bosscher <steven@gcc.gnu.org>
3639 * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
3640 c-pretty-print.o and c-dump.o. Add a comment on why we
3641 depend on c-semantics.c.
3642 * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
3643 Don't use the C front end tree dumper hook to dump the
3644 language specific tree representation -- we don't have
3645 one. So instead, inherit the default langhook.
3647 2003-06-02 Paul Brook <paul@nowt.org>
3649 * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
3651 2003-06-02 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3653 * check.c (g95_check_associated): Use proper types. Remove
3654 extraneous argument in call to g95_error().
3656 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
3658 * resolve.c (resolve_operator): Make logical operands convert to the
3659 type with higher kind.
3661 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
3663 * check.c (g95_check_associated): Make sure both pointer and target has
3664 the same type and rank. Null pointer or array section with vector
3665 subscript as target are not allowed.
3666 * trans.h: Declare gfor_fndecl_associated.
3667 * trans-decl.c: (g95_build_builtin_function_decls): Initialize
3668 gfor_fndecl_associated.
3669 * trans-intrinsic.c (g95_conv_associated): New function.
3670 (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
3672 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
3674 * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
3675 according to POINTER itself rather than TARGET.
3676 (g95_conv_expr_descriptor): Make lbound start at 1.
3677 * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
3679 2003-06-01 Paul Brook <paul@nowt.org>
3681 * expr.c (g95_type_convert_binary): Make it match the standard.
3682 * g95.texi: Remove dead link.
3684 2003-06-01 Steven Bosscher <steven@gcc.gnu.org>
3686 * g95.texi: Cleanup somewhat in preparation for inclusion
3689 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3690 Canqun Yang <canqun@yahoo.com.cn>
3692 * resolve.c (compare_bound_int, resolve_where_shape): Proper return
3694 (g95_find_forall_index): Return proper value.
3695 (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
3696 compare the return value from g95_find_forall_index.
3698 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3699 * g95.h, io.c (g95_st_label): Remove "length".
3700 (g95_symtree): Remove "link".
3701 (g95_case): Remove "code".
3702 * arith.c, arith.h (g95_compare_string, g95_convert_integer,
3703 g95_convert_real): Make an argument pointer to const.
3704 * decl.c (colon_seen): Add a TODO.
3705 * interface.c (g95_compare_types): Fix typo.
3706 * interface.c (compare_interfaces): Preserve value of "p".
3707 * intrinsic.c (sort_actual): Remove "i".
3708 * match.c (g95_match_assign): Proper type in call to g95_match().
3709 * parse.c (next_free): Avoid duplicate call due to macro.
3710 * parse.c (check_statement_label): wrong type in call to g95_error.
3711 * primary.c (match_real_constant): Add a TODO.
3712 * resolve.c (resolve_select): Remove useless conditional.
3713 * simplify.c (g95_simplify_repeat): Proper assignment to
3714 "value.character.string".
3715 * simplify.c (g95_simplify_reshape): Wrong variable in call to
3718 2003-05-20 Canqun Yang <canqun@yahoo.com.cn>
3720 * trans-stmt.c: Remove unnecessary include file defaults.h.
3722 2003-05-19 Lifang Zeng <zlf605@hotmail.com>
3724 * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
3726 (g95_trans_forall): Allow arbitrary number of FORALL indexes and
3727 actual variables used as FORALL indexes.
3729 2003-05-15 Paul Brook <paul@nowt.org>
3731 * trans-array.c (g95_trans_static_array_pointer): Use
3733 (g95_trans_deferred_array): Initialize static array pointers.
3734 * trans-expr.c (g95_conv_function_call): Use formal arglist to
3735 correctly pass POINTER and absent CHARACTER arguments.
3737 2003-05-14 Lifang Zeng <zlf605@hotmail.com>
3739 * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
3740 (g95_resolve_forall_body): Resolve FORALL body.
3741 (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
3742 (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
3743 (g95_find_forall_index): Check whether the FORALL index appears in
3744 the expression or not.
3745 (resolve_code): Modified.
3747 2003-05-14 Paul Brook <paul@nowt.org>
3749 * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
3751 2003-05-13 Paul Brook <paul@nowt.org>
3753 * trans-types.c (g95_max_array_element_size): Now a tree node.
3754 (g95_init_types): Work out max size properly.
3755 (g95_get_dtype_cst): Modify to match.
3757 2003-05-11 Paul Brook <paul@nowt.org>
3759 * trans-io.c (add_case): Create a label decl for case labels.
3761 2003-05-11 Paul Brook <paul@nowt.org>
3763 * arith.c (g95_integer_index_kind): New variable.
3764 * f95-lang.c (g95_init): Move frontend initialization here ...
3765 (g95_post_options): ... from here.
3766 * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
3767 * intrinsic.c (add_functions): Use index kinds.
3768 * iresolve.c: Convert to index_kind where needed.
3769 * resolve.c (g95_resolve_index): Make public, use index_kind.
3770 (resolve_array_ref): Adjust to match.
3771 * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
3772 * trans-stmt.c: Ditto.
3773 * trans-types.c: Ditto.
3774 * trans-types.h (g95_array_index_kind): Remove declaration.
3775 * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
3777 2003-05-07 Paul Brook <paul@nowt.org>
3779 * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
3780 * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
3783 2003-05-07 Paul Brook <paul@nowt.org>
3785 * trans-array.c (trans_static_array_pointer,
3786 g95_trans_array_constructor_value, g95_conv_array_initializer,
3787 g95_conv_structure): CONSTRUCTOR nodes only have one operand.
3788 (g95_add_loop_ss_code): Convert subscripts to the correct type.
3789 * trans-stmt.c (g95_trans_character_select): Ditto.
3790 * trans-types.c (g95_init_types): Ditto.
3792 2003-05-07 Steven Bosscher <steven@gcc.gnu.org>
3794 * f95-lang.c (expand_function_body): Use input_line, not lineno.
3795 * trans-decl.c (g95_generate_function_code,
3796 g95_generate_constructors): Likewise.
3797 * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
3798 g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
3801 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
3802 * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
3803 with components point to the DERIVED type itself, and two DERIVED
3804 type with components point to each other.
3805 * trans-expr.c (g95_conv_componet_ref): Modified
3807 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
3808 * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
3810 (g95_trans_pointer_assign): Implement Nullify.
3812 2003-05-01 Paul Brook <paul@nowt.org>
3814 * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
3815 * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
3817 2003-05-01 Paul Brook <paul@nowr.org>
3819 * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
3820 trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
3823 2003-05-01 Canqun Yang <canqun@yahoo.com.cn>
3825 * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
3828 2003-04-28 Paul Brook <paul@nowt.org>
3830 * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
3831 as their kind suggests.
3832 (g95_resolve_reshape): Ditto.
3834 2003-04-28 Chun Huang <compiler@sohu.com>
3836 * trans-expr.c (g95_conv_substring_expr): New function.
3837 (g95_conv_expr): Use it.
3839 2003-04-28 Paul Brook <paul@nowt.org>
3841 * iresolve.c (g95_resolve_transpose): Make it match the
3843 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
3845 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
3847 * trans-types.c (g95_add_field_to_struct): New function to
3848 add a field to a UNION_TYPE or RECORD_TYPE.
3849 * trans-types.h (g95_add_field_to_struct): Prototype.
3850 (g95_get_derived_type): Use g95_add_field_to_struct to add
3852 * trans-io.c (g95_add_field): Remove.
3853 (ADD_FIELD): Use new g95_add_field_to_struct function.
3854 (ADD_STRING): Likewise.
3855 * trans-stmt.c (g95_trans_select): Likewise.
3856 (g95_add_field): Remove duplicated function.
3858 2003-04-18 Canqun Yang <canqun@yahoo.com.cn>
3860 Port implementation for CHARACTER SELECT from Andy's tree.
3861 * trans-stmt.c (g95_trans_character_select): Implement character
3862 select. (g95_add_field): New function.
3863 * trans-decl.c: Declare 'gfor_gndecl_select_string'.
3864 (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
3865 * g95.h (struct g95_case): Add field 'int n'.
3866 * trans.h: Declare 'gfor_fndecl_select_string'.
3868 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
3870 * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
3871 (g95_insert_bbd): Die on duplicates.
3872 * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
3874 2003-04-14 Steven Bosscher <steven@gcc.gnu.org>
3876 * g95.texi: Require GMP 4.0 -- like we actually
3877 do. Explain the testsuite and what-goes-where.
3878 Don't use undefined texinfo symbol. Break very
3879 long line. Remove finished item from the list
3882 2003-04-11 Canqun Yang <canqun@yahoo.com.cn>
3884 * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
3887 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
3889 * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
3890 (g95_trans_forall_body): New function.
3892 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
3894 * resolve.c (resove_where): New function.
3895 (resolve_where_shape): New function.
3896 (resolve_code): Add call to 'resolve_where'
3897 * trans-stmt.c (g95_trans_where): Modified.
3898 (g95_trans_where_2): New function.
3899 (g95_trans_where_assign): New function.
3900 (g95_evaluate_where_mask): New function.
3901 (g95_add_to_stmt_list): New function.
3902 (g95_get_temp_expr): New function.
3903 * trans.h (where_stmt_list): New structure.
3905 2003-04-10 Paul Brook <paul@nowt.org>
3907 * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
3908 (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
3910 2003-04-10 Steven Bosscher <steven@gcc.gnu.org>
3912 Update after mainline -> tree-ssa-branch merge.
3913 * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
3915 (g95_init): Update for new lang_hooks definition.
3916 (g95_post_options): New langhook.
3917 (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
3918 * scanner.c (g95_new_file): Comment update.
3920 2003-04-09 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3922 * g95.h, lang-options.h: Add -Wimplicit-interface.
3923 * options.c (g95_init_options, g95_parse_arg): Set it.
3924 * interface.c (check_intents): Warn about call with implicit
3926 * resolve.c (resolve_unknown_f, resolve_unknown_s): Call