1 2005-06-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
3 * trans-expr.c (gfc_conv_variable): POINTER results don't need f2c
4 calling conventions. Look at sym instead of sym->result.
5 * trans-types.c (gfc_sym_type): Remove workaround for frontend bug.
6 Remove condition which is always false with workaround removed.
7 (gfc_return_by_reference): Always look at sym, never at sym->result.
9 2005-06-11 Steven G. Kargl <kargls@comcast.net>
13 * trans-array.c (gfc_array_deallocate): pstat is new argument
14 (gfc_array_allocate): update gfc_array_deallocate() call.
15 (gfc_trans_deferred_array): ditto.
16 * trans-array.h: update gfc_array_deallocate() prototype.
17 * trans-decl.c (gfc_build_builtin_function_decls): update declaration
18 * trans-stmt.c (gfc_trans_deallocate): Implement STAT= feature.
20 2005-06-07 Jerry DeLisle <jvdelisle@verizon.net>
22 * intrinsic.texi: Add documentation for dcmplx, digits,
23 dim, idim, ddim, dot_product, dprod, dreal, and dtime.
25 2005-06-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
28 * trans-array.c (gfc_trans_array_constructor_value): Slightly reorder.
29 Generate correct exit condition in case of negative steps in
32 * invoke.texi: Fix description of flags required for compatibility
35 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
36 Erik Schnetter <schnetter@aei.mpg.de>
39 * trans.c (gfc_get_backend_locus): Remove unnecessary adjustment,
42 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
44 * match.c (match_forall_iterator): Don't immediately give error if '='
45 is not followed by an expression.
47 2005-06-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
48 Erik Edelmann <erik.edelmann@iki.fi>
50 * array.c (gfc_match_array_constructor): Disallow empty array
53 2005-06-03 Jerry DeLisle <jvdelisle@verizon.net>
55 * fortran/intrinsic.texi: Add documentation for
56 command_argument_count, conjg, dconjg, count,
57 cpu_time, cshift, date_and_time, dble, dfloat.
59 2005-06-01 Roger Sayle <roger@eyesopen.com>
61 * intrinsic.c (add_conv): No longer take a "simplify" argument as
62 its always gfc_convert_constant, instead take a "standard" argument.
63 (add_conversions): Change all existing calls of add_conv to pass
64 GFC_STD_F77 as appropriate. Additionally, if we're allowing GNU
65 extensions support integer-logical and logical-integer conversions.
66 (gfc_convert_type_warn): Warn about use the use of these conversions
67 as a extension when appropriate, i.e. with -pedantic.
68 * simplify.c (gfc_convert_constant): Add support for integer to
69 logical and logical to integer conversions, using gfc_int2log and
71 * arith.c (gfc_log2int, gfc_int2log): New functions.
72 * arith.h (gfc_log2int, gfc_int2log): Prototype here.
73 * gfortran.texi: Document this new GNU extension.
75 2005-06-01 Paul Thomas <pault@gcc.gnu.org>
77 * fortran/trans-expr.c (gfc_conv_variable): Clean up bracketting.
78 * fortran/trans-expr.c (gfc_conv_function_call): Insert spaces.
79 Correct comments and replace convert of integer_one_node with
82 2005-06-01 Jakub Jelinek <jakub@redhat.com>
85 * resolve.c (resolve_contained_fntype): Use sym->attr.untyped
86 to avoid giving error multiple times.
87 (resolve_entries): Don't error about BT_UNKNOWN here.
88 (resolve_unknown_f): Capitalize IMPLICIT for consistency.
89 (resolve_fntype): New function.
90 (gfc_resolve): Call resolve_fntype.
92 2005-06-01 Feng Wang <fengwang@nudt.edu.cn>
95 * fortran/io.c (resolve_tag): Fix error message.
97 2005-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
99 * fortran/trans-decl.c: Don't include errors.h.
100 * fortran/Make-lang.in: Updates dependencies.
102 2005-05-31 Paul Thomas <pault@gcc.gnu.org>
107 * fortran/trans-array.c (gfc_conv_expr_descriptor): Obtain the
108 string length from the expression typespec character length value
109 and set temp_ss->stringlength and backend_decl. Obtain the
110 tree expression from gfc_conv_expr rather than gfc_conv_expr_val.
111 Dereference the expression to obtain the character.
112 * fortran/trans-expr.c (gfc_conv_component_ref): Remove the
113 dereference of scalar character pointer structure components.
114 * fortran/trans-expr.c (gfc_trans_subarray_assign): Obtain the
115 string length for the structure component from the component
118 2005-05-30 Roger Sayle <roger@eyesopen.com>
120 * gfortran.h (GFC_STD_LEGACY): New "standard" macro. Reindent.
121 * options.c (gfc_init_options): By default, allow legacy extensions
123 (gfc_post_options): Make -pedantic warn about legacy extensions
124 even with -std=legacy.
125 (gfc_handle_option): Make -std=gnu follow the default behaviour
126 of warning about legacy extensions, but allowing them. Make the
127 new -std=legacy accept everything and warn about nothing.
128 * lang.opt (std=legacy): New F95 command line option.
129 * invoke.texi: Document both -std=f2003 and -std=legacy.
130 * gfortran.texi: Explain the two types of extensions and document
131 how they are affected by the various -std= command line options.
133 2005-05-30 Kazu Hirata <kazu@cs.umass.edu>
135 * trans-expr.c: Remove trailing ^M.
137 * trans-expr.c: Fix comment typos.
139 2005-05-29 Paul Thomas <pault@gcc.gnu.org>
147 * fortran/trans-array.c (gfc_conv_resolve_dependencies): Add string
148 length to temp_ss for character pointer array assignments.
149 * fortran/trans-expr.c (gfc_conv_variable): Correct errors in
150 dereferencing of characters and character pointers.
151 * fortran/trans-expr.c (gfc_conv_function_call): Provide string
152 length as return argument for various kinds of handling of return.
153 Return a char[]* temporary for character pointer functions and
154 dereference the temporary upon return.
156 2005-05-29 Janne Blomqvist <jblomqvi@vipunen.hut.fi>
157 Steven G. Kargl <kargls@comcast.net>
160 * io.c (gfc_match_inquire): Implement constraints on UNIT and FILE usage.
162 2005-05-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
165 * io.c (format_item_1): Add check and extension warning for
168 2005-05-28 Steven G. Kargl <kargls@comcast.net>
170 * arith.c (gfc_arith_init_1): Fix off by one problem;
171 (gfc_check_integer_range): Chop extra bits in subnormal numbers.
173 2005-05-28 Jerry DeLisle <jvdelisle@verizon.net>
174 Steven G. Kargl <kargls@comcast.net>
176 * intrinsic.texi: added documentation for BIT_SIZE, BTEST, CHAR, CEILING
179 2005-05-27 Steven G. Kargl <kargls@comcast.net>
181 * trans-array.c (gfc_trans_deferred_array): Use build_int_cst to force
182 like types in comparsion.
184 2005-05-26 Kazu Hirata <kazu@cs.umass.edu>
186 * data.c, parse.c, trans-array.c, trans-decl.c,
187 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
188 trans.h: Fix comment typos. Follow spelling conventions.
190 2005-05-22 Roger Sayle <roger@eyesopen.com>
192 * gfortran.texi: Document some more GNU extensions.
194 2005-05-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
196 * error.c (gfc_warning): Fix typo in comment.
198 2005-05-18 Thomas Koenig <Thomas.Koenig@online.de>
201 * fortran/iresolve.c (gfc_resolve_reshape): Add
202 gfc_type_letter (BT_COMPLEX) for complex to
203 to resolved function name.
205 2005-05-18 Erik Edelmann <erik.edelmann@iki.fi>
207 * array.c (gfc_match_array_constructor): Support [ ... ]
208 style array constructors.
210 2005-05-18 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
212 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_TRUNC
213 and BUILT_IN_TRUNCF instead of BUILT_IN_FLOOR and BUILT_IN_FLOORF.
214 * trans-intrinsic.c (build_fix_expr): Change 'op' argument
215 to correct enum type.
216 (gfc_conv_intrinsic_aint): Likewise. Clarify comment in front of
217 function. Add default case to switch, deal with FIX_TRUNC_EXPR
218 instead of FIX_FLOOR_EXPR.
220 2005-05-18 Feng Wang <fengwang@nudt.edu.cn>
223 * trans-const.c (gfc_conv_const_charlen): Use gfc_charlen_type_node to
224 build character length.
226 2005-05-17 Zdenek Dvorak <dvorakz@suse.cz>
228 * trans-types.c (gfc_array_range_type): New variable.
229 (gfc_init_types): Initialize gfc_array_range_type.
230 (gfc_get_array_type_bounds): Use gfc_array_range_type.
232 2005-05-17 Jakub Jelinek <jakub@redhat.com>
235 * trans-stmt.c (generate_loop_for_temp_to_lhs): Remove SIZE and COUNT2
236 arguments. If LSS is gfc_ss_terminator, increment COUNT1 by 1, instead
237 of incrementing COUNT2 and using COUNT1+COUNT2 increment COUNT1 and use
239 (generate_loop_for_rhs_to_temp): Likewise.
240 (compute_overall_iter_number): Add INNER_SIZE_BODY argument.
241 It non-NULL, add it to body.
242 (allocate_temp_for_forall_nest_1): New function, split from
243 allocate_temp_for_forall_nest.
244 (allocate_temp_for_forall_nest): Add INNER_SIZE_BODY argument,
245 propagate it down to compute_overall_iter_number. Use
246 allocate_temp_for_forall_nest_1.
247 (gfc_trans_assign_need_temp): Remove COUNT2. Call
248 compute_inner_temp_size into a new stmtblock_t. Adjust calls to
249 allocate_temp_for_forall_nest, generate_loop_for_rhs_to_temp
250 and generate_loop_for_temp_to_lhs.
251 (gfc_trans_pointer_assign_need_temp): Adjust calls to
252 allocate_temp_for_forall_nest.
253 (gfc_evaluate_where_mask): Call compute_inner_temp_size into a new
254 stmtblock_t. Call compute_overall_iter_number just once, then
255 allocate_temp_for_forall_nest_1 twice with the same size.
256 Initialize mask indexes if nested_forall_info != NULL.
257 (gfc_trans_where_2): Initialize mask indexes before calling
258 gfc_trans_nested_forall_loop.
260 2005-05-15 Feng Wang <fengwang@nudt.edu.cn>
261 Jerry DeLisle <jvdelisle@verizon.net>
264 * trans-stmt.c (gfc_trans_label_assign): fix pointer type, to
265 resolve ICE on assign of format label.
266 * trans-io.c (set_string): add fold-convert to properly
267 handle assigned format label in write.
269 2005-05-13 Paul Brook <paul@codesourcery.com>
271 * trans-stmt.c (gfc_trans_forall_1): Fix comment typo.
273 2005-05-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
275 * trans-types.c (gfc_is_nodesc_array): Remove redundant check.
277 2005-05-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
280 * io.c (check_format): Look for literal characters inside
283 2005-05-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
285 * resolve.c (resolve_symbol): Copy 'pointer' and 'dimension'
286 attribute from result symbol to function symbol.
287 * trans-expr.c (gfc_conv_function_call): Look at sym->attr.dimension
288 instead of sym->result->attr.dimension.
290 2005-05-10 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
293 * gfortran.h (gfc_option): Add flag_f2c.
294 * invoke.texi: Document '-ff2c' command line option. Adapt
295 documentation for '-fno-second-underscore' and '-fno-underscoring'.
296 * lang.opt (ff2c): New entry.
297 * options.c (gfc-init_options): Set default calling convention
298 to -fno-f2c. Mark -fsecond-underscore unset.
299 (gfc_post_options): Set -fsecond-underscore if not explicitly set
301 (handle_options): Set gfc_option.flag_f2c according to requested
303 * trans-decl.c (gfc_get_extern_function_decl): Use special f2c
304 intrinsics where necessary.
305 (gfc_trans_deferred_vars): Change todo error to assertion.
306 * trans-expr.c (gfc_conv_variable): Dereference access
307 to hidden result argument.
308 (gfc_conv_function_call): Add hidden result argument to argument
309 list if f2c calling conventions requested. Slightly restructure
310 tests. Convert result of default REAL function to requested type
311 if f2c calling conventions are used. Dereference COMPLEX result
313 * trans-types.c (gfc_sym_type): Return double for default REAL
314 function if f2c cc are used.
315 (gfc_return_by_reference): Slightly restructure logic. Return
316 COMPLEX by reference depending on calling conventions.
317 (gfc_get_function_type): Correctly make hidden result argument a
318 pass-by-reference argument for COMPLEX. Remove old code which does
319 this for derived types.
321 2005-05-09 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
323 * match.c (gfc_match_return): Only require space after keyword when
324 it is obligatory. Only give stdwarn to after matching is successful.
325 * dump-parse-tree.c (gfc_show_symbol): Deal with alternate returns.
327 2005-05-08 Kazu Hirata <kazu@cs.umass.edu>
329 * intrinsic.texi: Fix typos.
331 2005-05-07 Steven G. Kargl <kargls@comcast.net>
333 * intrinsic.texi: Document ASSOCIATED and ATAN2. Update Bessel function
334 description to include information about scalar arguments.
336 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
338 * Make-lang.in, dump-parse-tree.c, invoke.texi, lang.opt,
339 match.h, trans-array.h: Update copyright.
341 2005-04-29 Tom Tromey <tromey@redhat.com>
343 * f95-lang.c (poplevel): Updated for change to build_block.
345 2005-04-29 Jakub Jelinek <jakub@redhat.com>
349 * trans-expr.c (gfc_conv_variable): Handle return values in functions
350 with alternate entry points.
351 * resolve.c (resolve_entries): Remove unnecessary string termination
352 after snprintf. Set result of entry master.
353 If all entries have the same type, set entry master's type
354 to that common type, otherwise set mixed_entry_master attribute.
355 * trans-types.c (gfc_get_mixed_entry_union): New function.
356 (gfc_get_function_type): Use it for mixed_entry_master functions.
357 * gfortran.h (symbol_attribute): Add mixed_entry_master bit.
358 * decl.c (gfc_match_entry): Set entry->result properly for
360 * trans-decl.c (gfc_get_symbol_decl): For entry_master, skip over
362 (build_entry_thunks): Handle return values in entry thunks.
363 Clear BT_CHARACTER's ts.cl->backend_decl, so that it is not
364 shared between multiple contexts.
365 (gfc_get_fake_result_decl): Use DECL_ARGUMENTS from
366 current_function_decl instead of sym->backend_decl. Skip over
367 entry master's entry id argument. For mixed_entry_master entries or
368 their results, return a COMPONENT_REF of the fake result.
369 (gfc_trans_deferred_vars): Don't warn about missing return value if
370 at least one entry point uses RESULT.
371 (gfc_generate_function_code): For entry master returning
372 CHARACTER, copy ts.cl->backend_decl to all entry result syms.
373 * trans-array.c (gfc_trans_dummy_array_bias): Don't consider return
374 values optional just because they are in entry master.
376 2005-04-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
378 * gfortran.h (gfc_namespace): Add seen_implicit_none field,
379 Tobias forgot this in previous commit.
381 2005-04-29 Paul Brook <paul@codesourcery.com>
383 * trans-expr.c (gfc_conv_expr_present): Fix broken assert. Update
386 2005-04-29 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
388 * gfortran.h (gfc_namespace): Add seen_implicit_none field.
389 * symbol.c (gfc_set_implicit_none): Give error if there's a previous
390 IMPLICIT NONE, set seen_implicit_none.
391 (gfc_merge_new_implicit): Error if there's an IMPLICIT NONE statement.
393 2005-04-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
395 * gfortran.h (gfc_gsymbol): Make name a const char *.
396 * symbol.c (gfc_get_gsymbol): Allocate gsymbol name via
399 2005-04-28 Francois-Xavier Coudert <coudert@clipper.ens.fr>
402 * resolve.c (resolve_actual_arglist): Issue an error if a statement
403 functions is used as actual argument.
405 2005-04-27 Francois-Xavier Coudert <coudert@clipper.ens.fr>
408 * interface.c (compare_parameter): Ignore type for EXPR_NULL
409 only if type is BT_UNKNOWN.
411 2005-04-25 Paul Brook <paul@codesourcery.com>
412 Steven G. Kargl <kargls@comcast.net>
415 * check.c (gfc_check_ichar_iachar): New function.
416 * instinsic.h (gfc_check_ichar_iachar): Add prototype.
417 * intrinsic.c (add_functions): Use it.
418 * primary.c (match_varspec, gfc_match_rvalue): Clear incorrect
419 character expression lengths.
421 2005-04-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
424 * trans-common.c (translate_common): Cast offset and
425 common_segment->offset to type int for warning message.
427 2005-04-23 DJ Delorie <dj@redhat.com>
429 * trans-decl.c: Adjust warning() callers.
431 2005-04-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
433 * trans-const.c (gfc_conv_mpfr_to_tree): Use hexadecimal string as
434 intermediate representation. Fix typo in comment.
436 2005-04-21 Steven G. Kargl <kargls@comcast.net>
438 * trans-const.c (gfc_conv_mpfr_to_tree): Remove unneeded computation;
439 simplify logic; Add a gcc_assert.
441 2005-04-19 Steven G. Kargl <kargls@comcast.net>
443 * trans-const.c (gfc_conv_mpz_to_tree): Fix comment.
445 2005-04-19 Arnaud Desitter <arnaud.desitter@ouce.ox.ac.uk>
446 Steven G. Kargl <kargls@comcast.net>
448 * invoke.texi: Update -Waliasing description
450 2005-04-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
453 * resolve.c (resolve_variable): If e->symtree is not set, this
454 ought to be a FAILURE, and not a segfault.
456 2005-04-17 Paul Thomas <pault@gcc.gnu.org>
463 * fortran/trans-io.c (gfc_build_io_library_fndecls): Create
464 declaration for st_set_nml_var and st_set_nml_var_dim. Remove
465 declarations of old namelist functions.
466 (build_dt): Simplified call to transfer_namelist_element.
467 (nml_get_addr_expr): Generates address expression for start of
468 object data. New function.
469 (nml_full_name): Qualified name for derived type components. New
471 (transfer_namelist_element): Modified for calls to new functions
472 and improved derived type handling.
474 2005-04-17 Richard Guenther <rguenth@gcc.gnu.org>
476 * scanner.c (gfc_next_char_literal): Reset truncation flag
477 for lines ending in a comment for both fixed and free form.
478 (load_line): Do not set truncated flag if only truncating
481 2005-04-15 Richard Guenther <rguenth@gcc.gnu.org>
484 * gfortran.h (gfc_linebuf): Add truncated field.
485 * parse.c (next_statement): Handle warning for truncated
487 * scanner.c (load_line): Return if line was truncated.
488 No longer warn for truncated lines. Remove unused parameters.
489 (load_file): Store load_line return value to linebuf.
490 (gfc_error_recovery): Do not advance line at the end.
492 2005-04-14 Steven G. Kargl <kargls@comcast.net>
494 * gfortran.h (gfc_real_info): Add subnormal struct member.
495 * arith.c (gfc_arith_init_1): Set it.
496 (gfc_check_real_range): Use it.
497 * simplify.c (gfc_simplify_nearest): Fix nearest(0.,1.).
499 2005-04-12 Kazu Hirata <kazu@cs.umass.edu>
501 * simplify.c: Fix a comment typo.
503 2005-04-11 Richard Sandiford <rsandifo@redhat.com>
505 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
507 2005-04-11 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
509 * simplify.c (gfc_simplify_nearest): Overhaul.
511 2005-04-10 Kazu Hirata <kazu@cs.umass.edu>
513 * interface.c: Fix a comment typo.
515 2005-04-10 Francois-Xavier Coudert <coudert@clipper.ens.fr>
517 * match.c (match_arithmetic_if): Arithmetic IF is obsolete in
520 2005-04-09 Steven G. Kargl <kargls@comcast.net>
522 * simplify.c (gfc_simplify_anint): Use mpfr_round()
523 (gfc_simplify_dnint): ditto.
524 (gfc_simplify_nint): ditto.
526 2005-04-09 Andrew Pinski <pinskia@physics.uc.edu>
529 * io.c (check_format): Allow an optional comma
532 2005-04-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
534 * match.c (match_arithmetic_if): Remove gfc_ prefix and correct
535 comment according to GNU coding style.
536 (gfc_match_if): Remove gfc_ prefix in call to
539 2005-04-08 Diego Novillo <dnovillo@redhat.com>
541 * match.c (gfc_match_arithmetic_if): Declare static.
543 2005-04-08 Francois-Xavier Coudert <coudert@clipper.ens.fr>
546 * match.c (gfc_match_arithmetic_if): New function to match an
547 arithmetic IF statement.
548 (gfc_match_if): Use gfc_match_arithmetic_if to match an
549 arithmetic IF statement embedded in a simple IF statement.
551 2005-04-07 Steven G. Kargl <kargls@comcast.net>
553 * simplify.c (gfc_simplify_exponent): Fix exponent(tiny(x))
555 2005-04-06 Steven G. Kargl <kargls@comcast.net>
557 * invoke.texi: Remove documentation of -std=f90
559 2005-04-06 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
561 * expr.c (gfc_check_assign): Don't allow NULL as rhs in a
562 non-pointer assignment.
564 2005-04-05 Feng Wang <fengwang@nudt.edu.cn>
569 * array.c (resolve_character_array_constructor): New function. Set
570 constant character array's character length.
571 (gfc_resolve_array_constructor): Use it.
572 * decl.c (add_init_expr_to_sym): Set symbol and initializer character
574 (gfc_set_constant_character_len): New function. Set constant character
575 expression according the given length.
576 * match.h (gfc_set_constant_character_len): Add prototype.
578 2005-04-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
580 * intrinsic.texi: BES?? functions are not in the f95 standard.
582 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
584 * intrinsic.texi: Document COS, EXP, LOG, LOG10, SIN, SQRT, TAN.
586 2005-04-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
588 * intrinsic.texi: Document BESJ0, BESJ1, BESJN, BESY0, BESY1,
589 BESYN, ATAN, COSH, ERF, ERC, SINH, TANH.
591 2005-04-02 Steven G. Kargl <kargls@comcast.net>
593 * intrinsic.texi: Document ALLOCATED, ANINT, ANY, ASIN; fix typos
595 2005-04-01 Kazu Hirata <kazu@cs.umass.edu>
597 * decl.c, f95-lang.c, interface.c, module.c, trans-stmt.c,
598 trans.h: Fix comment typos.
600 2005-03-29 Steven G. Kargl <kargls@comcast.net>
602 * gfortran.h (option_t): Change d8, i8, r8 to flag_default_double,
603 flag_default_integer, flag_default_real
604 * invoke.texi: Update documentation
605 * lang.opt: Remove d8, i8, r8 definitions; Add fdefault-double-8
606 fdefault-integer-8, and fdefault-real-8 definitions.
607 * options.c (gfc_init_options): Set option defaults
608 (gfc_handle_option): Handle command line options.
609 * trans-types.c (gfc_init_kinds): Use options.
611 2005-03-29 Keith Besaw <kbesaw@us.ibm.com>
613 * f95-lang.c (builtin_function): Process the attrs parameter
614 and apply the "const" attribute to the builtin if found.
616 2005-03-27 Steven G. Kargl <kargls@comcast.net>
618 * intrinsic.texi: Document AIMAG, AINT, ALL
620 2005-03-26 Steven G. Kargl <kargls@comcast.net>
622 * arith.c (check_result): Fix illogical logic.
624 2005-03-26 Canqun Yang <canqun@nudt.edu.cn>
626 * trans-common.c (create_common): Build RECORD_NODE for common blocks
627 contain no equivalence objects.
628 (add_equivalences): New argument saw_equiv.
629 (trans_common): New local variable saw_equiv.
630 (finish_equivalences): Add a local variable dummy, Always pass true
631 for the 3rd parameter to create_common.
633 2005-03-25 Steven G. Kargl <kargls@comcast.net>
635 * intrinsic.texi: Fix "make dvi"
637 2005-03-24 Steven G. Kargl <kargls@comcast.net>
639 * intrinsic.texi: New file.
640 * gfortran.texi: Include it; white space change; fix typo.
642 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
644 * f95-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
646 2005-03-23 Steven Bosscher <stevenb@suse.de>
648 * convert.c (convert): Replace fold (buildN (...)) with fold_buildN.
649 * trans-array.c (gfc_trans_allocate_array_storage,
650 gfc_trans_allocate_temp_array gfc_trans_array_constructor_value,
651 gfc_conv_array_index_ref, gfc_trans_array_bound_check,
652 gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
653 gfc_conv_array_ref, gfc_trans_preloop_setup, gfc_conv_ss_startstride,
654 gfc_conv_loop_setup, gfc_array_init_size, gfc_trans_array_bounds,
655 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
656 gfc_conv_expr_descriptor): Likewise.
657 * trans-expr.c (gfc_conv_powi, gfc_conv_string_tmp,
658 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
659 * trans-intrinsic.c (build_round_expr, gfc_conv_intrinsic_bound,
660 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_sign,
661 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
662 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_bitop,
663 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits,
664 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_ishftc,
665 gfc_conv_intrinsic_merge, prepare_arg_info,
666 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_repeat): Likewise.
667 * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do, gfc_trans_do_while,
668 gfc_trans_forall_loop, gfc_do_allocate, generate_loop_for_temp_to_lhs,
669 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
670 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
671 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_where_assign):
673 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Likewise.
674 * trans.c (gfc_add_modify_expr): Likewise.
676 2005-03-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
678 * check.c (gfc_check_chdir, gfc_check_chdir_sub, gfc_check_kill,
679 gfc_check_kill_sub, gfc_check_link, gfc_check_link_sub,
680 gfc_check_symlnk, gfc_check_symlnk_sub, gfc_check_rename,
681 gfc_check_rename_sub, gfc_check_sleep_sub, gfc_check_gerror,
682 gfc_check_getlog, gfc_check_hostnm, gfc_check_hostnm_sub,
683 gfc_check_perror): new functions to check newly implemented
685 * gfortran.h: adding symbols for new intrinsics.
686 * intrinsic.c (add_functions): adding new intrinsics.
687 (add_subroutines): adding new intrinsics.
688 * intrinsic.h: prototype for all checking and resolving
690 * iresolve.c (gfc_resolve_chdir, gfc_resolve_chdir_sub,
691 gfc_resolve_hostnm, gfc_resolve_ierrno, gfc_resolve_kill,
692 gfc_resolve_link, gfc_resolve_rename, gfc_resolve_symlnk,
693 gfc_resolve_time, gfc_resolve_time8, gfc_resolve_rename_sub,
694 gfc_resolve_kill_sub, gfc_resolve_link_sub,
695 gfc_resolve_symlnk_sub, gfc_resolve_sleep_sub,
696 gfc_resolve_gerror, gfc_resolve_getlog, gfc_resolve_hostnm_sub,
697 gfc_resolve_perror): new functions to resolve intrinsics.
698 * trans-intrinsic.c (gfc_conv_intrinsic_function): add case
701 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
703 * dump-parse-tree.c (gfc_show_expr): Dump name of namespace
704 in which the variable is declared.
707 * resolve.c (was_declared): Also check for dummy attribute.
709 2005-03-19 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
711 * gfortran.h (arith): Remove ARITH_0TO0.
712 * arith.c (gfc_arith_error): Remove handling of ARITH_0TO0.
713 (gfc_arith_power): Remove special casing of zero to integral
716 2005-03-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
718 * Make-lang.in (fortran-warn): Remove -Wno-error.
719 (expr.o-warn, resolve.o-warn, simplify.o-warn,
720 trans-common.o-warn): Specify -Wno-error.
722 2005-03-17 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
724 * trans-array.c (gfc_trans_static_array_pointer,
725 get_array_ctor_var_strlen, gfc_conv_array_index_offset): Fix
726 comment and formatting typos.
728 2005-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
730 * invoke.texi: Fix typos.
732 2005-03-15 Zack Weinberg <zack@codesourcery.com>
734 * Make-lang.in (GFORTRAN_TEXI): Add gcc-vers.texi.
736 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
738 * trans-stmt.c (gfc_trans_label_assign): Don't set DECL_ARTIFICIAL flag
739 to zero on label_tree.
741 2005-03-15 Feng Wang <fengwang@nudt.edu.cn>
744 * io.c (resolve_tag): Add checking on assigned label.
745 (match_dt_format): Does not set symbol assign attribute.
746 * match.c (gfc_match_goto):Does not set symbol assign attribute.
747 * resolve.c (resolve_code): Add checking on assigned label.
748 * trans-common.c (build_field): Deals with common variable assigned
750 * trans-stmt.c (gfc_conv_label_variable): New function.
751 (gfc_trans_label_assign): Use it.
752 (gfc_trans_goto): Ditto.
753 * trans-io.c (set_string): Ditto.
754 * trans.h (gfc_conv_label_variable): Add prototype.
756 2005-03-14 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
759 * symbol.c (check_conflict): A dummy argument can't be a statement
762 2005-03-14 Zdenek Dvorak <dvorakz@suse.cz>
764 * fortran/trans-intrinsic.c (gfc_conv_intrinsic_ishft): Convert
765 the argument of the shift to the unsigned type.
767 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
770 * resolve.c (gfc_resolve_index): Allow REAL indices as an extension.
772 2005-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
775 * resolve.c (gfc_resolve): Check if character lengths are
776 specification expressions.
778 2005-03-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
781 * trans-array.c (gfc_stack_space_left): Remove unused variable.
782 (gfc_can_put_var_on_stack): Move to trans-decl.c, remove #if 0'ed
784 * trans-array.h (gfc_stack_space_left, gfc_can_put_var_on_stack):
785 Remove declaration / prototype.
786 * trans-common.c (build_equiv_decl): Give union a name. Check if
787 it can be put on the stack.
788 * trans-decl.c (gfc_stack_space_left): Move function here.
789 (gfc_build_qualified_array): Fix comment typo.
790 * trans.h (gfc_put_var_on_stack): Add prototype.
792 2005-03-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
794 * Make-lang.in (fortran-warn): Set to $(STRICT_WARN) -Wno-error.
795 * decl.c, trans.c: Don't use C++ style comments.
796 * gfortran.h (sym_flavor, procedure_type, sym_intent, gfc_access,
797 ifsrc): Give names to enums and use ENUM_BITFIELD.
798 (gfc_access): Remove trailing comma.
800 2005-03-05 Steven G. Kargl <kargls@comcast.net>
803 * primary.c (match_complex_constant): Mangled complex constant may
804 be an implied do-loop. Give implied do-loop matcher a chance.
806 2005-03-05 Steven G. Kargl <kargls@comcast.net>
809 * resolve.c (compare_shapes): New function.
810 (resolve_operator): Use it.
812 2005-03-05 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
814 * trans-const.c (gfc_conv_constant_to_tree): Use correct tree
815 type for COMPLEX constants.
817 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
820 * trans-expr.c (gfc_conv_function_call): Correctly dereference
821 argument from a pointer function also if it has a result clause.
823 2005-03-04 Steven G. Kargl <kargls@comcast.net>
825 * expr.c (gfc_copy_shape_excluding): Change && to ||.
827 2005-03-04 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
829 * trans-intrinsic.c (gfc_get_symbol_for_expr): Fix comment typo,
832 2005-02-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
836 * simplify.c (gfc_simplify_bound): Rename to ...
837 (simplify_bound): ... this and overhaul.
839 2005-02-28 Steven G. Kargl <kargl@gcc.gnu.org>
841 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): remove boolean argument.
842 (gfc_conv_intrinsic_function): update function calls
844 2005-02-27 Steven G. Kargl <kargl@gcc.gnu.org>
847 * trans-types.c (gfc_max_integer_kind): Declare
848 (gfc_init_kinds): Initialize it.
849 * gfortran.h (gfc_max_integer_kind): extern it.
850 * primary.c (match_boz_constant): Use it; remove gfortran extension
851 of kind suffixes on BOZ literal constants
854 2005-02-27 Steven G. Kargl <kargls@comcast.net>
856 * arith.c (gfc_check_real_range): Remove multiple returns
857 (check_result): New function.
858 (gfc_arith_uminus,gfc_arith_plus,gfc_arith_times,
859 gfc_arith_divide,gfc_arith_power,gfc_arith_minus): Use it.
862 2005-02-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
864 * decl.c, resolve.c, trans-array.c, trans.h: Fix comment typo(s).
867 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-meunchen.de>
869 Unrevert previously reverted patch. Adding this fix:
870 * module.c (find_true_name): Deal with NULL module.
872 2005-02-24 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
874 Revert yesterday's patch:
875 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
877 * gfortran.h (gfc_component, gfc_actual_arglist, ...
878 ... argument. Copy string instead of pointing to it.
880 2005-02-23 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
882 * gfortran.h (gfc_get_namespace): Add second argument to prototype.
883 * intrinsic.c (gfc_intrinsic_init_1): Pass second argument to
885 * module.c (mio_namespace_ref, load_needed): Likewise.
886 * parse.c (parse_interface, parse_contained): Likewise. Here the
887 correct second argument matters.
888 * symbol.c (gfc_get_namespace): Add parent_types argument, only copy
889 parent's implicit types if this is set.
890 (gfc_symbol_init_2): Pass second argument to gfc_get_namespace.
891 * trans-common.c (build_common_decl): Likewise.
893 * gfortran.h (symbol_attribute): New 'untyped' field, fix comment
895 * symbol.c (gfc_set_default_type): Issue error only once, by setting
896 and checking 'untyped' attribute.
898 * gfortran.h (gfc_expr): Move 'operator', 'op1', 'op2', and 'uop'
899 fields into new struct 'op' inside the 'value' union.
900 * arith.c (eval_intrinsic): Adapt all users.
901 * dependency.c (gfc_check_dependency): Likewise.
902 * dump-parse-tree.c (gfc_show_expr): Likewise.
903 * expr.c (gfc_get_expr): Don't clear removed fields.
904 (free_expr0, gfc_copy_expr, gfc_type_convert_binary,
905 gfc_is_constant_expr, simplify_intrinsic_op, check_init_expr,
906 check_intrinsic_op): Adapt to new field names.
907 * interface.c (gfc_extend_expr): Likewise. Also explicitly
908 nullify 'esym' and 'isym' fields of new function call.
909 * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
910 Adapt to renamed structure fields.
911 * matchexp.c (build_node, match_level_1, match_expr): Likewise.
912 * module.c (mio_expr): Likewise.
913 * resolve.c (resolve_operator): Likewise.
914 (gfc_find_forall_index): Likewise. Only look through operands
915 if dealing with EXPR_OP
916 * trans-array.c (gfc_walk_op_expr): Adapt to renamed fields.
917 * trans-expr.c (gfc_conv_unary_op, gfc_conv_power_op,
918 gfc_conv_concat_op, gfc_conv_expr_op): Likewise.
921 * gfortran.h (gfc_component, gfc_actual_arglist, gfc_user_op): Make
922 'name' a 'const char *'.
923 (gfc_symbol): Likewise, also for 'module'.
924 (gfc_symtree): Make 'name' a 'const char *'.
925 (gfc_intrinsic_sym): Likewise, also for 'lib_name'.
926 (gfc_get_gsymbol, gfc_find_gsymbol): Add 'const' qualifier to
928 (gfc_intrinsic_symbol): Use 'gfc_get_string' instead of 'strcpy' to
929 initialize 'SYM->module'.
930 * check.c (gfc_check_minloc_maxloc, check_reduction): Check for NULL
931 pointer instead of empty string.
932 * dump-parse-tree.c (gfc_show_actual_arglist): Likewise.
933 * interface.c (gfc_compare_types): Adapt check to account for possible
935 (compare_actual_formal): Check for NULL pointer instead of empty
937 * intrinsic.c (gfc_current_intrinsic, gfc_current_intrinsic_arg):
938 Add 'const' qualifier.
939 (conv_name): Return a heap allocated string.
940 (find_conv): Add 'const' qualifier to 'target'.
941 (add_sym): Use 'gfc_get_string' instead of 'strcpy'.
942 (make_generic): Check for NULL pointer instead of empty string.
943 (make_alias): Use 'gfc_get_string' instead of 'strcpy'.
944 (add_conv): No need to strcpy result from 'conv_name'.
945 (sort_actual): Check for NULL pointer instead of empty string.
946 * intrinsic.h (gfc_current_intrinsic, gfc_current_intrinsic_arg):
948 * module.c (compare_true_names): Compare pointers instead of strings
950 (find_true_name): Initialize string fields with gfc_get_string.
951 (mio_pool_string): New function.
952 (mio_internal_string): Adapt comment.
953 (mio_component_ref, mio_component, mio_actual_arg): Use
954 'mio_pool_string' instead of 'mio_internal_string'.
955 (mio_symbol_interface): Add 'const' qualifier to string arguments.
956 Add level of indirection. Use 'mio_pool_string' instead of
957 'mio_internal_string'.
958 (load_needed, read_module): Use 'gfc_get_string' instead of 'strcpy'.
959 (write_common, write_symbol): Use 'mio_pool_string' instead of
960 'mio_internal_string'.
961 (write_symbol0, write_symbol1): Likewise, also check for NULL pointer
962 instead of empty string.
963 (write_operator, write_generic): Pass correct type variable to
964 'mio_symbol_interface'.
965 (write_symtree): Use 'mio_pool_string' instead of
966 'mio_internal_string'.
967 * primary.c (match_keyword_arg): Adapt check to possible
968 case of NULL pointer. Use 'gfc_get_string' instead of 'strcpy'.
969 * symbol.c (gfc_add_component, gfc_new_symtree, delete_symtree,
970 gfc_get_uop, gfc_new_symbol): Use 'gfc_get_string' instead of
972 (ambiguous_symbol): Check for NULL pointer instead of empty string.
973 (gfc_find_gsymbol, gfc_get_gsymbol): Add 'const' qualifier on string
975 * trans-array.c (gfc_trans_auto_array_allocation): Check for NULL
976 pointer instead of empty string.
977 * trans-decl.c (gfc_sym_mangled_identifier,
978 gfc_sym_mangled_function_id, gfc_finish_var_decl, gfc_get_symbol_decl,
979 gfc_get_symbol_decl): Likewise.
980 * trans-io.c (gfc_new_nml_name_expr): Add 'const' qualifier to
981 argument. Copy string instead of pointing to it.
983 2005-02-23 Kazu Hirata <kazu@cs.umass.edu>
985 * intrinsic.h, st.c: Update copyright.
987 2005-02-20 Steven G. Kargl <kargls@comcast.net>
989 * symbol.c: Typos in comments.
991 2005-02-20 Steven G. Kargl <kargls@comcast.net>
993 * expr.c (gfc_type_convert_binary): Typo in comment.
995 2005-02-19 Steven G. Kargl <kargls@comcast.net>
997 * check.c (gfc_check_selected_int_kind): New function.
998 * intrinsic.h: Prototype it.
999 * intrinsic.c (add_function): Use it.
1000 * simplify (gfc_simplify_ceiling,gfc_simplify_floor): Change
1001 BT_REAL to BT_INTEGER and use gfc_default_integer_kind.
1003 2005-02-19 Steven G. Kargl <kargls@comcast.net>
1005 * check.c (gfc_check_int): improve checking of optional kind
1006 * simplify.c (gfc_simplify_int): Change BT_REAL to BT_INTEGER
1008 2005-02-19 Steven G. Kargl <kargls@comcast.net>
1010 * check.c (gfc_check_achar): New function
1011 * intrinsic.h: Prototype it.
1012 * intrinsic.c (add_function): Use it.
1014 2005-02-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1016 * trans-stmt.c (generate_loop_for_temp_to_lhs,
1017 generate_loop_for_rhs_to_temp): Remove if whose condition is
1020 2005-02-12 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1022 * symbol.c (gfc_use_ha_derived): Remove, fold functionality into ...
1023 (gfc_use_derived): ... this function.
1025 2005-02-09 Richard Henderson <rth@redhat.com>
1027 * f95-lang.c (gfc_init_builtin_functions): Call
1028 build_common_builtin_nodes; do not define any functions handled
1031 2005-02-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1033 * expr.c (gfc_copy_expr): Don't copy 'op1' and 'op2' for
1035 (gfc_is_constant_expr): Check 'ref' to determine if substring
1036 reference is constant.
1037 (gfc_simplify_expr): Simplify 'ref' instead of 'op1' and 'op2'.
1038 (check_init_expr, check_restricted): Check 'ref' instead of 'op1'
1040 * module.c (mio_expr): Read / write 'ref' instead of 'op1' and 'op2'.
1042 2005-02-07 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1044 * gfortran.h (gfc_add_dimension, gfc_add_result, gfc_add_save,
1045 gfc_add_dummy, gfc_add_generic, gfc_add_in_common, gfc_add_data,
1046 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
1047 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
1048 gfc_add_procedure): Add argument.
1049 * array.c (gfc_set_array_spec), decl.c (var_element, get_proc_name,
1050 gfc_match_null, match_type_spec, match_attr_spec,
1051 gfc_match_formal_arglist, match_result, gfc_match_function_decl):
1052 Update callers to match.
1053 (gfc_match_entry) : Likewise, fix comment typo.
1054 (gfc_match_subroutine, attr_decl1, gfc_add_dimension,
1055 access_attr_decl, do_parm, gfc_match_save, gfc_match_modproc,
1056 gfc_match_derived_decl): Update callers.
1057 * interface.c (gfc_match_interface): Likewise.
1058 * match.c (gfc_match_label, gfc_add_flavor,
1059 gfc_match_call, gfc_match_common, gfc_match_block_data,
1060 gfc_match_namelist, gfc_match_module, gfc_match_st_function):
1062 * parse.c (parse_derived, parse_interface, parse_contained),
1063 primary.c (gfc_match_rvalue, gfc_match_variable): Likewise.
1064 * resolve.c (resolve_formal_arglist, resolve_entries): Update callers.
1065 * symbol.c (check_conflict, check_used): Add new 'name' argument,
1066 use when printing error message.
1067 (gfc_add_dimension, gfc_add_result, gfc_add_save, gfc_add_dummy,
1068 gfc_add_generic, gfc_add_in_common, gfc_add_data,
1069 gfc_add_in_namelist, gfc_add_sequence, gfc_add_function,
1070 gfc_add_subroutine, gfc_add_access, gfc_add_flavor, gfc_add_entry,
1071 gfc_add_procedure): Add new 'name' argument. Pass along to
1072 check_conflict and check_used.
1073 (gfc_add_allocatable, gfc_add_external, gfc_add_intrinsic,
1074 gfc_add_optional, gfc_add_pointer, gfc_add_target, gfc_add_elemental,
1075 gfc_add_pure, gfc_add_recursive, gfc_add_intent,
1076 gfc_add_explicit_interface, gfc_copy_attr): Pass NULL for new
1077 argument in calls to any of the modified functions.
1079 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
1081 * gfortran.texi: Don't give last update date.
1083 2006-01-30 Richard Henderson <rth@redhat.com>
1085 * options.c (gfc_init_options): Zero flag_errno_math.
1087 2005-01-29 Paul Brook <paul@codesourcery.com>
1090 * check.c (real_or_complex_check): New function.
1091 (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc): New functions.
1092 * intrinsic.c (add_functions): Use new check functions.
1093 * intrinsic.h (gfc_check_fn_c, gfc_check_fn_r, gfc_check_fn_rc):
1096 2005-01-29 Steven G. Kargl <kargls@comcast.net>
1099 * expr.c (gfc_check_assign): Check for conformance of logical operands
1101 2004-01-27 Steven Bosscher <stevenb@suse.de>
1103 * trans-decl.c (gfc_build_label_decl): Set DECL_ARTIFICAL and
1104 TREE_USED for all labels.
1105 (gfc_trans_entry_master_switch): Use it instead of building a
1107 * trans-io.c (add_case): Likewise.
1108 * trans-stmt.c (gfc_trans_integer_select): Likewise.
1110 2004-01-23 Paul Brook <paul@codesourcery.com>
1111 Steven G. Kargl <kargls@comcast.net>
1114 * arith.c (gfc_convert_real): Remove sign handling.
1115 * primary.c (match_digits): Allow whitespace after initial sign.
1116 (match_real_const): Handle signs here. Allow whitespace after
1117 initial sign. Remove dead code.
1118 (match_const_complex_part): Remove.
1119 (match_complex_part): Use match_{real,integer}_const.
1120 (match_complex_constant): Cross-promote integer types.
1122 2005-01-23 James A. Morrison <phython@gcc.gnu.org>
1125 * iresolve.c (gfc_resolve_transpose): Resolve to transpose_c4 or
1126 transpose_c8 for complex types.
1128 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
1130 * data.c, dependency.c, f95-lang.c, io.c, trans-array.c,
1131 trans-decl.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
1132 trans-stmt.c, trans-types.c, trans.h: Fix comment typos.
1133 Follow spelling conventions.
1135 2005-01-22 Bud Davis <bdavis9659@comcast.net>
1138 * trans-io.c (gfc_trans_inquire): Added code to support
1141 2005-01-22 Steven G. Kargl <kargls@comcast.net>
1143 * intrinsic.c (make_alias): Add standard argument.
1144 (add_functions): Update make_alias calls.
1146 2005-01-22 Paul Brook <paul@codesourcery.com>
1148 * trans-expr.c (gfc_conv_function_call): Remove bogus TODO.
1150 2005-01-22 Paul Brook <paul@codesourcery.com>
1152 * gfortran.h (gfc_check_access): Add prototype.
1153 * match.c (gfc_match_namelist): Remove TODO.
1154 * module.c (check_access): Rename ...
1155 (gfc_check_access): ... to this. Boolify. Update callers.
1156 * resolve.c (resolve_symbol): Check for private objects in public
1159 2005-01-22 Paul Brook <paul@codesourcery.com>
1161 * primary.c (gfc_match_rvalue): Only apply implicit type if variable
1162 does not have an explicit type.
1163 (gfc_match_variable): Resolve implicit derived types in all cases.
1164 Resolve contained function types from their own namespace, not the
1166 * resolve.c (resolve_contained_fntype): Remove duplicate sym->result
1167 checking. Resolve from the contained namespace, not the parent.
1169 2005-01-22 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1172 * trans-const.c (gfc_conv_constant_to_tree): Give logical
1173 constants the correct type.
1176 * trans-io.c (ADD_STRING): Use gfc_charlen_type_node for string
1178 (gfc_build_io_library_fndecls): 'rec' and 'recl_in' are not
1181 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
1183 * arith.c, array.c, check.c, decl.c, expr.c, f95-lang.c,
1184 gfortran.h, interface.c, intrinsic.c, io.c, iresolve.c,
1185 match.c, matchexp.c, misc.c, module.c, options.c, parse.c,
1186 scanner.c, simplify.c, symbol.c, trans-array.c, trans-expr.c,
1187 trans-io.c, trans-stmt.c, trans.c: Update copyright.
1189 2005-01-17 Ira Rosen <irar@il.ibm.com>
1191 * f95-lang.c (gfc_init_builtin_functions): Call targetm.init_builtins.
1193 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1196 * error.c (error_char): Line-buffer errors / warnings.
1198 2005-01-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1200 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Fix signed /
1201 unsigned issue. Use build_int_cst instead of converting
1202 integer_zero_node. Remove unnecessary conversion.
1204 * trans-types.c (gfc_get_character_type_len): : Use
1205 gfc_charlen_type_node as basic type for the range field.
1207 * trans-intrinsic.c (build_fixbound_expr,
1208 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_anyall,
1209 gfc_conv_intrinsic_count, gfc_conv_intrinsic_btest,
1210 gfc_conv_intrinsic_singlebitop): Use 'build_int_cst' instead
1211 of converting 'integer_zero_node' or 'integer_one_node'
1213 (gfc_conv_intrinsic_ishftc): Same, but store in local variable to
1215 (gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_rrspacing,
1216 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_iargc): Use
1217 'build_int_cst' instead of converting 'integer_zero_node' or
1218 'integer_one_node' respectively.
1220 * trans-intrinsic.c (gfc_conv_intrinsic_index,
1221 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove
1222 'gfc'-prefix from local variable, remove dead code, use correct
1223 type when inserting argument.
1225 * trans-intrinsic.c, trans-types.c: Update copyright years.
1227 2005-01-16 Steven G. Kargl <kargls@comcast.net>
1230 * resolve.c (check_case_overlap): Typo in comment.
1231 (validate_case_label_expr): Fix up kinds of case values
1232 (resolve_select): Properly handle kind mismatches.
1234 2004-01-16 Paul Brook <paul@codesourcery.com>
1237 * trans-common.c (translate_common): Remove duplicate function call.
1238 (finish_equivalences): Preserve alignment when biasing offsets.
1240 2005-01-15 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de
1242 * primary.c (check_digit): Call 'ISXDIGIT' instead of assuming
1243 ASCII-like character encoding.
1245 2005-01-14 Steven G. Kargl <kargls@comcast.net>
1247 * resolve.c (compare_case): Cleanup.
1249 2005-01-14 Steven G. Kargl <kargls@comcast.net>
1251 * resolve.c (compare_case): Give arguments correct type.
1253 2005-01-13 Kazu Hirata <kazu@cs.umass.edu>
1255 * iresolve.c, trans-common.c, trans-types.c: Fix comment
1258 2005-01-09 Paul Brook <paul@codesourcery.com>
1261 * trans-common.c (current_common, current_offset): Remove.
1262 (create_common): Add head argument.
1263 (align_segment): New function.
1264 (apply_segment_offset): New function.
1265 (translate_common): Merge code from new_segment. Handle alignment.
1266 (new_segment): Remove.
1267 (finish_equivalences): Ensure proper alignment.
1269 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1271 * trans-const.c: Don't include unused math.h.
1273 * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl,
1274 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_minmaxloc,
1275 gfc_conv_intrinsic_ishft, gfc_conv_intrinsic_len): Remove
1276 trailing whitespace.
1277 (prepare_arg_info): Fix formatting, indenting and remove trailing
1279 (gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_trim): Remove
1280 trailing whitespace.
1282 * arith.c (arctangent2, gfc_arith_init_1, gfc_arith_done_1,
1283 gfc_constant_result, gfc_range_check, gfc_arith_power,
1284 eval_type_intrinsic0, eval_intrinsic_f2, gfc_real2real,
1285 gfc_real2complex, gfc_complex2int, gfc_complex2real,
1286 gfc_complex2complex): Fix whitespace issues.
1287 * check.c (must_be, type_check, numeric_check, int_or_real_check,
1288 logical_array_check, array_check, scalar_check, nonoptional_check,
1289 variable_check, dim_check, check_a_kind, gfc_check_a_ikind,
1290 gfc_check_a_xkind, gfc_check_abs, gfc_check_all_any,
1291 gfc_check_allocated, gfc_check_a_p, gfc_check_besn,
1292 gfc_check_btest, gfc_check_char, gfc_check_cmplx, gfc_check_count,
1293 gfc_check_cshift, gfc_check_dcmplx, gfc_check_dble,
1294 gfc_check_digits, gfc_check_dot_product, gfc_check_eoshift,
1295 gfc_check_fnum, gfc_check_g77_math1, gfc_check_huge, gfc_check_i,
1296 gfc_check_iand, gfc_check_ibclr, gfc_check_ibits, gfc_check_ibset,
1297 gfc_check_idnint, gfc_check_ieor, gfc_check_index, gfc_check_int,
1298 gfc_check_ior, gfc_check_ishft, gfc_check_ishftc, gfc_check_kind,
1299 gfc_check_lbound, gfc_check_logical, min_max_args,
1300 gfc_check_min_max_integer, gfc_check_min_max_real,
1301 gfc_check_min_max_double, gfc_check_matmul,
1302 gfc_check_minval_maxval, gfc_check_merge, gfc_check_nearest,
1303 gfc_check_pack, gfc_check_precision, gfc_check_radix,
1304 gfc_check_range, gfc_check_real, gfc_check_repeat,
1305 gfc_check_scale, gfc_check_scan, gfc_check_selected_real_kind,
1306 gfc_check_set_exponent): Fix formatting issues.
1307 (gfc_check_size, gfc_check_sign): Alphabetize function order,
1308 remove whitespace-only line.
1309 (gfc_check_fstat, gfc_check_fstat_sub, gfc_check_stat,
1310 gfc_check_stat_sub, gfc_check_transfer, gfc_check_transpose,
1311 gfc_check_ubound, gfc_check_unpack, gfc_check_verify, gfc_check_x,
1312 gfc_check_cpu_time, gfc_check_date_and_time, gfc_check_mvbits,
1313 gfc_check_random_number, gfc_check_random_seed,
1314 gfc_check_second_sub, gfc_check_system_clock,
1315 gfc_check_getcwd_sub, gfc_check_exit, gfc_check_flush,
1316 gfc_check_umask, gfc_check_umask_sub, gfc_check_unlink,
1317 gfc_check_unlink_sub): Fix formatting issues.
1319 2005-01-08 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1321 * gfortran.h: Remove outdated comment. Don't include stdio.h
1324 2005-01-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1326 * gfortranspec.c (lang_specific_driver): Change year to 2005 in
1327 output of 'gfortran --version'.
1329 2005-01-03 Steven G. Kargl <kargls@comcast.net>
1331 * arith.c: Add system.h; remove string.h
1337 * check.c: Remove stdlib.h and stdarg.h
1338 * error.c: Remove stdlib.h, stdarg.h, stdio.h, string.h
1339 * expr.c: Add system.h; remove stdarg.h, stdio.h, and string.h
1340 * f95-lang.c: Add system.h; remove stdio.h
1341 * interface.c: Add system.h; remove stdlib.h and string.h
1342 * intrinsic.c: Remove stdarg.h, stdio.h, and string.h
1343 * io.c: Remove string.h
1345 * match.c: Remove stdarg.h and string.h
1346 * misc.c: Update copyright; add system.h; remove stdlib.h,
1347 string.h, and sys/stat.h
1348 * module.c: Add system.h; remove string.h, stdio.h, errno.h,
1349 unistd.h, and time.h
1350 * option.c: Remove string.h and stdlib.h
1352 * scanner.c: Update copyright; add system.h; remove stdlib.h,
1353 stdio.h, string.h, and strings.h
1354 * symbol.c: Add system.h; remove stdlib.h, stdio.h, and string.h
1355 * trans-array.c: Remove stdio.h and gmp.h
1356 * trans-const.c: Ditto
1357 * trans-expr.c: Ditto
1359 * trans-stmt.c: Ditto
1361 * trans-intrinsic.c: Remove stdio.h and string.h
1363 2004-12-29 Steven G. Kargl <kargls@comcast.net>
1365 * gfortran.h (gfc_case): fix typo in comment.
1367 2004-12-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1369 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Change to
1370 logical shift. Call fold. Remove 0-bit shift shortcut.
1371 (gfc_conv_intrinsic_ishftc): Convert first argument to at least
1372 4 bytes bits. Convert 2nd and 3rd argument to 4 bytes. Convert
1373 result if width(arg 1) < 4 bytes. Call fold.
1376 * trans-intrinsic.c (gfc_conv_intrinsic_mod): Update comment
1377 in front of function to match the standard. Correct handling
1380 2004-12-27 Andrew Pinski <pinskia@physics.uc.edu>
1382 * trans-expr.c (gfc_conv_cst_int_power): Only check for
1383 flag_unsafe_math_optimizations if we have a float type.
1385 2004-12-23 Steven G. Kargl <kargls@comcast.net>
1387 * gfortran.texi: Fix typo.
1389 2004-12-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1391 * trans-intrinsic.c (build_fixbound_expr): Clarify comment, fix
1394 2004-12-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1397 * match.c (gfc_match_if): Don't explicitly skip optional whitespace.
1398 (gfc_match_nullify): Make sure that ')' is in front of the end of
1401 * scanner.c (skip_fixed_comments): Fix typo in comment preceding
1404 2004-12-14 Richard Henderson <rth@redhat.com>
1406 * gfortran.h (gfc_expr.function.name): Make const.
1407 (gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
1408 (gfc_get_string): Update prototype.
1409 * iresolve.c: Include tree.h.
1410 (string_node, HASH_SIZE, string_head, hash): Remove.
1411 (gfc_get_string): Use vsnprintf, get_identifier.
1412 (free_strings, gfc_iresolve_init_1, gfc_iresolve_done_1): Remove.
1413 * misc.c (gfc_init_1): Don't call gfc_iresolve_init_1.
1414 (gfc_done_1): Don't call gfc_iresolve_done_1.
1415 * module.c (mio_allocated_string): Take and return const char *,
1416 instead of modifying char**.
1417 (mio_expr): Update to match.
1418 * resolve.c (pure_function): Constify name argument.
1419 (resolve_function): Constify name.
1420 * trans-intrinsic.c (gfc_conv_intrinsic_function): Likewise.
1422 2004-12-12 Richard Henderson <rth@redhat.com>
1424 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
1425 gfc_resolve_cshift, gfc_resolve_dot_product, gfc_resolve_eoshift,
1426 gfc_resolve_matmul, gfc_resolve_maxloc, gfc_resolve_maxval,
1427 gfc_resolve_minloc, gfc_resolve_minval, gfc_resolve_pack,
1428 gfc_resolve_product, gfc_resolve_reshape, gfc_resolve_shape,
1429 gfc_resolve_spread, gfc_resolve_sum, gfc_resolve_transpose,
1430 gfc_resolve_unpack: Use PREFIX.
1432 2004-12-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1435 * match.c (gfc_match_common): Skip whitespace.
1437 2004-12-12 Steven G. Kargl <kargls@comcast.net>
1440 * check.c (gfc_check_iand, gfc_check_ibclr, gfc_check_ibits,
1441 gfc_check_ibset, gfc_check_ieor, gfc_check_ior): Remove default
1442 integer kind check; Issue error for -std=f95 when needed.
1443 * intrinsic.c (add_functions): Change ieor from GFC_STD_GNU to
1445 * iresolve.c (gfc_resolve_iand, gfc_resolve_ieor, gfc_resolve_ior):
1446 Promote arguments to same kind.
1448 2004-12-12 Steven G. Kargl <kargls@comcast.net>
1449 Paul Brook <paul@codesourcery.com>
1452 * resolve.c (gfc_resolve_iterator_expr): New function.
1453 (gfc_resolve_iterator): Use it. Add real_ok argument. Convert
1454 start, end and stride to correct type.
1455 (resolve_code): Pass extra argument.
1456 * array.c (resolve_array_list): Pass extra argument.
1457 * gfortran.h (gfc_resolve): Add prototype.
1458 * trans-stmt.c (gfc_trans_do): Remove redundant type conversions.
1459 Handle real type iterators.
1461 2004-12-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1464 * iresolve.c (gfc_resolve_scale): Convert 'I' argument if not of
1465 same kind as C's 'int'.
1466 (gfc_resolve_set_exponent): Convert 'I' argument if not of kind 4.
1468 2004-12-08 Richard Henderson <rth@redhat.com>
1470 * intrinsic.c (gfc_convert_type_warn): Propagate the input shape
1471 to the output expression.
1472 * iresolve.c (gfc_resolve_cshift, gfc_resolve_eoshift): Suppress
1474 (gfc_resolve_reshape): Force convert SHAPE and ORDER parameters
1477 2004-12-08 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1480 * resolve.c (resolve_code): Impose correct restrictions on
1483 * decl.c (gfc_match_end): Use locus of END when eos is an error.
1485 2004-12-02 Steven G. Kargl <kargls@comcast.net>
1486 Paul Brook <paul@codesourcery.com>
1488 * check.c (gfc_check_flush, gfc_check_fnum): New functions.
1489 (gfc_check_fstat, gfc_check_fstat_sub): New functions.
1490 (gfc_check_stat, gfc_check_stat_sub): New functions.
1491 * gfortran.h (GFC_ISYM_FNUM,GFC_ISYM_FSTAT,GFC_ISYM_STAT): New symbols
1492 * intrinsic.c (add_functions,add_subroutines): Add flush, fnum,
1493 fstat, and stat to intrinsics symbol tables.
1494 * intrinsic.h (gfc_check_flush, gfc_resolve_stat_sub): Add prototypes.
1495 (gfc_resolve_fstat_sub, gfc_resolve_stat): Ditto.
1496 * iresolve.c (gfc_resolve_fnum, gfc_resolve_fstat): New functions.
1497 (gfc_resolve_stat, gfc_resolve_flush): New functions.
1498 (gfc_resolve_stat_sub,gfc_resolve_fstat_sub): New functions
1499 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add new intrinsics.
1501 2004-12-02 Steven G. Kargl <kargls@comcast.net>
1503 * intrinsic.c: Fix and add comments, fix function declarations
1504 (OPTIONAL,REQUIRED): New symbols
1505 (add_functions,add_subroutines): Use symbols
1506 (gmp.h): Remove unused include
1508 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
1510 * f95-lang.c, gfortranspec.c, trans-decl.c: Avoid ` as left quote
1513 2004-11-24 Steven Bosscher <stevenb@suse.de>
1515 * options.c (gfc_post_options): Don't clear flag_inline_functions.
1517 2004-11-20 Steven G. Kargl <kargls@comcast.net>
1519 * check.c (gfc_check_getcwd_sub): Fix seg fault.
1521 * check.c (gfc_check_exit,gfc_check_umask,gfc_check_umask_sub,
1522 gfc_check_unlink,gfc_check_unlink_sub): New functions
1523 * gfortran.h (GFC_ISYM_UMASK,GFC_ISYM_UNLINK): New symbols
1524 * intrinsic.c (add_functions,add_subroutines): Add umask, unlink,
1525 exit to intrinsics symbol tables.
1526 * intrinsic.h (gfc_check_umask,gfc_check_unlink,gfc_check_exit,
1527 gfc_check_umask_sub,gfc_check_unlink_sub,gfc_resolve_umask,
1528 gfc_resolve_unlink,gfc_resolve_exit,gfc_resolve_umask_sub,
1529 gfc_resolve_unlink_sub): Add and sort prototypes.
1530 * iresolve.c (gfc_resolve_umask,gfc_resolve_unlink,gfc_resolve_exit,
1531 gfc_resolve_umask_sub,gfc_resolve_unlink_sub): New functions
1532 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbols
1534 2004-11-16 Paul Brook <paul@codesourcery.com>
1537 * trans-array.c (gfc_trans_allocate_temp_array): Use gfc_get_dtype.
1538 (gfc_array_init_size, gfc_conv_expr_descriptor): Ditto.
1539 * trans-types.c (gfc_get_dtype): Accept array type rather than element
1541 (gfc_get_nodesc_array_type): Don't set GFC_TYPE_ARRAY_DTYPE.
1542 (gfc_get_array_type_bounds): Ditto.
1543 (gfc_get_derived_type): Recurse into derived type pointers.
1544 * trans-types.h (gfc_get_dtype): Add prototype.
1545 * trans.h (GFC_TYPE_ARRAY_DTYPE): Add comment.
1547 2004-11-15 Paul Brook <paul@codesourcery.com>
1549 * trans-types.c (gfc_get_dtype): Remove obsolete TODO.
1551 2004-11-10 Paul Brook <paul@codesourcery.com>
1554 * trans-expr.c (gfc_trans_subarray_assign): Free shape before ss.
1555 * trans-io.c (transfer_array_component): Ditto.
1557 2004-11-10 Paul Brook <paul@codesourcery.com>
1559 * invoke.texi: Fix typo.
1561 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
1563 * arith.c, array.c, decl.c, expr.c, f95-lang.c, gfortran.h,
1564 gfortranspec.c, interface.c, intrinsic.c, iresolve.c, match.c,
1565 module.c, parse.c, parse.h, primary.c, resolve.c, scanner.c,
1566 trans-array.c, trans-array.h, trans-expr.c, trans-intrinsic.c,
1567 trans-io.c, trans-stmt.c, trans.h: Fix comment formatting.
1569 2004-11-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1572 * io.c (resolve_tag): Tighten up exception for assigned FORMAT.
1574 2004-11-06 Kazu Hirata <kazu@cs.umass.edu>
1576 * gfortranspec.c: Replace GNU CC with GCC.
1578 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1580 * gfortranspec.c (lang_specific_driver): Change year to 2004.
1582 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1585 * trans-decl.c (create_function_arglist): Set DECL_ARTIFICIAL for
1588 2004-11-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1591 * trans-decl.c (gfc_finish_var_decl): Don't declare arguments to
1592 module procedures as if they were module variables.
1594 2004-11-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1599 * module.c (write_symbol1): Set module_name for dummy arguments.
1601 2004-11-02 Paul Brook <paul@codesourcery.com>
1603 * intrinsic.c (check_intrinsic_standard): Include error locus.
1605 (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Pass
1606 locus to check_intrinsic_standard.
1608 2004-10-31 Janne Blomqvist <jblomqvi@cc.hut.fi>
1611 * gfortran.h: Change GFC_STD_* flags to more appropriate
1612 ones. (struct gfc_intrinsic_isym): Add field for standard. (struct
1613 gfc_option_t): Add field for warning about use of nonstandard
1615 * intrinsic.c (add_sym): Add parameter for standard version, check
1616 this against current standard.
1617 (add_sym_0): Pass standard parameter to add_sym.
1618 (add_sym_1, add_sym_0s, add_sym_1s, add_sym_1m, add_sym_2): Ditto.
1619 (add_sym_2s, add_sym_3, add_sym_3ml, add_sym_3red, add_sym_3s): Ditto.
1620 (add_sym_4, add_sym_4s, add_sym_5, add_sym_5s): Ditto.
1621 (make_generic): Add parameter for standard, check this
1622 against currently selected standard.
1623 (add_functions, add_subroutines): Add parameter to tell which
1624 standard an intrinsic belongs to.
1625 (check_intrinsic_standard): New function.
1626 (gfc_intrinsic_func_interface): Add call to check_intrinsic_standard.
1627 (gfc_intrinsic_sub_interface): Ditto.
1628 * lang.opt: Add Wnonstd-intrinsics option.
1629 * options.c (gfc_init_options): Change to use new GFC_STD_* flags,
1631 (set_Wall): Add warning about nonstd intrinsics.
1632 (gfc_handle_option): Change to use new GFC_STD_* flags,
1634 * invoke.texi: Update manual to include -Wnonstd-intrinsics.
1636 2004-10-30 Andrew Pinski <pinskia@physics.uc.edu>
1638 * f95-lang.c (lang_tree_node): Add chain_next to be the TREE_CHAIN.
1640 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1642 * simplify.c (twos_complement): Calculate mask in GMP arithmetic.
1644 2004-10-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1646 * trans.c (gfc_trans_code): Set global locus after recursing. Fix
1649 2004-10-30 Canqun Yang <canqun@nudt.edu.cn>
1651 * check.c (gfc_check_rand): Allow missing optional argument.
1652 (gfc_check_irand): Ditto.
1653 * intrinsic.c (add_functions): Set arg optional flag for {i,}rand.
1655 2004-10-28 Scott Robert Ladd <scott.ladd@coyotegulch.com>
1657 PR fortran/13490, PR fortran/17912
1658 * gcc/fortran/gfortran.h: Added pedantic_min_int to gfc_integer_info
1659 * gcc/fortran/gfortran.h: Added ARITH_ASYMMETRIC to arith
1660 * gcc/fortran/arith.c: Added support for an "asymmetric integer"
1661 warning when compiling with pedantic.
1662 * gcc/fortran/arith.c: Set minimum integer values to reflect
1663 realities of two's complement signed integers. Added
1666 2004-10-17 Andrew Pinski <pinskia@physics.uc.edu>
1668 * Make-lang.in (F95_ADDITIONAL_OBJS): Kill.
1669 (f951): Do not depend on F95_ADDITIONAL_OBJS and don't
1672 2004-10-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1674 * trans-decl.c (generate_local_decl): Simplify logic, fix comment
1676 (gfc_generate_function_code): Fix formatting issue.
1678 2004-10-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1680 * module.c: Fix formatting issues.
1682 2004-10-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1684 * module.c (mio_interface_rest): Set where member of interface
1687 2004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
1690 * options.c (gfc_handle_option): Add break after handing the
1693 2004-10-08 Tobias Schlueter <tobias.shclueter@physik.uni-muenchen.de>
1695 * arith.c: Fix formatting issues.
1697 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1700 * resolve.c (resolve_operator): Use correct operator name in message.
1702 2004-10-07 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1704 * primary.c (match_boz_constant): Allow kind parameter suffixes.
1705 Move standard warning further to the front.
1707 2004-10-07 Kazu Hirata <kazu@cs.umass.edu>
1709 * trans-stmt.c: Fix a comment typo.
1711 2004-10-07 Paul Brook <paul@codesourcery.com>
1714 * trans-array.c (gfc_trans_deferred_array): Leave use associated
1717 2004-10-06 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1720 * simplify.c (twos_complement): New function.
1721 (gfc_simplify_ishft, gfc_simplify_ishftc): Revise.
1723 * simplify.c (gfc_simplify_abs): Use mpfr_hypot for CABS.
1725 2004-10-06 Paul Brook <paul@codesourcery.com>
1727 * trans-stmt.c (gfc_trans_simple_do): New function.
1728 (gfc_trans_do): Use it. Evaluate iteration bounds before entering
1729 loop. Update comments.
1731 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1734 * iresolve.c (gfc_resolve_pack): Choose function depending if mask
1738 * intrinsic.c (add_sym_5): Remove.
1739 (add_subroutines): Add resolution function for MVBITS.
1740 * intrinsic.h (gfc_resolve_mvbits): Declare resolution function for
1742 * iresolve.c (gfc_resolve_mvbits): New function.
1743 (gfc_resolve_random_number): Remove empty line at end of function.
1745 * trans-const.c (gfc_build_cstring_const): New function.
1746 (gfc_init_cst): Use new function.
1747 * trans-const.h (gfc_build_cstring_const): Add prototype.
1748 * trans-io.c (set_string, set_error_locus): Use new function.
1749 * trans-stmt.c (gfc_trans_goto): Use new function.
1752 * parse.c (accept_statement): Don't treat END DO like END IF and
1754 (parse_do_block): Generate possible END DO label inside END DO
1758 * check.c (gfc_check_system_sub): New function.
1759 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SYSTEM.
1760 * intrinsic.c (add_functions): Add 'system'.
1761 (add_subroutines): Add 'system'.
1762 * intrinsic.h (gfc_check_etime_sub, gfc_check_getcwd_sub):
1763 Move prototypes to other suborutines.
1764 (gfc_check_system_sub, gfc_resolve_system, gfc_resolve_system_sub):
1766 (gfc_resolve_system_clock): Fix formatting of prototype.
1767 * iresolve.c (gfc_resolve_system, gfc_resolve_system_sub): New
1769 * trans-intrinsic.c (gfc_conv_intrinsic_function): Deal with
1772 2004-10-04 Erik Schnetter <schnetter@aei.mpg.de>
1774 * scanner.c (preprocessor_line): Accept preprocessor lines without
1775 file names. Check file names for closing quotes. Handle escaped
1776 quotes in file names.
1778 2004-10-04 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1779 Paul Brook <paul@codesourcery.com>
1781 * trans-array.c (gfc_conv_expr_descriptor): Check for substriungs.
1782 Use gfc_get_expr_charlen.
1783 * trans-expr.c (gfc_get_expr_charlen): New function.
1784 * trans.h (gfc_get_expr_charlen): Add prototype.
1786 2004-10-04 Kazu Hirata <kazu@cs.umass.edu>
1788 * trans-intrinsic.c: Fix a comment typo.
1790 2004-10-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1792 * simplify.c (range_check): Remove blank line at beginning of function.
1793 (gfc_simplify_dint): Same at end of function.
1794 (gfc_simplify_exponent, gfc_simplify_fraction): Simplify calculations.
1795 (gfc_simplify_bound): Fix indentation.
1796 (gfc_simplify_log10): Simplify calculation.
1797 (gfc_simplify_min, gfc_simplify_max): Remove blank line at beginning
1799 (gfc_simplify_nearest): Same at end of function.
1800 (gfc_simplify_nint, gfc_simplify_idnint): Same at beginning of
1802 (gfc_simplify_rrspacing, gfc_simplify_set_exponent,
1803 gfc_simplify_spacing): Simplify calulations.
1805 2004-10-03 Feng Wang <fengwang@nudt.edu.cn>
1807 * trans-intrinsic.c: Fix comments on spacing and rrspacing
1808 (gfc_conv_intrinsic_rrspacing): Add fold on constant trees.
1810 2004-10-01 Jan Hubicka <jh@suse.cz>
1812 * f95-lang.c (gfc_expand_function): Update call of
1813 tree_rest_of_compilation.
1814 * trans-decl.c (gfc_generate_constructors): Likewise.
1816 2004-09-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1818 * trans-intrinsic.c: Comment fixes.
1820 2004-09-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1822 * decl.c (add_init_expr_to_sym, variable_decl): Comment fixes.
1824 2004-09-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1826 * trans-types.c (gfc_return_by_reference): Remove superfluous
1829 * intrinsic.h (gfc_resolve_getcwd): Update prototype.
1830 * iresolve.c (gfc_resolve_getcwd): Add second argument to function.
1833 * trans-expr.c (gfc_trans_arrayfunc_assign): Look at resolved
1834 function to determine return type.
1836 2004-09-20 Jan Hubicka <jh@suse.cz>
1838 * trans-decl.c (build_entry_thunks): Finalize the function; do not lower
1840 (gfc_generate_function_code): Likewise.
1842 2004-09-20 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1845 * simplify.c (gfc_simplify_reshape): Set shape of return value
1848 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
1849 Zack Weinberg <zack@codesourcery.com>
1851 * f95-lang.c, trans-expr.c, trans.c: Update for new tree-class
1852 enumeration constants.
1854 2004-09-17 Paul Brook <paul@codesourcery.com>
1856 * gfortran.h (struct gfc_linebuf): Don't use C99 empty arrays.
1857 (gfc_linebuf_header_size): Define.
1858 * scanner.c (load_file): Use it.
1860 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
1862 * array.c, data.c, decl.c, dependency.c, error.c, f95-lang.c,
1863 interface.c, intrinsic.c, io.c, misc.c, module.c, parse.h,
1864 resolve.c, scanner.c, trans-array.c, trans-array.h,
1865 trans-common.c, trans-const.h, trans-decl.c, trans-expr.c,
1866 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.c,
1867 trans.h: Fix comment typos. Follow spelling conventions.
1869 2004-09-16 Victor Leikehman <lei@il.ibm.com>
1872 * trans-io.c (transfer_array_component): New function.
1873 (transfer_expr): For array fields, call transfer_array_component.
1875 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
1877 * gfortran.texi: Fix a typo.
1879 2004-09-15 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
1881 * parse.c (eof_buf): Rename eof to eof_buf.
1882 (unexpected_eof): Same.
1883 (gfc_parse_file): Same.
1885 2004-09-15 Steven G. Kargl <kargls@comcast.net>
1887 * check.c (gfc_check_getcwd_sub): New function.
1888 * gfortran.h (GFC_ISYM_GETCWD): New symbol.
1889 * intrinsic.c (add_functions): Add function definition;
1891 * intrinsic.c (add_subroutines): Add subroutine definitions.
1892 * intrinsic.h: Add prototypes.
1893 * iresolve.c (gfc_resolve_getcwd, gfc_resolve_getcwd_sub):
1895 * trans-intrinsic.c (gfc_conv_intrinsic_function): Use symbol.
1897 2004-09-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1900 * module.c (write_symbol): Don't fill in module name here.
1901 (write_symbol0): Fill in here instead.
1903 2004-09-14 Kazu Hirata <kazu@cs.umass.edu>
1905 * data.c, decl.c, f95-lang.c, gfortran.h, match.c,
1906 trans-array.c, trans-common.c, trans-expr.c,
1907 trans-intrinsic.c, trans-stmt.c, trans-types.c, trans.h: Fix
1908 comment typos. Follow spelling conventions.
1910 2004-09-09 Paul Brook <paul@codesourcery.com>
1912 * scanner.c (get_file): Add ATTRIBUTE_UNUSED.
1914 2004-09-08 Paul Brook <paul@codesourcery.com>
1916 * array.c: Don't include assert.h.
1917 * data.c: Don't include assert.h. Replace assert and abort with
1918 gcc_assert and gcc_unreachable.
1919 * dependency.c: Ditto.
1920 * f95-lang.c: Ditto.
1921 * iresolve.c: Ditto.
1923 * simplify.c: Ditto.
1925 * trans-array.c: Ditto.
1926 * trans-common.c: Ditto.
1927 * trans-const.c: Ditto.
1928 * trans-decl.c: Ditto.
1929 * trans-expr.c: Ditto.
1930 * trans-intrinsic.c: Ditto.
1931 * trans-io.c: Ditto.
1932 * trans-stmt.c: Ditto.
1933 * trans-types.c: Ditto.
1936 2004-09-07 Per Bothner <per@bothner.com>
1937 Paul Brook <paul@codesourcery.com>
1939 * error.c (show_locus): Handle mapped locations.
1940 * f95-lang.c (gfc_be_parse_file): Initialize mapped locations.
1941 * gfortran.h: Include input.h.
1942 (struct gfc_linebuf): Use source_location.
1943 * scanner.c (get_file): Initialize linemap.
1944 (preprocessor_line): Pass extra argument to get_file.
1945 (load_file): Ditto. Setup linemap.
1946 (gfc_new_file): Handle mapped locations.
1947 * trans-common.c (build_field, build_equiv_decl, build_common_decl):
1948 Set decl source locations.
1949 (gfc_trans_common): Set blank common block location.
1950 * trans-decl.c (gfc_set_decl_location): New function.
1951 (gfc_get_label_decl, gfc_get_symbol_decl): Use it.
1952 (trans_function_start): Move call to gfc_set_backend_locus..
1953 (build_function_decl): ... to here.
1954 (build_entry_thunks): Set and restore the backend locus.
1955 (gfc_generate_constructors): Remove excess arguments to
1956 init_function_start.
1957 (gfc_generate_block_data): Add comments. Set the decl locus.
1958 * trans-io.c (set_error_locus): Handle mapped locations.
1959 * trans.c (gfc_get_backend_locus, gfc_get_backend_locus): Ditto.
1960 (gfc_trans_code): Use SET_EXPR_LOCATION.
1961 (gfc_generate_code): Override the location of the new symbol.
1962 * trans.h (gfc_set_decl_location): Add prototype.
1964 2004-08-31 Paul Brook <paul@codesourcery.com>
1966 * trans-types.c (gfc_type_for_mode): Return NULL for unknown modes.
1968 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1971 * trans-intrinsic.c (gfc_conv_intrinsic_merge): Do the right thing for
1974 2004-09-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1979 * resolve.c (resolve_transfer): New function.
1980 (resolve_code): Call resolve_transfer in case of EXEC_TRANSFER.
1982 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1985 * trans-types.c (gfc_init_types): Make gfc_character1_type_node an
1988 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1990 * CONTRIB, NEWS, README, TODO: Remove obsolete files.
1992 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1995 * trans-types.c (gfc_return_by_reference): Remove TODO error,
1996 add comment pointing out possible issue WRT compatibility with g77.
1998 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2000 * trans-decl.c, trans-expr.c, trans-io.c, trans-types.c: Replace
2001 all occurences of 'gfc_strlen_type_node' by
2002 'gfc_charlen_type_node'.
2003 * trans-types.h: Same. Also update comment accordingly.
2005 2004-08-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2007 * primary.c: Update copyright boilerplate to say GCC.
2008 * f95-lang.c: Change initial comment to say gfortran.
2010 2004-08-31 Paul Brook <paul@codesourcery.com>
2012 * trans-types.h: Add comments.
2013 (intmax_type_node, string_type_node, const_string_type_node): Remove.
2015 2004-08-30 Richard Henderson <rth@redhat.com>
2017 * Make-lang.in (fortran/f95-lang.o): Update dependencies.
2018 (fortran/trans-decl.o, fortran/trans-types.o): Likewise.
2019 * gfortran.h (gfc_integer_info): Add c_char, c_short, c_int,
2020 c_long, c_long_long.
2021 (gfc_logical_info): Add c_bool.
2022 (gfc_real_info): Add mode_precision, c_float, c_double, c_long_double.
2023 * trans-array.c (gfc_array_allocate): Use TYPE_PRECISION
2024 rather than gfc_int[48]_type_node for allocate choice.
2025 * trans-decl.c (gfc_build_intrinsic_function_decls): Cache
2026 local copies of some kind type nodes.
2027 (gfc_build_builtin_function_decls): Likewise.
2028 * trans-expr.c (gfc_conv_power_op): Likewise.
2029 * trans-intrinsic.c (gfc_conv_intrinsic_index,
2030 gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify,
2031 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Likewise.
2032 * trans-stmt.c (gfc_trans_pause, gfc_trans_stop,
2033 gfc_trans_character_select, gfc_trans_allocate): Likewise.
2034 * trans-io.c (gfc_pint4_type_node): Move into ...
2035 (gfc_build_io_library_fndecls): ... here. Cache local copies of
2036 some kind type nodes.
2037 * trans-types.c (gfc_type_nodes): Remove.
2038 (gfc_character1_type_node, gfc_strlen_type_node): New.
2039 (gfc_integer_types, gfc_logical_types): New.
2040 (gfc_real_types, gfc_complex_types): New.
2041 (gfc_init_kinds): Fill in real mode_precision.
2042 (gfc_build_int_type, gfc_build_real_type): New.
2043 (gfc_build_complex_type, gfc_build_logical_type): New.
2044 (c_size_t_size): New.
2045 (gfc_init_types): Loop over kinds.
2046 (gfc_get_int_type, gfc_get_real_type): Use gfc_validate_kind.
2047 (gfc_get_complex_type, gfc_get_logical_type): Likewise.
2048 (gfc_get_character_type_len): Likewise.
2049 (gfc_type_for_size): Loop over kinds; use a reduced set of
2050 unsigned type nodes.
2051 (gfc_type_for_mode): Loop over kinds.
2052 (gfc_signed_or_unsigned_type): Use gfc_type_for_size.
2053 (gfc_unsigned_type, gfc_signed_type): Use gfc_signed_or_unsigned_type.
2054 * trans-types.h (F95_INT1_TYPE, F95_INT2_TYPE, F95_INT4_TYPE,
2055 F95_INT8_TYPE, F95_INT16_TYPE, F95_REAL4_TYPE, F95_REAL8_TYPE,
2056 F95_REAl16_TYPE, F95_COMPLEX4_TYPE, F95_COMPLEX8_TYPE,
2057 F95_COMPLEX16_TYPE, F95_LOGICAL1_TYPE, F95_LOGICAL2_TYPE,
2058 F95_LOGICAL4_TYPE, F95_LOGICAL8_TYPE, F95_LOGICAL16_TYPE,
2059 F95_CHARACTER1_TYPE, NUM_F95_TYPES, gfc_type_nodes,
2060 gfc_int1_type_node, gfc_int2_type_node, gfc_int4_type_node,
2061 gfc_int8_type_node, gfc_int16_type_node, gfc_real4_type_node,
2062 gfc_real8_type_node, gfc_real16_type_node, gfc_complex4_type_node,
2063 gfc_complex8_type_node, gfc_complex16_type_node,
2064 gfc_logical1_type_node, gfc_logical2_type_node,
2065 gfc_logical4_type_node, gfc_logical8_type_node,
2066 gfc_logical16_type_node, gfc_strlen_kind): Remove.
2067 (gfc_character1_type_node): Turn in to a variable.
2068 (gfc_strlen_type_node): Likewise.
2070 2004-08-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2072 * gfortran.h (gfc_namespace): Add new field is_block_data.
2073 * parse.c (accept_statement): Remove special handling for BLOCK DATA.
2074 (parse_block_data): Record BLOCK DATA name, set is_block_data field.
2075 * trans.c (gfc_generate_code): Handle BLOCK DATA units.
2076 * trans.h (gfc_generate_block_data): Add prototype.
2077 * trans-decl.c (gfc_generate_block_data): New function.
2079 2004-08-29 Richard Henderson <rth@redhat.com>
2081 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_export.
2082 * trans-types.c (gfc_init_kinds): Reject integer kinds larger
2083 than two HOST_WIDE_INT.
2085 2004-08-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2088 * decl.c (free_variable, free_value, gfc_free_data, var_list,
2089 var_element, top_var_list, match_data_constant, top_val_list,
2090 gfc_match_data): Move here from match.c.
2091 (match_old_style_init): New function.
2092 (variable_decl): Match old-style initialization.
2093 * expr.c (gfc_get_variable_expr): New function.
2094 * gfortran.h (gfc_get_variable_expr): Add prototype.
2095 * gfortran.texi: Start documentation for supported extensions.
2096 * match.c: Remove the functions moved to decl.c.
2097 * match.h (gfc_match_data): Move prototype to under decl.c.
2098 * symbol.c (gfc_find_sym_tree, gfc_find_symbol): Add/correct
2101 2004-08-29 Steven G. Kargl <kargls@comcast.net>
2102 Paul Brook <paul@codesourcery.com>
2104 * check.c (gfc_check_besn, gfc_check_g77_math1): New functions.
2105 * f95-lang.c (DO_DEFINE_MATH_BUILTIN): Define.
2106 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
2107 (build_builtin_fntypes): New function.
2108 (gfc_init_builtin_functions): Use it.
2109 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_{J,Y}{0,1,N}
2110 and GFC_ISYM_ERF{,C}.
2111 (gfc_c_int_kind): Declare.
2112 * intrinsic.c (add_functions): Add [d]bes* and [d]erf*.
2113 * intrinsic.h (gfc_check_besn, gfc_check_g77_math1, gfc_resolve_besn,
2114 gfc_resolve_g77_math1): Add prototypes.
2115 * resolve.c (gfc_resolve_besn, gfc_resolve_g77_math1): New functions.
2116 * mathbuiltins.def: Add comment. Change third argument. Use
2117 DEFINE_MATH_BUILTIN_C. Add bessel and error functions.
2118 * trans-intrinsic.c (BUILT_IN_FUNCTION): Define.
2119 (DEFINE_MATH_BUILTIN, DEFINE_MATH_BUILTIN_C): Use it.
2120 * trans-types.c (gfc_c_int_kind): Declare.
2121 (gfc_init_kinds): Set it.
2123 2004-08-29 Steven G. Kargl <kargls@comcast.net>
2124 Paul Brook <paul@codesourcery.com>
2126 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_GET?ID.
2127 (gfc_check_f, gfc_simplify_f): Add f0.
2128 * intrinsic.c (do_check): Call f0. Flatten.
2129 (add_sym_0): Fix prototype. Set f0.
2130 (add_functions): Add getgid, getgid and getuid.
2131 (resolve_intrinsic): Remove obsolete comment.
2132 (do_simplify): Call f0.
2133 * intrinsic.h (gfc_resolve_getgid, gfc_resolve_getpid,
2134 gfc_resolve_getuid): Add prototypes.
2135 * iresolve.c (gfc_resolve_getgid, gfc_resolve_getpid,
2136 gfc_resolve_getuid): New functions.
2137 * trans-intrinsic.c (gfc_conv_intrinsic_function): Handle
2140 2004-08-28 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2142 * error.c (gfc_error_init_1): Remove blank line in front of
2143 function body. Add missing blank.
2144 (gfc_buffer_error, error_char, error_string): Remove blank line in
2145 front of function body.
2146 (show_locus): Add comma in comment.
2147 (gfc_clear_warning, gfc_warning_check, gfc_clear_error,
2148 gfc_push_error, gfc_pop_error): Remove blank line in front of
2150 (gfc_get_errors): Typo fix in comment in front of function. Remove
2151 blank line in front of function body.
2153 2004-08-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2155 * gfortran.h (gfc_default_*_kind): Remove prototypes, add extern
2156 variable declaration of same name.
2157 * arith.c, check.c, decl.c, dump_parse_tree.c, expr.c,
2158 intrinsic.c, io.c, iresolve.c, match.c, options.c, primary.c,
2159 resolve.c, simplify.c, symbol.c, trans-const.c, trans-io.c:
2160 Replace all calls to gfc_default_*_kind with variable accesses.
2161 * trans-types.c: Same as above.
2162 (gfc_default_*_kind_1): Rename to gfc_default_*_kind, remove
2163 static qualifier. Replace all occurences.
2164 (gfc_default_*_kind): Remove functions.
2166 2004-08-26 Richard Henderson <rth@redhat.com>
2168 * arith.c: Include system.h, not real system headers.
2169 (MPZ_NULL, MPF_NULL, DEF_GFC_INTEGER_KIND, DEF_GFC_LOGICAL_KIND,
2170 DEF_GFC_REAL_KIND, GFC_SP_KIND, GFC_SP_PREC, GFC_SP_EMIN, GFC_SP_EMAX,
2171 GFC_DP_KIND, GFC_DP_PREC, GFC_DP_EMIN, GFC_DP_EMAX, GFC_QP_KIND,
2172 GFC_QP_PREC, GFC_QP_EMIN, GFC_QP_EMAX): Remove.
2173 (gfc_integer_kinds, gfc_logical_kinds, gfc_real_kinds,
2174 gfc_index_integer_kind, gfc_default_integer_kind,
2175 gfc_default_real_kind,gfc_default_double_kind,
2176 gfc_default_character_kind, gfc_default_logical_kind,
2177 gfc_default_complex_kind, validate_integer, validate_real,
2178 validate_logical, validate_character,
2179 gfc_validate_kind): Move to trans-types.c.
2180 (gfc_set_model_kind): Use gfc_validate_kind.
2181 (gfc_set_model): Just copy the current precision to default.
2182 (gfc_arith_init_1): Use mpfr precision 128 for integer setup.
2183 * f95-lang.c (gfc_init_decl_processing): Invoke gfc_init_kinds.
2184 * gfortran.h: Update file commentary.
2185 * trans-types.c (MAX_INT_KINDS, MAX_REAL_KINDS): New.
2186 (gfc_default_integer_kind_1, gfc_default_real_kind_1,
2187 gfc_default_double_kind_1, gfc_default_character_kind_1,
2188 gfc_default_logical_kind_1, gfc_default_complex_kind_1): New.
2189 (gfc_init_kinds): New.
2190 (gfc_init_types): Don't set gfc_index_integer_kind here.
2191 * trans-types.h (gfc_init_kinds): Declare.
2192 * doc/invoke.texi: Clarify DOUBLE PRECISION behaviour wrt -r8.
2194 2004-08-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2196 * check.c (gfc_check_atan2): New function.
2197 * intrinsic.c (add_functions): Use gfc_check_atan2 for ATAN2
2198 * intrinsic.h (gfc_check_atan2): Add prototype.
2200 2004-08-25 Richard Henderson <rth@redhat.com>
2202 * arith.c (gfc_validate_kind): Add may_fail argument; abort if
2203 false and we don't validate the kind.
2204 (gfc_check_integer_range, gfc_check_real_range): Update to match.
2205 * check.c (kind_check): Likewise.
2206 * decl.c (gfc_match_old_kind_spec, gfc_match_kind_spec): Likewise.
2207 (match_char_spec, match_logical_spec): Likewise.
2208 * gfortran.h (gfc_validate_kind): Likewise.
2209 * options.c (gfc_handle_option): Likewise.
2210 * primary.c (match_integer_constant, match_real_constant,
2211 match_string_constant, match_logical_constant,
2212 match_const_complex_part): Likewise.
2213 * simplify.c (get_kind, gfc_simplify_bit_size, gfc_simplify_digits,
2214 gfc_simplify_epsilon, gfc_simplify_huge, gfc_simplify_ibclr,
2215 gfc_simplify_ibset, gfc_simplify_ishft, gfc_simplify_ishftc,
2216 gfc_simplify_maxexponent, gfc_simplify_minexponent,
2217 gfc_simplify_nearest, gfc_simplify_not, gfc_simplify_precision,
2218 gfc_simplify_radix, gfc_simplify_range, gfc_simplify_rrspacing,
2219 gfc_simplify_scale, gfc_simplify_spacing, gfc_simplify_tan,
2220 gfc_simplify_tiny): Likewise.
2221 * trans-intrinsic.c (gfc_conv_intrinsic_aint, gfc_conv_intrinsic_mod,
2222 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
2223 prepare_arg_info): Likewise.
2225 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2227 * expr.c (gfc_check_assign): Add comment. Add new warning.
2228 * trans-expr.c (gfc_conv_function_call): Correctly dereference
2229 result of pointer valued function when not in pointer assignment.
2231 2004-08-25 Paul Brook <paul@codesourcery.com>
2233 * config-lang.in: Remove dead commented line.
2234 * module.c: Replace g95 with gfortran in comment.
2236 2004-08-25 Paul Brook <paul@codesourcery.com>
2239 * arith.c (gfc_mpfr_to_mpz): Workaround mpfr bug.
2241 2004-08-25 Paul Brook <paul@codesourcery.com>
2244 * trans-array.c (gfc_trans_allocate_temp_array): Remove
2245 string_length argument.
2246 (gfc_trans_array_ctor_element): New function.
2247 (gfc_trans_array_constructor_subarray): Use it.
2248 (gfc_trans_array_constructor_value): Ditto. Handle constant
2250 (get_array_ctor_var_strlen, get_array_ctor_strlen): New functions.
2251 (gfc_trans_array_constructor): Use them.
2252 (gfc_add_loop_ss_code): Update to new gfc_ss layout.
2253 (gfc_conv_ss_descriptor): Remember section string length.
2254 (gfc_conv_scalarized_array_ref): Ditto. Remove dead code.
2255 (gfc_conv_resolve_dependencies): Update to new gfc_ss layout.
2256 (gfc_conv_expr_descriptor): Ditto.
2257 (gfc_conv_loop_setup): Ditto. Spelling fixes.
2258 * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
2259 * trans-const.c (gfc_conv_constant): Update to new gfc_ss layout.
2260 * trans-expr.c (gfc_conv_component_ref): Turn error into ICE.
2261 (gfc_conv_variable): Set string_length from section.
2262 (gfc_conv_function_call): Remove extra argument.
2263 (gfc_conv_expr, gfc_conv_expr_reference): Update to new gfc_ss layout.
2264 * trans-types.c (gfc_get_character_type_len): New function.
2265 (gfc_get_character_type): Use it.
2266 (gfc_get_dtype): Return zero for internal types.
2267 * trans-types.h (gfc_get_character_type_len): Add prototype.
2268 * trans.h (struct gfc_ss): Move string_length out of union.
2270 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2272 * trans.h (build2_v, build3_v): New macros.
2274 * f95-lang.c (gfc_truthvalue_conversion): Use build2 instead of
2276 * trans-array.c (gfc_conv_descriptor_data,
2277 gfc_conv_descriptor_offset, gfc_conv_descriptor_dimension,
2278 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
2279 gfc_conv_descriptor_ubound, gfc_trans_allocate_array_storage,
2280 gfc_trans_allocate_temp_array,
2281 gfc_trans_array_constructor_subarray,
2282 gfc_trans_array_constructor_value, gfc_conv_array_index_ref,
2283 gfc_trans_array_bound_check, gfc_conv_array_index_offset,
2284 gfc_conv_scalarized_array_ref, gfc_conv_array_ref,
2285 gfc_conv_array_ref, gfc_trans_preloop_setup,
2286 gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
2287 gfc_conv_loop_setup, gfc_array_init_size,
2288 gfc_conv_array_initializer, gfc_trans_array_bounds,
2289 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
2290 gfc_conv_expr_descriptor, gfc_conv_array_parameter,
2291 gfc_trans_deferred_array): Use buildN and buildN_v macros instead
2292 of build and build_v as appropriate.
2293 * trans-common.c (create_common): Same.
2294 * trans-decl.c (gfc_trans_auto_character_variable,
2295 gfc_trans_entry_master_switch, gfc_generate_function_code): Same.
2296 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
2297 gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
2298 gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
2299 gfc_conv_expr_op, gfc_conv_function_call,
2300 gfc_trans_structure_assign): Same.
2301 * trans-intrinsic.c (build_fixbound_expr, build_round_expr,
2302 gfc_conv_intrinsic_aint, gfc_conv_intrinsic_bound,
2303 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
2304 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
2305 gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_minmax,
2306 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
2307 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_minmaxloc,
2308 gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
2309 gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_singlebitop,
2310 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
2311 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_strcmp,
2312 gfc_conv_allocated, gfc_conv_associated, prepare_arg_info,
2313 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
2314 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat,
2315 gfc_conv_intrinsic_iargc): Same.
2316 * trans-io.c (set_parameter_value, set_parameter_ref, set_string,
2317 set_flag, add_case, io_result, transfer_namelist_element,
2318 transfer_expr): Same.
2319 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_if_1,
2320 gfc_trans_arithmetic_if, gfc_trans_do, gfc_trans_do_while,
2321 gfc_trans_integer_select, gfc_trans_logical_select,
2322 gfc_trans_character_select, gfc_trans_forall_loop,
2323 gfc_trans_nested_forall_loop, gfc_do_allocate,
2324 generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
2325 compute_inner_temp_size, compute_overall_iter_number,
2326 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
2327 gfc_trans_forall_1, gfc_evaluate_where_mask,
2328 gfc_trans_where_assign, gfc_trans_allocate): Same.
2329 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Same.
2330 * trans.c (gfc_add_modify_expr, gfc_finish_block,
2331 gfc_build_array_ref, gfc_build_function_call,
2332 gfc_trans_runtime_check): Same.
2334 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2336 * trans-const.c (gfc_conv_mpz_to_tree): Change call to
2337 build_int_cst to build_int_cst_wide in accordance to Nathan's
2340 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
2342 * trans-array.c (gfc_trans_array_constructor_value): Adjust
2343 build_int_cst calls.
2344 * trans-const.c (gfc_build_string_const, gfc_init_constants,
2345 gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise.
2346 * trans-decl.c (gfc_get_symbol_decl, build_entry_thunks,
2347 gfc_trans_entry_master_switch): Likewise.
2348 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
2349 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
2350 * trans-io.c (add_case, set_error_locus,
2351 transfer_namelist_element, transfer_expr): Likewise.
2352 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
2353 gfc_trans_stop, gfc_trans_character_select): Likewise.
2354 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
2355 * trans.c (gfc_trans_runtime_check): Likewise.
2357 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2359 * trans-decl.c, trans-types.c: Add and remove blank lines as
2362 2004-08-24 Richard Henderson <rth@redhat.com>
2364 * trans-const.c (gfc_conv_mpz_to_tree): Fix 64-bit shift warning.
2366 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2368 * resolve.c (merge_argument_lists): Revert unintentionally
2371 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2373 * trans-decl.c (build_function_decl): Fix spelling in comment.
2374 (build_entry_thunks): Remove code with no function.
2375 (gfc_build_intrinsic_function_decls): Remove empty line.
2377 * resolve.c (resolve_entries): Fix a bunch of comment typos.
2379 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
2381 * f95-lang.c (gfc_init_decl_processing): Adjust
2382 build_common_tree_nodes call.
2384 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2386 * trans-types.c: Spelling and formatting fixes.
2388 2004-08-23 Richard Henderson <rth@redhat.com>
2390 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_getlimbn instead
2391 of going through an intermediate string. Fix 32/64 int/long bug.
2393 2004-08-23 Eric Christopher <echristo@redhat.com>
2395 * trans-types.c (gfc_type_for_mode): Remove VECTOR_TYPE_SUPPORTED_P
2396 usage. Use build_vector_type_for_mode for vector types.
2398 2004-08-22 Richard Henderson <rth@redhat.com>
2401 * data.c (find_con_by_offset): Search ordered list; handle
2402 elements with repeat counts.
2403 (gfc_assign_data_value_range): New.
2404 * gfortran.h (struct gfc_data_value): Make repeat unsigned.
2405 (gfc_assign_data_value_range): Declare.
2406 * match.c (top_val_list): Extract repeat count into a temporary.
2407 * resolve.c (values): Make left unsigned.
2408 (next_data_value): Don't decrement left.
2409 (check_data_variable): Use gfc_assign_data_value_range.
2411 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2413 * trans-const.c, trans-decl.c, trans-expr.c: Spelling fixes.
2415 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2417 * check.c (gfc_check_reduction): Rename to ...
2418 (check_reduction): ... this. Make static. Don't check type of
2420 (gfc_check_minval_maxval, gfc_check_prodcut_sum): New functions.
2421 * intrinsic.c (add_functions): Change MAXVAL, MINVAL, PRODUCT and
2422 SUM to use new check functions.
2423 (check_specific): Change logic to call new functions.
2424 * intrinsic.h (gfc_check_minval_maxval, gfc_check_product_sum):
2426 (gfc_check_reduction): Remove prototype.
2428 2004-08-20 Paul Brook <paul@codesourcery.com>
2429 Canqun Yang <canqun@nudt.edu.cn>
2432 * trans-array.c (gfc_conv_array_parameter): Pass correct pointer
2433 for automatic arrays.
2434 * trans-types.c (gfc_get_nodesc_array_type): Add comment.
2436 2004-08-19 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2440 * match.c (match_simple_forall, match_simple_where): Forward-declare.
2441 (gfc_match_if): Order statement list alphabetically, add WHERE and
2442 FORALL, remove double PAUSE.
2443 (gfc_match_simple_where, match_forall_header,
2444 gfc_match_simple_forall): New functions.
2445 (gfc_match_forall): Use match_forall_header.
2447 2004-08-19 Paul Brook <paul@codesourcery.com>
2450 * gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0.
2451 * symbol.c (gfc_clear_attr): Use memset.
2453 2004-08-19 Paul Brook <paul@codesourcery.com>
2457 * data.c (assign_substring_data_value): Remove.
2458 (create_character_intializer): New function.
2459 (gfc_assign_data_value): Track the typespec for the current
2460 subobject. Use create_character_intializer.
2462 2004-08-19 Erik Schnetter <schnetter@aei.mpg.de>
2465 * check.c (gfc_check_reduction): New function.
2466 (gfc_check_minval_maxval): Removed.
2467 (gfc_check_product): Removed.
2468 (gfc_check_sum): Removed.
2469 * intrinsic.h: Add/remove declarations for these.
2470 * gfortran.h: Add field f3red to union gfc_check_f.
2471 * intrinsic.c (add_sym_3red): New function.
2472 (add_functions): Register maxval, minval, product, and sum intrinsics
2473 through add_sym_3red.
2474 (check_specific): Handle f3red union field.
2475 * iresolve.c: Whitespace change.
2477 2004-08-18 Paul Brook <paul@codesourcery.com>
2479 * trans-types.c (gfc_sym_type): Use pointer types for optional args.
2481 2004-08-18 Victor Leikehman <lei@il.ibm.com>
2484 * trans-io.c (transfer_namelist_element): New. Recursively handle
2485 derived-type variables. Pass string lengths.
2486 (build_dt): Code moved to build_namelist, with some
2487 changes and additions.
2488 (gfc_build_io_library_fndecls): Declare the fifth
2489 argument in st_set_nml_var_char -- string_length.
2491 2004-08-17 Paul Brook <paul@codesourcery.com>
2492 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2495 * decl.c (get_proc_name): Update mystery comment.
2496 (gfc_match_entry): Check for errors earlier. Add entry point to list.
2497 * dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes.
2498 * gfortran.h (symbol_attribute): Add entry_master. Document entry.
2499 (struct gfc_entry_list): Define.
2500 (gfc_get_entry_list): Define.
2501 (struct gfc_namespace): Add refs and entries.
2502 (enum gfc_exec_op): Add EXEC_ENTRY.
2503 (struct gfc_code): Add ext.entry.
2504 * module.c (ab_attribute, attr_bits): Remove AB_ENTRY.
2505 (mio_symbol_attribute): Don't save/reture addr->entry.
2506 (mio_namespace_ref): Refcount namespaces.
2507 * parse.c (accept_statement): Handle ST_ENTRY.
2508 (gfc_fixup_sibling_symbols): Mark symbol as referenced.
2509 (parse_contained): Fixup sibling references to entry points
2510 after parsing the procedure body.
2511 * resolve.c (resolve_contained_fntype): New function.
2512 (merge_argument_lists, resolve_entries): New functions.
2513 (resolve_contained_functions): Use them.
2514 (resolve_code): Handle EXEC_ENTRY.
2515 (gfc_resolve): Call resolve_entries.
2516 * st.c (gfc_free_statement): Handle EXEC_ENTRY.
2517 * symbol.c (gfc_get_namespace): Refcount namespaces.
2518 (gfc_free_namespace): Ditto.
2519 * trans-array.c (gfc_trans_dummy_array_bias): Treat all args as
2520 optional when multiple entry points are present.
2521 * trans-decl.c (gfc_get_symbol_decl): Remove incorrect check.
2522 (gfc_get_extern_function_decl): Add assertion. Fix coment.
2523 (create_function_arglist, trans_function_start, build_entry_thunks):
2525 (gfc_build_function_decl): Rename ...
2526 (build_function_decl): ... to this.
2527 (gfc_create_function_decl): New function.
2528 (gfc_generate_contained_functions): Use it.
2529 (gfc_trans_entry_master_switch): New function.
2530 (gfc_generate_function_code): Use new functions.
2531 * trans-stmt.c (gfc_trans_entry): New function.
2532 * trans-stmt.h (gfc_trans_entry): Add prototype.
2533 * trans-types.c (gfc_get_function_type): Add entry point argument.
2534 * trans.c (gfc_trans_code): Handle EXEC_ENTRY.
2535 (gfc_generate_module_code): Call gfc_create_function_decl.
2536 * trans.h (gfc_build_function_decl): Remove.
2537 (gfc_create_function_decl): Add prototype.
2539 2004-08-15 Andrew Pinski <apinski@apple.com>
2542 * f95-lang.c (gfc_init_builtin_functions): Initialize the builtins
2543 for cabs{,f} and copysign{,f}.
2544 * trans-decl.c (gfor_fndecl_math_cabsf): Delete.
2545 (gfor_fndecl_math_cabs): Delete.
2546 (gfor_fndecl_math_sign4): Delete.
2547 (gfor_fndecl_math_sign8): Delete.
2548 (gfc_build_intrinsic_function_decls): Remove the
2549 initializing of cabs{,f} and copysign{,f} functions.
2550 * trans-intrinsic.c (gfc_conv_intrinsic_abs): Use the builtins
2551 instead of the functions definitions.
2552 (gfc_conv_intrinsic_sign): Likewise.
2553 * trans.h (gfor_fndecl_math_cabsf): Delete.
2554 (gfor_fndecl_math_cabs): Delete.
2555 (gfor_fndecl_math_sign4): Delete.
2556 (gfor_fndecl_math_sign8): Delete.
2558 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
2560 * trans-array.c (gfc_trans_array_constructor_value): Use
2562 * trans-const.c (gfc_build_string_const,
2563 gfc_init_constants, gfc_conv_mpz_to_tree,
2564 gfc_conv_constant_to_tree): Likewise.
2565 * trans-decl.c (gfc_get_symbol_decl): Likewise.
2566 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
2567 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
2568 * trans-io.c (add_case, set_error_locus, build_dt,
2569 transfer_expr): Likewise.
2570 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
2571 gfc_trans_stop, gfc_trans_character_select): Likewise.
2572 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
2573 * trans.c (gfc_trans_runtime_check): Likewise.
2575 2004-08-14 Paul Brook <paul@codesourcery.com>
2577 * trans-decl.c (gfc_build_function_decl): Remove dead code.
2579 2004-08-14 Paul Brook <paul@codesourcery.com>
2581 * trans-arry.c (gfc_trans_auto_array_allocation): Remove unused var.
2583 2004-08-13 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2585 * gfortran.h: Add comments.
2586 * parse.c (parse_contained): Fix comment typo.
2587 * resolve.c (was_declared): Ditto.
2590 2004-08-11 Paul Brook <paul@codeourcery.com>
2593 * intrinsic.c (add_functions): Add dfloat as an alias for dble.
2595 2004-08-10 Richard Henderson <rth@redhat.com>
2597 * f95-lang.c (gfc_init_builtin_functions): Remove
2598 __builtin_stack_alloc, add __builtin_alloca.
2599 * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR.
2600 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
2602 2004-08-10 Paul Brook <paul@codesourcery.com>
2604 * trans-io.c (transfer_expr): Handle pointters.
2606 2004-08-10 Paul Brook <paul@codesourcery.com>
2609 * trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT.
2610 (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta.
2611 (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary):
2612 Handle GFC_SS_COMPONENT.
2613 (gfc_conv_ss_startstride): Ditto. Set ss->shape.
2614 (gfc_conv_loop_setup): Tweak commends. Remove dead code.
2616 (gfc_conv_array_initializer): Call specific initializer routines.
2617 * trans-expr.c (gfc_trans_structure_assign): New function.
2618 (gfc_trans_subarray_assign): New function.
2619 (gfc_trans_subcomponent_assign): New fucntion
2620 (gfc_conv_structure): Use them.
2621 * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT.
2622 (gfc_ss): Add shape.
2624 2004-08-08 Victor Leikehman <lei@il.ibm.com>
2626 * simplify.c (gfc_simplify_shape): Bugfix.
2627 * expr.c (gfc_copy_shape_excluding): New function.
2628 * gfortran.h (gfc_get_shape): Bugfix.
2629 (gfc_copy_shape_excluding): Added declaration.
2630 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
2631 gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound,
2632 gfc_resolve_ubound, gfc_resolve_transpose): Added compile
2633 time resolution of shape.
2635 2004-08-06 Janne Blomqvist <jblomqvi@cc.hut.fi>
2637 * intrinsic.c (add_subroutines): Add getenv and
2638 get_environment_variable. (add_sym_5s): New function.
2639 * intrinsic.h (gfc_resolve_get_environment_variable): Add
2641 * iresolve.c (gfc_resolve_get_environment_variable): New
2644 2004-08-06 Feng Wang <fengwang@nudt.edu.cn>
2646 * f95-lang.c (gfc_init_builtin_functions): Fix the number of
2647 __builtin_pow[f] arguments.
2649 2004-08-06 Steven G. Kargl <kargls@comcast.net>
2651 * arith.c: Add #define for model numbers. Remove global GMP variables.
2652 (natural_logarithm,common_logarithm,exponential,sine,
2653 cosine,arctangent,hypercos,hypersine ): Remove.
2654 (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions.
2655 (arctangent2,gfc_arith_init_1,gfc_arith_done_1
2656 gfc_check_real_range, gfc_constant_result, gfc_range_check,
2657 gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times,
2658 gfc_arith_divide,complex_reciprocal,complex_pow_ui,
2659 gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real,
2660 gfc_convert_complex,gfc_int2real,gfc_int2complex,
2661 gfc_real2int,gfc_real2real,gfc_real2complex,
2662 gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP
2663 to MPFR, use new functions.
2664 * arith.h: Remove extern global variables.
2665 (natural_logarithm,common_logarithm,exponential, sine, cosine,
2666 arctangent,hypercos,hypersine): Remove prototypes.
2667 (arctangent2): Update prototype from GMP to MPFR.
2668 (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes.
2669 * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR.
2670 * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR.
2671 * gfortran.h (GFC_REAL_BITS): Remove.
2672 (arith): Add ARITH_NAN.
2673 Include mpfr.h. Define GFC_RND_MODE.
2674 Rename GCC_GFORTRAN_H GFC_GFC_H.
2675 (gfc_expr): Convert GMP to MPFR.
2676 * module.c: Add arith.h, correct type in comment.
2677 (mio_gmp_real): Convert GMP to MPFR.
2678 (mio_expr): Use gfc_set_model_kind().
2679 * primary.c: Update copyright date with 2004.
2680 (match_real_constant,match_const_complex_part): Convert GMP to MPFR.
2681 * simplify.c: Remove global GMP variables
2682 (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag,
2683 gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint,
2684 gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan,
2685 gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx,
2686 gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh,
2687 gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon,
2688 gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor,
2689 gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int,
2690 gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log,
2691 gfc_simplify_log10,simplify_min_max,gfc_simplify_mod,
2692 gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint,
2693 gfc_simplify_rrspacing,gfc_simplify_scale,
2694 gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin,
2695 gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt,
2696 gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny,
2697 gfc_simplify_init_1,gfc_simplify_done_1): Convert GMP to MPFR.
2699 * trans-const.c (gfc_conv_mpfr_to_tree): Rename from
2700 gfc_conv_mpf_to_tree. Convert it to use MPFR
2701 (gfc_conv_constant_to_tree): Use it.
2702 * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree().
2703 * trans-intrinsic.c: Add arith.h, remove gmp.h
2704 (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR.
2706 2004-08-06 Victor Leikehman <lei@il.ibm.com>
2707 Paul Brook <paul@codesourcery.com>
2709 * trans-array.c (gfc_trans_allocate_array_storage,
2710 gfc_trans_allocate_temp_array, gfc_add_loop_ss_code,
2711 gfc_conv_loop_setup): For functions, if the shape of the result
2712 is not known in compile-time, generate an empty array descriptor for
2713 the result and let the callee to allocate the memory.
2714 (gfc_trans_dummy_array_bias): Do nothing for pointers.
2715 (gfc_conv_expr_descriptor): Use function return values directly.
2716 * trans-expr.c (gfc_conv_function_call): Always add byref call
2718 (gfc_trans_pointer_assignment): Add comments.
2719 (gfc_trans_arrayfunc_assign): Don't chain on expression.
2721 2004-08-01 Roger Sayle <roger@eyesopen.com>
2723 * options.c (gfc_init_options): Don't warn about the use GNU
2724 extensions by default.
2725 (gfc_post_options): Warn about GNU extensions with -pedantic.
2726 (gfc_handle_option): Don't warn about GNU extensions with -std=gnu.
2728 2004-07-30 Richard Henderson <rth@redhat.com>
2730 * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL
2733 2004-07-25 Richard Henderson <rth@redhat.com>
2735 * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL
2736 and DECL_IGNORED_P on RESULT_DECL.
2737 (gfc_generate_constructors): Likewise.
2739 2004-07-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2742 * lang.opt (ffixed-line-length-none, ffixed-line-length-): New
2744 (ffixed-line-length-80, ffixed-line-length-132): Remove.
2745 * options.c (gfc_handle_options): Deal with changed options.
2746 * scanner.c (load_line): Change second arg to 'char **',
2747 allocate if pointing to NULL. Keep track of buffer's length.
2748 Adapt buffer size to overlong lines. Pad lines to full length
2750 (load_file): Adapt to new interface of load_line.
2752 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
2754 * trans.h (builtin_function): Declare.
2756 2004-07-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2759 (parts ported from g95)
2760 * parse.h (gfc_state_data): New field do_variable.
2761 (gfc_check_do_variable): Add prototype.
2762 * parse.c (push_state): Initialize field 'do_variable'.
2763 (gfc_check_do_variable): New function.
2764 (parse_do_block): Remember do iterator variable.
2765 (parse_file): Initialize field 'do_variable'.
2766 * match.c (gfc_match_assignment, gfc_match_do,
2767 gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate):
2768 Add previously missing checks.
2769 (gfc_match_return): Reformat error message.
2770 * io.c (match_out_tag): New function.
2771 (match_open_element, match_close_element,
2772 match_file_element, match_dt_element): Call match_out_tag
2773 instead of match_vtag where appropriate.
2774 (match_io_iterator, match_io_element): Add missing check.
2775 (match_io): Reformat error message.
2776 (match_inquire_element): Call match_out_tag where appropriate.
2778 * parse.c (gfc_check_do_variable): Fix error locus.
2780 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2783 * trans-decl.c (gfc_build_function_decl): Create a new chardecl
2784 for every assumed length character dummy argument.
2787 * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion.
2790 * simplify.c (gfc_simplify_bound): Copy the bound expression.
2792 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2795 * trans-array.c gfc_trans_g77_array,
2796 gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init
2797 for assumed length characters.
2798 (gfc_conv_expr_descriptor): Set se->string_length if dealing
2799 with a character expression.
2800 (gfc_cvonv_array_parameter): Pass string length when passing
2801 character array according to g77 conventions.
2803 2004-07-12 Paul Brook <paul@codesourcery.com>
2805 * expr.c (gfc_check_assign_symbol): Handle pointer assignments.
2806 * trans-array.c (gfc_trans_auto_array_allocation): Remove
2807 initialization code.
2808 * trans-common.c (create_common): Use gfc_conv_initializer.
2809 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer.
2810 * trans-expr.c (gfc_conv_initializer): New function.
2811 (gfc_conv_structure): Use it.
2812 * trans.h (gfc_conv_initializer): Add prototype.
2814 2004-07-11 Paul Brook <paul@codesourcery.com>
2817 * parse.c (gfc_fixup_sibling_symbols): Also look for untyped
2819 (parse_contained): Mark contained symbols as referenced.
2821 2004-07-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2824 * module.c (gfc_dump_module, gfc_use_module): Print locus
2825 when opening of module file fails.
2828 * io.c (match_io): Flag 'WRITE(...), ...' as extension.
2831 * match.c (gfc_match_program): A program name is obligatory.
2832 (gfc_match_return): RETURN in main program is an extension.
2833 (gfc_match_block_data): A space is required before a block data
2837 * primary.c (match_boz_constant): Call gfc_notify_std only if
2838 we actually have a non-standard boz-literal-constant.
2841 * expr.c (gfc_check_assign): Print ranks if incompatible. Issue
2842 warning if assigning NULL().
2844 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
2846 * f95-lang.c (set_block): Remove.
2847 (gfc_clear_binding_stack): New.
2848 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
2849 (struct binding_level): Remove block_created_by_back_end.
2850 (clear_binding_level): Likewise.
2851 (poplevel): Don't handle block_created_by_back_end.
2853 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2855 * trans-decl.c (gfc_create_module_variable): Nothing to do if
2856 symbol is in common, because we ...
2857 (gfc_generate_module_vars): Call gfc_trans_common.
2859 2004-07-10 Paul Brook <paul@codesourcery.com>
2861 * trans-array.c (gfc_build_null_descriptor): New function.
2862 (gfc_trans_static_array_pointer): Use it.
2863 * trans-array.h (gfc_build_null_descriptor): Add prototype.
2864 * trans-expr.c (gfc_conv_structure): Handle array pointers.
2866 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2869 * decl.c (gfc_match_save): Use-associated common block
2871 * gfortran.h (gfc_common_head): Add new field 'name'.
2872 Fix typo in comment after #endif.
2873 * match.c (gfc_get_common): Add new argument from_common,
2874 mangle name if flag is set, fill in new field in structure
2876 (match_common): Set new arg in call to gfc_get_common,
2877 use-associated common block doesn't collide.
2878 * match.h (gfc_get_common): Adapt prototype.
2879 * module.c (load_commons): Set new arg in call to
2881 * symbol.c (free_common_tree): New function.
2882 (gfc_free_namespace): Call new function.
2883 * trans-common.c (several functions): Remove argument
2884 'name', use name from gfc_common_head instead.
2886 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2888 * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
2889 and RHS match. Return early if the RHS is NULL().
2892 * match.c (match_common): Fix error reporting for used common.
2895 * trans-expr.c (gfc_conv_structure): Handle initialization
2896 of scalar pointer components.
2898 * parse.c (decode_statement): Fix matching of BLOCK DATA.
2900 * trans-decl.c (generate_local_decl): Remove workaround obsoleted
2901 by fix for PR 15481.
2903 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2905 * trans-common.c: Fix whitespace issues, make variable names
2907 (create_common): Additionally, make loop logic more obvious.
2909 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2910 Paul Brook <paul@codesourcery.com>
2913 * trans-common.c (calculate_length): Remove ...
2914 (get_segment_info): Merge into here. Save field type.
2915 (build_field): Use saved type.
2916 (create_common, new_condition, new_segment, finish_equivalences):
2917 Use new get_segment_info.
2918 * trans-types.c: Update comment.
2920 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2923 * moduele.c (mio_symbol): Don't I/O initial values unless
2924 symbol is a parameter.
2926 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2929 * resolve.c (resolve_symbol): Verify that the shape of a
2930 parameter array is not only explicit, but also constant.
2931 * array.c (gfc_is_compile_time_shape): New function.
2932 * gfortran.h (gfc_is_compile_time_shape): Add prototype.
2934 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
2940 * module.c (write_symbol, write_symtree): Remove workaround.
2941 * primary.c (match_actual_arglist): Enhance comment.
2942 (gfc_match_rvalue): Handle function call with first argument
2943 a keyword argument correctly.
2944 * resolve.c (resolve_symbol): Change call to
2945 gfc_set_default_type to issue error if no implicit type
2947 * trans-decl.c (gfc_create_module_variable): Remove workaround.
2949 2004-07-08 Paul Brook <paul@codesourcery.com>
2951 * intrinsic.c (add_sym_4s): New function.
2952 (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
2954 2004-07-04 Janne Blomqvist <jblomqvi@cc.hut.fi>
2955 Paul Brook <paul@codesourcery.com>
2959 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
2960 GFC_ISYM_COMMAND_ARGUMENT_COUNT.
2961 * intrinsic.c (add_functions): Identify iargc. Add
2962 command_argument_count.
2963 (add_subroutines): Resolve getarg. Add get_command and
2964 get_command_argument.
2965 * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
2966 gfc_resolve_get_command_argument): Add prototypes.
2967 * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
2968 gfc_resolve_get_command_argument): New functions.
2969 * trans-decl.c (gfor_fndecl_iargc): New variable.
2970 (gfc_build_intrinsic_function_decls): Set it.
2971 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
2972 (gfc_conv_intrinsic_function): Use it.
2973 * trans.h (gfor_fndecl_iargc): Declare.
2975 2004-07-04 Matthias Klose <doko@debian.org>
2977 * Make-lang.in: Generate and install gfortran man page.
2978 * invoke.texi: Remove extra '@c man end'.
2980 2004-07-04 Richard Henderson <rth@redhat.com>
2982 * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
2984 2004-07-04 Paul Brook <paul@codesourcery.com>
2986 * decl.c (gfc_match_implicit_range): Don't use typespec.
2987 (gfc_match_implicit): Handle character selectors.
2988 * gfortran.h (gfc_set_implicit): Remove prototype.
2989 (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
2990 * parse.c (accept_statement): Don't call gfc_set_implicit.
2991 * symbol.c (new_ts): Remove.
2992 (gfc_set_implicit_none): Use same loop bounds as other functions.
2993 (gfc_set_implicit): Remove.
2994 (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
2995 (gfc_merge_new_implicit): Combine with gfc_set_implicit.
2997 2004-06-30 Richard Henderson <rth@redhat.com>
2999 * match.c (var_element): Remove unused variable.
3001 * trans-decl.c (gfc_generate_function_code): Don't set
3002 x_whole_function_mode_p.
3003 (gfc_generate_constructors): Likewise.
3005 2004-06-30 Richard Henderson <rth@redhat.com>
3007 * trans-decl.c (gfc_generate_function_code): Don't set
3008 immediate_size_expand.
3009 (gfc_generate_constructors): Likewise.
3011 2004-06-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3014 * decl.c (gfc_match_type_spec): Rename second argument to
3015 'implicit_flag', reverse meaning. Don't match_char_spec if
3016 'implicit_flag' is set. Rename to ...
3017 (match_type_spec): ... this.
3018 (gfc_match_implicit_none, match_implicit_range): Move here
3020 (gfc_match_implicit): Move here from match.c, try to
3021 match_char_len if match_implicit_range doesn't succeed for
3022 CHARACTER implicits. Call renamed fucntion match_type_spec.
3023 (gfc_match_data_decl, match_prefix): Call renamed function
3025 * match.c (gfc_match_implicit_none, match_implicit_range,
3026 gfc_match_implicit): Move to decl.c.
3027 * match.h (gfc_match_implicit_none, gfc_match_implicit):
3028 Move protoypes to section 'decl.c'.
3029 (gfc_match_type_spec): Remove prototype.
3031 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3033 * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
3036 2004-06-29 Steven Bosscher <stevenb@suse.de>
3038 Make sure types in assignments are compatible. Mostly mechanical.
3039 * trans-const.h (gfc_index_one_node): New define.
3040 * trans-array.c (gfc_trans_allocate_array_storage,
3041 gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
3042 gfc_trans_array_constructor_value, gfc_trans_array_constructor,
3043 gfc_conv_array_ubound, gfc_conv_array_ref,
3044 gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
3045 gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
3046 gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
3047 gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
3048 types in assignments, conversions and conditionals for expressions.
3049 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
3050 gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
3051 gfc_conv_function_call, gfc_trans_pointer_assignment,
3052 gfc_trans_scalar_assign): Likewise.
3053 * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
3054 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
3055 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
3056 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
3057 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
3058 gfc_conv_allocated, gfc_conv_associated,
3059 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
3060 * trans-io.c (set_string): Likewise.
3061 * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
3062 gfc_do_allocate, generate_loop_for_temp_to_lhs,
3063 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
3064 compute_overall_iter_number, gfc_trans_assign_need_temp,
3065 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
3066 gfc_evaluate_where_mask, gfc_trans_where_assign,
3067 gfc_trans_where_2): Likewise.
3068 * trans-types.c (gfc_get_character_type, gfc_build_array_type,
3069 gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
3071 * trans.c (gfc_add_modify_expr): Add sanity check that types
3072 for the lhs and rhs are the same for scalar assignments.
3074 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3076 * dump-parse-tree.c (show_common): New function.
3077 (gfc_show_namespace): Show commons.
3079 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3080 Andrew Vaught <andyv@firstinter.net>
3084 * decl.c (gfc_match_save): Adapt to new common structures,
3085 don't allow saving USE-associated common.
3086 * dump-parse-tree (gfc_show_attr): (saved_)common are not
3087 symbol attributes any longer.
3088 (gfc_show_symbol): Don't show old-style commons any longer.
3089 (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
3091 * gfortran.h (symbol_attribute): Remove common and saved_common
3093 (gfc_symbol): Remove common_head element.
3094 (gfc_common_head): New struct.
3095 (gfc_get_common_head): New macro.
3096 (gfc_symtree): Add field 'common' to union.
3097 (gfc_namespace): Add field 'common_root'; change type of field
3098 'blank_common' to blank_common.
3099 (gfc_add_data): New prototype.
3100 (gfc_traverse_symtree): Expect a symtree as first argument
3101 instead of namespace.
3102 * match.c (gfc_get_common): New function.
3103 (match_common_name): Change to take char * as argument, adapt,
3104 fix bug with empty name.
3105 (gfc_match_common): Adapt to new data structures. Disallow
3106 redeclaration of USE-associated COMMON-block. Fix bug with
3108 (var_element): Adapt to new common structures.
3109 * match.h (gfc_get_common): Declare.
3110 * module.c: Add 2004 to copyright years, add commons to module
3111 file layout description.
3112 (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
3113 for removed attributes.
3114 (mio_symbol): Adapt to new way of storing common relations.
3115 (load_commons): New function.
3116 (read_module): Skip common list on first pass, load_commons at
3118 (write_commons): New function.
3119 (write_module): Call write_commons().
3120 * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
3121 functions related to removed attributes.
3122 (gfc_add_data): New function.
3123 (gfc_clear_attr): Don't set removed attributes.
3124 (gfc_copy_attr): Don't copy removed attributes.
3125 (traverse_symtree): Remove.
3126 (gfc_traverse_symtree): Don't traverse symbol
3127 tree of the passed namespace, but require a symtree to be passed
3128 instead. Unify with traverse_symtree.
3129 (gfc_traverse_ns): Call gfc_traverse_symtree according to new
3131 (save_symbol): Remove setting of removed attribute.
3132 * trans-common.c (gfc_sym_mangled_common_id): Change to
3133 take 'char *' argument instead of 'gfc_symbol'.
3134 (build_common_decl, new_segment, translate_common): Adapt to new
3135 data structures, add new
3137 (create_common): Adapt to new data structures, add new
3138 argument name. Fix typo in intialization of derived types.
3139 (finish_equivalences): Add second argument in call to
3141 (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
3142 (gfc_trans_common): Adapt to new data structures.
3143 * trans-decl.c (gfc_create_module_variables): Remove test for
3146 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3148 * io.c: Add 2004 to copyright years.
3150 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3151 Andrew Vaught <andyv@firstinter.net>
3153 * gfortran.h (gfc_gsymbol): New typedef.
3154 (gfc_gsym_root): New variable.
3155 (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
3156 * parse.c (global_used): New function.
3157 (parse_block_data): Check for double empty BLOCK DATA,
3158 use global symbol table.
3159 (parse_module): Use global symbol table.
3160 (add_global_procedure, add_global_program): New functions.
3161 (gfc_parse_file): Use global symbol table.
3162 * symbol.c (gfc_gsym_root): New variable.
3163 (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
3166 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3168 * module.c (mio_gmp_real): Correct writing of negative numbers.
3170 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3173 * expr.c (check_intrinsic_op): Allow comparison of characters.
3176 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3177 Andrew Vaught <andyv@firstinter.net>
3179 * decl.c (contained_procedure): New function.
3180 (match_end): Verify correctness of END STATEMENT in
3183 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3184 Andrew Vaught <andyv@firstinter.net>
3187 * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
3188 (decode_statement): Enforce required space in free-form.
3190 2004-06-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3192 * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
3193 * trans-array.c (gfc_conv_descriptor_data): Add operand
3195 (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
3196 (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
3197 (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
3198 * trans-common.c (create_common): Likewise.
3199 * trans-expr.c (gfc_conv_component_ref): Likewise.
3200 * trans-io.c (set_parameter_value): Likewise.
3201 (set_parameter_ref, set_string, set_flag, io_result): Likewise.
3202 (transfer_expr): Likewise.
3203 * trans-decl.c (gfc_trans_auto_character_variable):
3204 Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
3205 (gfc_gimplify_function): New function.
3206 (gfc_generate_function-code): Properly handle nested functions.
3207 * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
3209 2004-06-22 Janne Blomqvist <jblomqvi@cc.hut.fi>
3212 * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
3213 (gfc_resolve_inquire): Resolve the iolength tag. Return
3214 SUCCESS at end of function if no failure has occured.
3215 * resolve.c (resolve_code): Resolve if iolength is encountered.
3216 * trans-io.c: (ioparm_iolength, iocall_iolength,
3217 iocall_iolength_done): New variables.
3218 (last_dt): Add IOLENGTH.
3219 (gfc_build_io_library_fndecls ): Set iolength related variables.
3220 (gfc_trans_iolength): Implement.
3221 (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
3223 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de
3226 * scanner.c (load_line): Don't truncate preprocessor lines.
3227 Reformat error message.
3228 (preprocessor_line): Issue warning in case of malformed
3231 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3233 * resolve.c (resolve_symbol): Add comment in function body.
3234 (check_data_variable): Change type of mark to ar_type, adapt code
3237 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3239 * array.c (gfc_insert_constructor): Avoid redundant call to
3240 mpz_comp. Add 2004 to copyright years.
3242 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
3244 * trans.h (stmtblock_t): Change has_scope to unsigned int.
3246 2004-06-20 Steven G. Kargl <kargls@comcast.net>
3248 * arith.c (gfc_range_check): correct complex underflow.
3250 2004-06-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3253 * match.c (match_case_selector): Call gfc_match_init_expr
3254 instead of gfc_match_expr.
3255 * resolve.c (validate_case_label_expr): No need to check for
3256 constant, since it wouldn't have been matched with the fix to
3259 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3262 * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
3265 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3268 * trans-deecl.c (generate_local_decl): Do not issue warning for
3269 unused variables if they're use associated.
3271 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3272 Andrew Vaught <andyv@firstinter.net>
3275 * gfortran.h (gfc_check_f): Add new field f3ml.
3276 * check.c (gfc_check_minloc_maxloc): Take argument list instead
3277 of individual arguments, reorder if necessary.
3278 * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
3279 * intrinsic.c (add_sym_3ml): New function.
3280 (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
3281 (check_specific): Catch special case MINLOC, MAXLOC.
3283 2004-06-14 Paul Brook <paul@codesourcery.com>
3285 * intrinsic.c (add_sym_2s): Use correct function types.
3287 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3289 * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize. Move data.c
3290 * data.c (gfc_get_section_index): Remove dependency on trans.h.
3292 2004-06-12 Steven G. Kargl <kargls@comcast.net>
3294 * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
3295 gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
3296 * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
3297 GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
3298 * trans-intrinsic.c: Use symbols.
3299 * intrinsic.c (add_sym_2s): New function.
3300 * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
3301 * intrinsic.h: Function prototypes.
3302 * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
3303 gfc_resolve_srand): New functions.
3305 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3308 * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
3309 contained procedure.
3311 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3314 * interface.c (compare_parameter, compare_actual_formal): Don't
3315 check types and array shapes for NULL()
3316 * trans-expr.c (conv_function_call): No double indirection for
3319 2004-06-09 Toon Moene <toon@moene.indiv.nluug.nl>
3321 * trans-expr.c (gfc_conv_cst_int_power): Compute
3322 x**(-n) by converting it to (1/x)**n instead of
3325 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3328 * module.c (write_symbol, write_symtree): Don't write symbols
3329 wrongly added to namespace.
3330 * trans-decl.c (gfc_create_module_variable): Don't create a
3331 backend decl for a symbol incorrectly added to namespace.
3333 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3336 * resolve.c (resolve_symbol): Verify that parameter array has an
3337 explicit shape. Fix typos and coding style issues in surrounding
3340 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3343 * gfortran.texi: The documentation doesn't contain infomration on
3344 how to report bugs, and shouldn't, so remove the line which
3347 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3349 * intrinsic.c (sort_actual): Keep track of type of missing
3350 arguments. (Missing from previous commit.)
3352 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3354 * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
3355 * interface.c (compare_actual_formal): Keep type of omitted
3357 * trans-expr.c (gfc_conv_function_call): Add string length
3358 argument for omitted string argument.
3360 2004-06-03 Paul Brook <paul@codesourcery.com>
3362 * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
3363 lists instead of compound expr chains.
3364 (gfc_trans_code): Annotate statement lists.
3366 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3368 * trans-array.c: Fix spelling in comments.
3370 2004-06-02 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3373 * data.c (assign_substring_data_value): New function.
3374 (gfc_assign_data_value): Call the new function if we're dealing
3375 with a substring LHS.
3377 2004-06-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3380 * gfortran.h (GFC_VERSION): Remove.
3381 * gfortran.texi (version-gfortran): Remove, replace by version-GCC
3384 2004-05-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3386 * trans-types.c: Fix spelling & layout in comments.
3388 2004-05-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3391 * trans-const.c (gfc_conv_string_init): Allow variable string
3392 length lower than initialization string length.
3394 2004-05-30 Paul Brook <paul@codesourcery.com>
3397 * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
3398 * trans-expr.c (gfc_trans_string_copy): New function.
3399 (gfc_conv_statement_function): Use them. Create temp vars. Enforce
3401 (gfc_conv_string_parameter): Use gfc_trans_string_copy.
3402 * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
3403 * trans.h (struct gfc_saved_var): Define.
3404 (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
3406 2004-05-30 Steven G. Kargl <kargls@comcast.net>
3408 * iresolve.c (gfc_resolve_random_number): Clean up conditional.
3410 2004-05-29 Steven G. Kargl <kargls@comcast.net>
3412 * simplify.c (gfc_simplify_log): Remove useless line of code.
3414 2004-05-29 Paul Brook <paul@codesourcery.com>
3416 * trans-common.c (find_equivalence): Find multiple rules.
3418 2004-05-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3420 * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
3421 (gfc_current_locus): Declare new global variable.
3422 * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
3423 (gfc_current_locus1): Rename ...
3424 (gfc_current_locus): ... to this.
3425 (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
3426 skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
3427 gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
3428 gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
3429 and gfc_current_locus(), respectively.
3430 * array.c (match_subscript, gfc_match_array_ref, match_array_list,
3431 match_array_cons_element, gfc_match_array_constructor):
3432 Read/modify gfc_current_locus instead of calling gfc_set_locus()
3433 and gfc_current_locus().
3434 * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
3435 match_attr_spec, gfc_match_function_decl, gfc_match_end,
3436 attr_decl1, gfc_match_save): Likewise.
3437 * error.c (error_print, gfc_internal_error): Likewise.
3438 * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
3439 * interface.c (gfc_add_interface): Likewise.
3440 * io.c (gfc_match_format, match_dt_format, match_dt_element,
3441 match_io_iterator, match_io): Likewise.
3442 * match.c (gfc_match_space, gfc_match_eos,
3443 gfc_match_small_literal_int, gfc_match_st_label,
3444 gfc_match_strings, gfc_match_name, gfc_match_iterator,
3445 gfc_match_char, gfc_match, gfc_match_assignment,
3446 gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
3447 gfc_match_nullify, gfc_match_call, match_implicit_range,
3448 gfc_match_implicit, gfc_match_data, match_case_selector,
3449 gfc_match_case, match_forall_iterator): Likewise.
3450 * matchexp.c (gfc_match_defined_op_name, next_operator,
3451 match_level_1, match_mult_operand, match_ext_mult_operand,
3452 match_add_operand, match_ext_add_operand, match_level_2,
3453 match_level_3, match_level_4, match_and_operand, match_or_operand,
3454 match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
3455 * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
3456 * parse.c (match_word, decode_statement, next_free, next_fixed,
3457 add_statement, verify_st_order, parse_if_block, gfc_parse_file):
3459 * primary.c (match_digits, match_integer_constant,
3460 match_boz_constant, match_real_constant, match_substring,
3461 next_string_char, match_charkind_name, match_string_constant,
3462 match_logical_constant, match_const_complex_part,
3463 match_complex_constant, match_actual_arg, match_keyword_arg,
3464 gfc_match_actual_arglist, gfc_match_structure_constructor,
3465 gfc_match_rvalue, gfc_match_variable): Likewise.
3466 * st.c (gfc_get_code): Likewise.
3467 * symbol.c (check_conflict, check_used, check_done,
3468 duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
3469 gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
3470 gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
3472 2004-05-26 Roger Sayle <roger@eyesopen.com>
3474 * io.c (format_asterisk): Silence compiler warnings by correcting
3475 the number of elements of a "locus" initializer.
3477 2004-05-25 Roger Sayle <roger@eyesopen.com>
3480 * matchexp.c: Allow unary operators after arithmetic operators
3482 (match_ext_mult_operand, match_ext_add_operand): New functions.
3483 (match_mult_operand): Tweak to call match_ext_mult_operand.
3484 (match_add_operand): Tweak to call match_ext_mult_operand.
3485 (match_level_2): Rearrange to call match_ext_add_operand.
3487 2004-05-25 Paul Brook <paul@codesourcery.com>
3489 * expr.c (check_inquiry): Remove bogus tests.
3491 2004-05-23 Paul Brook <paul@codesourcery.com>
3494 * expr.c (restricted_args): Remove redundant checks/argument.
3495 (external_spec_function): Update to match.
3496 (restricted_intrinsic): Rewrite.
3498 2004-05-23 Paul Brook <paul@codesourcery.com>
3499 Victor Leikehman <lei@haifasphere.co.il>
3501 * gfortran.h (struct gfc_symbol): Add equiv_built.
3502 * trans-common.c: Change int to HOST_WIDE_INT. Capitalize error
3504 (current_length): Remove.
3505 (add_segments): New function.
3506 (build_equiv_decl): Create initialized common blocks.
3507 (build_common_decl): Always add decl to bindings.
3508 (create_common): Create initializers.
3509 (find_segment_info): Reformat to match coding conventions.
3510 (new_condition): Use add_segments.
3511 (add_condition, find_equivalence, add_equivalences): Move iteration
3512 inside functions. Only process each segment once.
3513 (new_segment, finish_equivalences, translate_common): Simplify.
3515 2004-05-23 Steven G. Kargl <kargls@comcast.net>
3517 * check.c (gfc_check_random_seed): Issue for too many arguments.
3519 2004-05-22 Steven G. Kargl <kargls@comcast.net>
3521 * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
3523 2004-05-22 Paul Brook <paul@codesourcery.com>
3525 * dump-parse-tree.c (gfc_show_equiv): New function.
3526 (gfc_show_namespace): Use it.
3528 2004-05-22 Victor Leikehman <lei@haifasphere.co.il>
3531 * symbol.c (gfc_add_common): Disable checks to work around other more
3532 fundamental inadequacies.
3534 2004-05-22 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3536 * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
3538 (gfc_build_function_decl): Likewise.
3540 2004-05-22 Steven G. Kargl <kargls@comcast.net>
3542 * check.c (gfc_check_system_clock): New function.
3543 * intrinsic.c (add_sym_3s): New function.
3544 (add_subroutines): Use it.
3545 * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
3547 * iresolve.c (gfc_resolve_system_clock): New function.
3549 2004-05-22 Steven G. Kargl <kargls@comcast.net>
3551 * invoke.texi: Document -Wunderflow and spell check.
3552 * lang.opt: Add Wunderflow.
3553 * gfortran.h (gfc_option_t): Add warn_underflow option.
3554 * options.c (gfc_init_options, set_Wall): Use it.
3555 * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
3556 * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
3557 gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
3558 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
3559 * arith.c (common_logarithm): Fix typo in comment.
3561 2004-05-21 Roger Sayle <roger@eyesopen.com>
3563 * io.c (check_format): As a GNU extension, allow the comma after a
3564 string literal to be optional in a format. Use gfc_notify_std to
3565 issue an error/warning as appropriate.
3567 2004-05-21 Roger Sayle <roger@eyesopen.com>
3569 * io.c (check_format): Use gfc_notify_std to determine whether to
3570 issue an error/warning for omitting the digits from the X format.
3572 2004-05-20 Roger Sayle <roger@eyesopen.com>
3574 * io.c (check_format): Allow the number before the X format to
3575 be optional when not -pedantic.
3577 2004-05-18 Feng Wang <fengwang@nudt.edu.cn>
3578 Paul Brook <paul@codesourcery.com>
3580 * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
3581 Create decls for __builtin_pow{,f}.
3582 * gfortran.h (PREFIX_LEN): Define.
3583 * trans-decl.c (gfor_fndecl_math_powi): Add.
3584 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
3585 (gfc_build_intrinsic_function_decls): Create decls for powi.
3586 * trans-expr.c (powi_table): Add.
3587 (gfc_conv_integer_power): Remove.
3588 (gfc_conv_powi): New function.
3589 (gfc_conv_cst_int_power): New function.
3590 (gfc_conv_power_op): Use new powi routines.
3591 * trans.h (struct gfc_powdecl_list): Add.
3592 (gfor_fndecl_math_powi): Add.
3593 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
3595 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3597 * trans.c, trans-decl.c: Fix comment typos.
3599 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3601 * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
3603 2004-05-18 Steve Kargl <kargls@comcast.net>
3605 * arith.c (gfc_int2complex): Fix incorrect range checking.
3607 2004-05-18 Paul Brook <paul@codesourcery.com>
3610 * decl.c (add_init_expr_to_sym): Remove incorrect check.
3611 (default_initializer): Move to expr.c.
3612 (variable_decl): Don't assign default initializer to variables.
3613 * expr.c (gfc_default_initializer): Move to here.
3614 * gfortran.h (gfc_default_initializer): Add prototype.
3615 * resolve.c (resolve_symbol): Check for illegal initializers.
3616 Assign default initializer.
3618 2004-05-17 Steve Kargl <kargls@comcast.net>
3620 * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
3622 2004-05-17 Steve Kargl <kargls@comcast.net>
3624 * arith.c (gfc_real2complex): Range checking wrong part of complex
3627 2004-05-16 Paul Brook <paul@codesourcery.com>
3629 * options.c (gfc_handle_module_path_options): Fix buffer overrun.
3631 2004-05-16 Paul Brook <paul@codesourcery.com>
3633 * arith.c (gfc_range_check): Fix logic error.
3635 2004-05-16 Steve Kargl <sgk@troutmask.apl.washington.edu>
3637 * arith.c: Fix comment typos.
3639 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3642 * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
3643 not initialized in a disallowed fashion.
3644 * match.c (gfc_match_common): Likewise.
3645 (var_element): Verify that variable is not in the blank COMMON,
3646 if it is in a common.
3648 2004-05-15 Joseph S. Myers <jsm@polyomino.org.uk>
3650 * Make-lang.in (f95.generated-manpages): Remove.
3651 (f95.srcextra): New.
3652 (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
3653 f95.maintainer-clean): Generate info and dvi files in objdir/doc.
3656 (f95.install-info): Remove.
3657 (install-info): New.
3659 2004-05-15 Victor Leikehman <lei@haifasphere.co.il>
3661 * decl.c (add_init_expr_to_sym): Check for variable size arrays.
3663 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3665 * primary.c (match_boz_constant): Use gfc_notify_std() for
3666 issuing a warning or an error.
3668 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3671 * primary.c (match_structure_constructor): Rename ...
3672 (gfc_match_structure_constructor): ... to this. Make non-static.
3673 (gfc_match_rvalue): Call renamed function.
3674 * match.h (gfc_match_structure_constructor): Declare.
3675 * match.c (gfc_match_data_constant): Handle structure
3678 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3682 * gfortran.h (gfc_linebuf): New typedef.
3684 (gfc_file): Revamped, use new gfc_linebuf.
3685 (locus): Revamped, use new types.
3686 (gfc_current_file): Remove.
3687 (gfc_current_form, gfc_source_file): New global variables.
3688 * match.c (gfc_match_space, gfc_match_strings): Use
3689 gfc_current_form to find source form.
3690 * module.c (gfc_dump_module): Use gfc_source_file when printing
3692 * error.c (show_locus, show_loci) Use new data structures to print
3694 * scanner.c (first_file, first_duplicated_file, gfc_current_file):
3696 (file_head, current_file, gfc_current_form, line_head, line_tail,
3697 gfc_current_locus1, gfc_source_file): New global variables.
3698 (gfc_scanner_init1): Set new global variables.
3699 (gfc_scanner_done1): Free new data structures.
3700 (gfc_current_locus): Return pointer to gfc_current_locus1.
3701 (gfc_set_locus): Set gfc_current_locus1.
3702 (gfc_at_eof): Set new variables.
3703 (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
3704 to new locus structure.
3705 (gfc_check_include): Remove.
3706 (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
3707 (gfc_skip_comments): Use gfc_current_form, find locus with
3709 (gfc_next_char): Use gfc_current_form.
3710 (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
3711 (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
3713 (get_file): New function.
3714 (preprocessor_line, include_line): New functions.
3715 (load_file): Move down, rewrite to match new data structures.
3716 (gfc_new_file): Rewrite to match new data structures.
3717 * parse.c (next_statement): Remove code which is now useless. Use
3718 gfc_source_form and gfc_source_file where appropriate.
3719 * trans-decl.c (gfc_get_label_decl): adapt to new data structures
3720 when determining locus of frontend code.
3721 * trans-io.c (set_error_locus): Same.
3722 * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
3723 * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
3725 (all): Add missing initializers.
3727 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3729 * Make-lang.in (trans-common.o): Remove redundant dependency.
3730 (data.c): Replace object file name ...
3731 (data.o): ... by the correct one.
3733 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3735 * dump-parse-tree.c (gfc_show_array_ref): Print colon only
3736 for ranges when dumping array references.
3738 2004-05-14 Victor Leikehman <lei@haifasphere.co.il>
3740 * decl.c (variable_decl): Always apply default initializer.
3742 2004-05-08 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3745 * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
3746 handle zero correctly.
3748 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3750 * match.c (gfc_match): Eliminate dead code.
3752 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3754 * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
3755 Detect bad continuation line in fixed form sources.
3757 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3760 * iresolve.c (gfc_resolve_nearest): Add new function.
3761 * intrinsic.h: ... declare it here.
3762 * intrinsic.c (add_functions): ... add it as resolving function
3765 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3768 * match.c (gfc_match_do): Allow infinite loops with
3769 label-do-stmt. Do not enforce space after comma.
3771 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3774 * parse.c (parse_interface): Allow empty INTERFACE, remove
3777 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3779 * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
3780 decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
3781 expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
3782 intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
3783 matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
3784 primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
3785 trans-array.c, trans-array.h, trans-common.c, trans-const.c,
3786 trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
3787 trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
3788 trans-types.h, trans.c, trans.h: Update copyright years and
3790 * data.c: Likewise, also removed two whitespace-only lines.
3791 * gfortranspec.c, lang.opt: Update copyright years.
3793 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
3796 * trans-decl.c (generate_local_decl): Don't warn for unused
3797 variables which are in common blocks.
3799 2004-05-13 Diego Novillo <dnovillo@redhat.com>
3801 * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
3802 trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
3803 trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
3805 2004-05-13 Victor Leikehman <lei@haifasphere.co.il>
3808 * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
3810 2004-05-13 Joseph S. Myers <jsm@polyomino.org.uk>
3812 * gfortran.texi: Use @table @emph instead of @itemize @emph.
3813 Remove "set DEVELOPMENT".
3814 (Compiling GFORTRAN): Remove.
3816 2004-05-09 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3818 * array.c (match_subscript, match_array_ref): Add comments
3819 explaining argument 'init'.
3820 * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
3821 trans-expr.c, trans.c: Fix some typos in comments.
3822 * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
3823 * primary.c (match_digits, match_integer_constant): Add comment
3824 explaining signflag.
3826 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3829 * primary.c: Include system.h and flags.h, needed for pedantic.
3830 (match_boz_constant): Allow "x" for hexadecimal constants, warn if
3833 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3836 * match.c (match_data_constant): Handle case where
3837 gfc_find_symbol sets sym to NULL
3839 2004-04-28 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3841 * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
3842 dependency on mathbuiltins.def
3844 2004-04-24 Victor Leikehman <lei@il.ibm.com>
3846 * trans-io.c (transfer_expr): Implemented recursive printing
3849 2004-04-24 Andrew Pinski <pinskia@physics.uc.edu>
3851 * gfortranspec.c: Do not include multilib.h.
3853 2004-04-24 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
3855 * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
3856 2004 to copyright years.
3857 * trans-expr.c, trans-decl.c: Comment update, we now generate
3858 GENERIC, not SIMPLE. Add 2004 to copyright years.
3860 2004-04-24 Paul Brook <paul@codesourcery.com>
3862 * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
3864 2004-04-24 Feng Wang <fengwang@nudt.edu.cn>
3867 * arith.c (gfc_arith_divide): Fix complex divide.
3869 2004-04-23 Andrew Pinski <pinskia@physics.uc.edu>
3871 * gfortranspec.c: Include the target headers.
3873 2004-04-18 Feng Wang <fengwang@nudt.edu.cn>
3877 * arith.c (arctangent2): New function.
3878 * arith.h (arctangent2): Add function prototype.
3879 * simplify.c (gfc_simplify_atan2): Use it.
3880 (gfc_simplify_log): Use it.
3882 2004-04-12 Diego Novillo <dnovillo@redhat.com>
3884 * fortran/f95-lang.c (gfc_expand_stmt): Remove.
3885 (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
3887 2004-04-11 Bud Davis <bdavis9659@comcast.net>
3890 * trans-io.c (build_dt): Change REC to value.
3892 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
3895 * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
3896 the real value when converting mpf to string.
3898 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
3901 * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
3904 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
3907 * simplify.c (simplify_min_max): Convert the type of the result.
3909 2004-04-11 Paul Brook <paul@codesourcery.com>
3911 * gfortran.texi: Use full target triplet.
3913 2004-04-11 Paul Brook <paul@codesourcery.com>
3915 * Make-lang.in (GFORTRAN_TEXI): Set it.
3916 (fortran/dfortran.dvi): Use it. Add fortran to include paths.
3917 (fortran/gfortran.info): Ditto.
3918 * gfortran.texi: Major update.
3919 * invoke.texi: New file.
3921 2004-04-10 Paul Brook <paul@codesourcery.com>
3923 * trans-array.c (gfc_trans_allocate_temp_array,
3924 gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
3925 * trans-decl.c (gfc_build_dummy_array_decl,
3926 gfc_get_symbol_decl, gfc_build_function_decl,
3927 gfc_create_module_variable): Ditto.
3928 * trans-expr.c (gfc_conv_variable): Ditto.
3929 * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
3930 * trans.h (GFC_DECL_STRING): Remove.
3931 (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
3932 GFC_DECL_ASSIGN): Renumber flags.
3934 2004-04-05 Paul Brook <paul@codesourcery.com>
3938 * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
3940 * gfortran.h (struct gfc_charlen): Add backend_decl.
3941 * trans-array.c (gfc_trans_allocate_temp_array,
3942 gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
3943 (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
3944 Remove old, broken string handling.
3945 (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
3946 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
3947 gfc_trans_deferred_array): Handle character arrays.
3948 * trans-const.c (gfc_conv_const_charlen): New function.
3949 * trans-const.h (gfc_conv_const_charlen): Add prototype.
3950 * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
3952 (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
3953 (gfc_create_string_length): New function.
3954 (gfc_get_symbol_decl): Create lengths for character variables.
3955 (gfc_get_fake_result_decl): Ditto.
3956 (gfc_build_function_decl): Only set length for assumed length
3957 character arguments.
3958 (gfc_trans_dummy_character): New function.
3959 (gfc_trans_auto_character_variable): Rewrite.
3960 (gfc_trans_deferred_vars): Handle more types of character variable.
3961 (gfc_create_module_variable): String lengths have moved.
3962 (gfc_generate_function_code): Initialize deferred var chain earlier.
3963 * trans-expr.c (gfc_conv_init_string_length): Rename ...
3964 (gfc_trans_init_string_length): ... to this.
3965 (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
3966 gfc_conv_function_call): Update to new format for character variables.
3967 (gfc_conv_string_length): Remove.
3968 (gfc_conv_string_parameter): Update assertion.
3969 * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
3970 * trans-io.c (set_string): Use new macro names.
3971 * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
3972 * trans-types.c (gfc_get_character_type): Use existing length expr.
3973 (gfc_is_nodesc_array): Make public.
3974 (gfc_get_dtype_cst): Rename ...
3975 (gfc_get_dtype): ... to this. Handle unknown size arrays.
3976 (gfc_get_nodesc_array_type): Use new name.
3977 (gfc_sym_type): New character variable code.
3978 (gfc_get_derived_type): Ditto.
3979 (gfc_get_function_type): Evaluate character variable lengths.
3980 * trans-types.h (gfc_strlen_kind): Define.
3981 (gfc_is_nodesc_array): Add prototype.
3982 * trans.h: Update prototypes.
3983 (struct lang_type): Update comments.
3984 (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
3985 (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
3987 2004-04-04 Paul Brook <paul@codesourcery.com>
3989 * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
3990 * options.c (gfc_init.options, gfc_handle_option): Ditto.
3991 * trans-expr.c (gfc_conv_function_call): Ditto.
3992 * trans-types.c (gfc_is_nodesc_array): Ditto
3993 * lang.opt (fg77-calls): Remove.
3995 2004-04-04 Paul Brook <paul@codesourcery.com>
3997 * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
3998 (gfc_conv_descriptor_base): Rename ...
3999 (gfc_conv_descriptor_offset): ... to this.
4000 (gfc_trans_allocate_array_storage): Set offset to zero.
4001 (gfc_conv_array_base): Rename ...
4002 (gfc_conv_array_offset): ... to this.
4003 (gfc_conv_array_index_ref): Add offset parameter.
4004 (gfc_conv_array_ref): Include offset.
4005 (gfc_trans_preloop_setup): Use existing offset.
4006 (gfc_trans_allocate_temp_array, gfc_array_allocate,
4007 gfc_trans_auto_array_allocation, gfc_trans_g77_array,
4008 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
4009 gfc_conf_ss_descriptor): Set offset.
4010 * trans-array.h: Rename prototypes.
4011 * trans-const.h (gfc_index_zero_node): Define.
4012 * trans-decl.c (gfc_build_qualified_array): Change base to offset.
4013 * trans-types.c (gfc_get_array_type_bounds): Ditto.
4014 (gfc_get_nodesc_array_type): Calculate offset before upper bound.
4016 2004-03-25 Diego Novillo <dnovillo@redhat.com>
4018 * convert.c (convert): Don't handle WITH_RECORD_EXPR.
4020 2004-03-24 Bud Davis <bdavis9659@comcast.net>
4023 * arith.c (gfc_convert_integer,gfc_convert_real): Removed leading '+'
4024 before conversion by gmp library call.
4026 2004-03-24 Bud Davis <bdavis9659@comcast.net>
4029 * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
4031 2004-02-24 Richard Henderson <rth@redhat.com>
4033 * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
4035 2004-02-19 Loren J. Rittle <ljrittle@acm.org>
4037 * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
4038 (fortran/gfortran.info): ... to here.
4041 2004-02-16 Richard Henderson <rth@redhat.com>
4043 * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
4044 * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
4045 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
4046 (gfc_expand_function): Rename from expand_function_body, make static,
4047 don't do anything except invoke tree_rest_of_compilation.
4048 (gfc_be_parse_file): Invoke cgraph.
4049 (gfc_expand_decl): Remove.
4050 (gfc_init_builtin_functions): Add __builtin_init_trampoline and
4051 __builtin_adjust_trampoline.
4052 * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
4053 (gfc_finalize): New.
4054 (gfc_generate_function_code): Use it. Lower nested functions.
4055 * trans-expr.c (gfc_conv_function_call): Add static chain operand
4057 * trans.c (gfc_build_function_call): Likewise.
4058 * trans.h (expand_function_body): Remove.
4060 2004-02-15 Victor Leikehman <lei@il.ibm.com>
4063 * trans-decl.c (gfc_build_function_decl) For functions
4064 returning CHARACTER pass an extra length argument,
4065 following g77 calling conventions.
4066 * trans-types.c (gfc_get_function_type) Ditto.
4067 * trans-expr.c (gfc_conv_function_call) Ditto.
4069 2004-02-14 Paul Brook <paul@codesourcery.com>
4071 * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
4073 2004-02-12 Paul Brook <paul@nowt.org>
4077 2004-02-08 Steve Kargl <sgk@troutmask.apl.washington.edu>
4079 * gfortran.texi: Fix typos.
4081 2004-02-07 Bud Davis <bdavis9659@comcast.net>
4084 * intrinsic.c (add_conversions) Use logical conversion instead
4086 * trans-types.c (gfc_get_logical_type) implemented logical*1
4089 2004-01-17 Paul Brook <paul@codesourcery.com>
4091 * lang-specs.h: Remove %<fixed-form.
4093 2004-01-15 Toon Moene <toon@moene.indiv.nluug.nl>
4095 * lang-specs.h: Enable preprocessing of source files
4096 ending in .F, .fpp, .FPP, .F90 and .F95.
4098 2004-01-13 Toon Moene <toon@moene.indiv.nluug.nl>
4101 * lang-specs.h: Enable compilation of files ending
4102 in .f, .for and .FOR.
4104 2004-01-11 Paul Brook <paul@codesourcery.com>
4106 * trans-stmt.c (gfc_trans_if_1): New function.
4107 (gfc_trans_if): Use it.
4109 2004-01-11 Erik Schnetter <schnetter@uni-tuebingen.de>
4111 * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
4112 (gfc_option_t): Add max_identifier_length.
4113 * lang.opt: Add fmax-identifier-length.
4114 * match.c (parse_name): Use limit.
4115 * options.c (gfc_init_options): Set max_identifier_length.
4116 (gfc_handle_option): Ditto.
4118 2004-01-11 Feng Wang <fengwang@nudt.edu.cn>
4120 * intrinsic.c (add_functions): Add resolve function to dcmplx.
4121 * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
4122 * iresolve.c (gfc_resolve_dcmplx): New function.
4124 2004-01-10 Paul Brook <paul@codesourcery.com>
4126 * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
4127 * trans-types.c (gfc_sym_type): Handle external dummy procedures.
4128 (gfc_return_by_reference): Correct condition.
4129 (gfc_get_function_type): Ditto.
4131 2004-01-10 Paul Brook <paul@codesourcery.com>
4133 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
4136 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
4138 * iresolve.c: Use correct kind.
4140 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
4143 * trans-decl.c (gfc_create_module_variable): Output array valued
4146 2004-01-10 Paul Brook <paul@codesourcery.com>
4148 * resolve.c (resolve_branch): Get error message right way round.
4150 2004-01-10 Canqun Yang <canqun@nudt.edu.cn>
4152 * trans-array (gfc_conv_loop_setup): Adjust comment to track
4154 (gfc_array_allocate): Don't count size of element twice.
4156 2004-01-04 Paul Brook <paul@codesourcery.com>
4158 * lang.opt (i8, r8, std=*): Remove RejectNegative.
4160 2004-01-04 Paul Brook <paul@codesourcery.com>
4162 * error.c (gfc_notify_std): New function.
4163 * gfortran.h (gfc_notify_std): Declare.
4164 (GFC_STD_*): Define.
4165 (gfc_option_t): Add warn_std and allow_std.
4166 * intrinsic.c (gfc_init_expr_extensions): Fix logic.
4167 (gfc_intrinsic_func_interface): Use gfc_notify_std.
4168 * check.c (check_rest): Use gfc_notify_std.
4169 * match.c (gfc_match_pause): Ditto.
4170 (gfc_match_assign): Ditto.
4171 (gfc_match_goto): Ditto.
4172 * resolve.c (resolve_branch): Ditto.
4173 * lang.opt: Add std=<foo> and w.
4174 * options.c (gfc_init_options): Set allow_std and warn_std.
4175 (gfc_handle_option): Handle OPT_std_* and OPT_w.
4177 2004-01-01 Paul Brook <paul@codesourcery.com>
4179 * array.c (gfc_append_constructor): Take constructor, not expression.
4180 * data.c (struct gfc_expr_stack): Remove.
4181 (expr_stack): Remove.
4182 (find_con_by_offset): Rename from find_expr_in_con.
4183 (find_con_by_component): Rename from find_component_in_con.
4184 (gfc_get_expr_stack): Remove.
4185 (gfc_assign_data_value): Rewrite.
4186 (gfc_expr_push): Remove.
4187 (gfc_expr_pop): Remove.
4188 (gfc_advance_section): Rename from
4189 gfc_modify_index_and_calculate_offset. Handle unbounded sections.
4190 (gfc_get_section_index): Handle unbounded sections.
4191 * gfortran.h: Update prototypes.
4192 * resolve.c (check_data_variable): Array section maight not be the
4195 2004-01-01 Paul Brook <paul@codesourcery.com>
4198 * resolve.c (resolve_symbol): Allow assumed length function results.
4200 2004-01-01 Steve Kargl <sgk@troutmask.apl.washington.edu>
4202 * match.c (gfc_match_pause): Fix spelling.
4204 2004-01-01 Steven Bosscher <stevenb@suse.de>
4207 * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
4208 reference from the expression.
4210 2003-12-26 Feng Wang <fengwang@nudt.edu.cn>
4212 * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
4214 * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
4215 (gfc_exec_op): New EXEC_LABEL_ASSIGN.
4216 (symbol_attribute):New variable attribute: assign.
4217 * io.c (resolve_tag):Integer variable is allowed.
4218 (match_dt_format): Add ASSIGN statement. Set assign flag.
4219 * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
4220 (gfc_match_assign): Add ASSIGN statement. Set assign flag.
4221 (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
4222 * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
4223 (next_statement): Add ST_LABEL_ASSIGNMENT.
4224 (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
4225 * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
4226 (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
4227 * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
4228 * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
4229 assign. Put them into the stuct lang_decl.
4230 * trans-io.c (set_string): Add the assign statement.
4231 * trans-stmt.c (gfc_trans_label_assign): New function.
4232 (gfc_trans_goto): Translate ASSIGNED GOTO statement.
4233 * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
4234 * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
4235 * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
4236 (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
4237 (GFC_DECL_ASSIGN(node)): New macro to access flag.
4239 2003-12-31 Huang Chun <chunhuang73@hotmail.com>
4242 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
4245 2003-12-22 Toon Moene <toon@moene.indiv.nluug.nl>
4247 * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
4248 that arguments to subroutines/functions can't alias themselves, nor global
4251 2003-12-20 Steven Bosscher <stevenb@suse.de>
4253 * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
4254 * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
4256 2003-12-12 Huang Chun <chunhuang73@hotmail.com>
4258 * primary.c (match_substring): Fix substring bug for start point
4259 or end point is NULL.
4260 * trans-expr.c (gfc_conv_substring): Ditto
4261 * trans-types.c (gfc_sym_type): Get correct type of scalar
4262 character variables.
4263 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
4266 2003-12-10 Richard Henderson <rth@redhat.com>
4268 * options.c (gfc_post_options): Don't ever use rtl inlining.
4270 2003-12-05 Canqun Yang <canqun@nudt.edu.cn>
4272 * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
4273 * trans-equivalence.c: Remove.
4274 * trans-decl.c (gfc_get_symbol_decl): Update to match.
4275 (gfc_generate_function_code): Ditto.
4276 * trans-array.c (gfc_conv_array_parameter): Ditto.
4277 * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
4278 (F95_ADDITIONAL_OBJS): Add stor-layout.o
4279 * trans.h (gfc_trans_equivalence): Remove.
4280 * gfortran.h (struct gfc_equiv): Add used field.
4281 (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
4282 equiv_offset fields.
4284 2003-12-05 Richard Henderson <rth@redhat.com>
4286 * trans.c (gfc_build_addr_expr): New.
4287 (gfc_build_indirect_ref, gfc_build_array_ref): New.
4288 * trans.h: Declare them.
4289 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
4290 trans-stmt.c, trans.c (*): Use them.
4292 * f95-lang.c (gfc_post_options): Remove dead prototype.
4293 * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
4294 * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
4297 2003-12-01 Feng Wang <fengwang@nudt.edu.cn>
4299 * io.c (gfc_match_format): Check for missing format label.
4301 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
4304 * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
4305 from interfaces in modules.
4307 2003-11-30 Paul Brook <paul@nowt.org>
4309 * trans-array.c (gfc_trans_g77_array): Make non-static.
4310 (gfc_trans_assumed_size): Remove.
4311 (gfc_trans_dummy_array_bias): Explicitly free temporary.
4312 * trans-array.h (gfc_trans_g77_array): Add prototype.
4313 (gfc_trans_assumed_size): Remove.
4314 * trans-decls.c (gfor_fndecl_push_context): Remove.
4315 (gfor_fndecl_pop_context): Remove.
4316 (gfc_build_function)decls): Don't create them.
4317 (gfc_trans_deferred_vars): Update to match. Remove dead code.
4318 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
4320 2003-11-30 Kejia Zhao <kejia_zh@nudt.edu.cn>
4322 * trans-array.c (gfc_conv_array_parameter): Simplify
4323 array argument passing for array name actual argument.
4324 * trans-expr.c (gfc_conv_function_call): Ditto
4325 * trans-types.c (gfc_is_nodesc_array):Ditto.
4327 2003-11-30 Paul Brook <paul@nowt.org>
4329 * f95-lang.c (gfc_post_options): Move ...
4330 * options.c (gfc_post_options): .. to here. Handle inlining options.
4331 * gfortran.h (gfc_post_options): Add prototype.
4333 2003-11-28 Richard Henderson <rth@redhat.com>
4335 * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
4337 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
4339 * trans.h (has_alternate_specifier): New global variable.
4340 * match.c (gfc_match_call): Handle actual arguments associated with
4341 alternate return indicators.
4342 * trans-expr.c (gfc_conv_function_call): Ditto
4343 * trans-stmt.c (gfc_trans_call): Ditto
4344 (gfc_trans_return): Handle return statement with value.
4345 * trans-decl.c (gfc_generate_function_code): Handle functions with
4347 (gfc_get_fake_result_decl): Ditto
4348 * trans-types.c (gfc_get_function_type): Ditto
4349 * resolve.c (resolve_actual_arglist): Check alternate return indicators.
4350 (resolve_formal_arglist): Check asterisk dummy.
4352 2003-11-27 Paul Brook <paul@nowt.org>
4354 * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
4355 allocation interface.
4356 (gfc_conv_ array_parameter): Ditto.
4357 (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
4358 * trans-array.c: Update prototype.
4359 * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
4360 (gfc_trans_auto_character_variable): Use new memory alloc interface.
4361 * trans-expr.c (gfc_conv_string_tmp): Ditto.
4362 (gfc_conv_function_call): Use gfc_conv_string_tmp.
4363 * trans-stmt.c (gfc_do_allocate): Use new memory alloc interface.
4364 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
4365 * trans.h (gfc_ss_info): Remove unused pdata field.
4366 * trans.c (gfc_create_var_np): Change T to V.
4368 2003-11-26 Richard Henderson <rth@redhat.com>
4370 * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
4371 * trans-intrinsic.c (gfc_intrinsic_map): ... here. Add SCALE,
4372 FRACTION, NEAREST, SET_EXPONENT.
4373 (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
4374 Fix GTY marking. Remove unnecessary const's.
4375 (LIBM_FUNCTION): Rename from I_LIB.
4376 (LIBF_FUNCTION): New.
4377 (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
4378 conventions. Assume the expr signature is correct. Mark const.
4379 (gfc_conv_intrinsic_exponent): Use library functions.
4380 (gfc_conv_intrinsic_set_exponent): Remove.
4381 (gfc_conv_intrinsic_scale): Remove.
4382 (gfc_conv_intrinsic_nearest): Remove.
4383 (gfc_conv_intrinsic_fraction): Remove.
4384 (gfc_conv_intrinsic_function): Update.
4385 * trans-decl.c (gfor_fndecl_math_exponent4): New.
4386 (gfor_fndecl_math_exponent8): New.
4387 (gfc_build_intrinsic_function_decls): Set them.
4388 * trans.h: Declare them.
4390 2003-11-25 Canqun Yang <canqun@nudt.edu.cn>
4392 * trans-common.c (gfc_layout_global_equiv): Locate the error for
4393 underflow COMMON block.
4394 (gfc_trans_one_common): Fix bug for size of COMMON block containing
4395 EQUIVALENCE object. Also fix typo in an error message.
4397 2003-11-25 Diego Novillo <dnovillo@redhat.com>
4399 * Make-lang.in: Add check-gfortran to lang_checks.
4400 (check-f95): Alias for check-gfortran.
4402 2003-11-25 Jason Merrill <jason@redhat.com>
4404 * Make-lang.in (f95.tags): Create TAGS.sub files in each
4405 directory and TAGS files that include them for each front end.
4407 2003-11-24 Paul Brook <paul@nowt.org>
4410 * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
4412 2003-11-24 Paul Brook <paul@nowt.org>
4414 * expr.c (simplify_const_ref): Return SUCCESS for things we don't
4416 * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
4418 2003-11-24 Paul Brook <paul@nowt.org>
4421 * array.c (gfc_array_ref_shape): Handle elemental dimensions.
4422 * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
4424 2003-11-20 Richard Henderson <rth@redhat.com>
4426 * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
4427 (gfc_conv_array_base): Likewise.
4428 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
4429 * trans-expr.c (gfc_conv_string_tmp): Likewise.
4430 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
4431 * trans-stmt.c (gfc_trans_character_select): Likewise.
4433 2003-11-13 Paul Brook <paul@nowt.org>
4435 * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
4437 2003-11-13 Canqun Yang <canqun@nudt.edu.cn>
4439 * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
4440 (resolve_equivalence): New function.
4441 (resolve_equivalence_derived): New function.
4443 2003-11-12 Richard Henderson <rth@redhat.com>
4445 * trans.c (gfc_trans_code): Use annotate_with_locus instead of
4446 annotate_all_with_locus.
4448 2003-11-11 Canqun Yang <canqun@nudt.edu.cn>
4450 * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
4451 * trans-decl.c (gfc_finish_var_decl): Modified.
4453 2003-11-08 Paul Brook <paul@nowt.org>
4456 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
4459 2003-11-06 Paul Brook <paul@nowt.org>
4461 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
4463 2003-11-02 Canqun Yang <canqun@nudt.edu.cn>
4465 * match.c (gfc_match_stopcode): Assign '0' to stop_code.
4467 2003-10-27 Anthony Green <green@redhat.com>
4469 * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
4470 (f95.stagefeedback): Ditto.
4472 2003-10-27 Andrew Pinski <pinskia@physics.uc.edu>
4475 * Make-lang.in (f95.stageprofile): Add.
4476 (f95.stagefeedback): Add.
4478 2003-10-23 Richard Henderson <rth@redhat.com>
4480 * f96-lang.c (gfc_gimplify_expr): Remove.
4481 (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
4482 (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
4484 2003-10-23 Richard Henderson <rth@redhat.com>
4486 * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
4488 2003-10-20 Paul Brook <paul@nowt.org>
4490 * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
4491 * trans-stmt.c (gfc_trans_do_while): Ditto.
4493 2003-10-17 Paul Brook <paul@nowt.org>
4495 * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
4497 2003-10-17 Paul Brook <paul@nowt.org>
4499 * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
4501 2003-10-17 Feng Wang <wf_cs@yahoo.com>
4503 * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
4504 (gfc_resolve_minloc): Ditto.
4505 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
4506 Return the value after subtracting the lower bound.
4508 2003-10-16 Richard Henderson <rth@redhat.com>
4510 * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
4512 2003-10-16 Steven Bosscher <steven@gcc.gnu.org>
4514 * lang.c: Remove -M option for now, it's in the way for C.
4516 2003-10-14 Jason Merrill <jason@redhat.com>
4518 * Make-lang.in (f95.tags): New rule.
4520 2003-10-13 Richard Henderson <rth@redhat.com>
4522 * trans.c (gfc_trans_code): Use annotate_all_with_locus.
4524 2003-10-13 Paul Brook <paul@nowt.org>
4526 * trans-decl.c (generate_local_decl): Don't create junk variables.
4528 2003-10-13 Paul Brook <paul@nowt.org>
4530 * resolve.c (resolve_formal_arglist): Use function result decl in
4531 preference to function decl.
4533 2003-10-12 Richard Henderson <rth@redhat.com>
4535 * f95-lang.c (gfc_define_builtin): New const_p argument. Set
4536 TREE_READONLY. Update all callers.
4538 2003-10-12 Feng Wang <wf_cs@yahoo.com>
4540 * iresolve.c (gfc_resolve_cshift): Change to match implementation.
4541 * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
4542 (gfc_is_intrinsic_libcall): Add CSHIFT.
4544 2003-10-12 Richard Henderson <rth@redhat.com>
4546 * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
4547 (gfc_trans_array_constructor_value): Likewise.
4548 (gfc_conv_array_initializer): Likewise.
4549 * trans-stmt.c (gfc_trans_character_select): Likewise.
4551 2003-11-12 Kejia Zhao <kejia_zh@yahoo.com.cn>
4553 * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
4555 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
4557 * check.c (gfc_check_repeat): Check arguments are scalar.
4558 (gfc_check_trim): New function.
4559 * intrinsic.h (gfc_check_trim): Add prototype.
4560 * intrinsic.c (add_functions): Use it.
4561 * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
4563 * trans-decl.c: Ditto.
4564 (gfc_build_intrinsic_fucntion_decls): Set them.
4565 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
4566 (gfc_conv_intrinsic_trim): New function.
4567 (gfc_conv_intrinsic_repeat): New function.
4568 (gfc_conv_intrinsic_function): Use them.
4570 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
4572 * trans-types.c (gfc_sym_type): Handle result variables.
4574 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
4576 * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
4577 gfc_get_character_type.
4579 2003-10-11 Feng Wang <wf_cs@yahoo.com>
4581 * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
4583 2003-10-11 Paul Brook <paul@nowt.org>
4585 * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
4586 (gfc_resolve_dprod): New function.
4587 (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
4588 * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
4589 (gfc_resolve_dprod): Declare.
4590 * intrinsic.c (add_functions): Use them.
4591 * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
4593 2003-10-06 Richard Henderson <rth@redhat.com>
4595 * f95-lang.c (gfc_init_builtin_functions): Add clzll.
4596 * trans-intrinsic.c (call_builtin_clz): Use it.
4598 2003-10-05 Paul Brook <paul@nowt.org>
4600 * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
4601 * trans-decl.c (gfc_generate_function_code): Set
4602 cfun->function_end_locus.
4604 2003-09-24 Jason Merrill <jason@redhat.com>
4606 * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
4609 2003-09-21 Lifang Zeng <zlf605@hotmail.com>
4610 Paul Brook <paul@nowt.org>
4612 * Make-lang.in (F95_OBJS): Add fortran/data.o.
4613 * array.c (gfc_inser_constructor): New function.
4614 (gfc_get_constructor): New function.
4615 (gfc_free_constructor): Initialize offset and repeat.
4616 (iterator_stack): Remove.
4617 (expand_info): Add offset, component and repeat fields.
4618 (expand_constructor): Set them.
4619 (expand): Set new fields.
4620 (gfc_copy_constructor): Ditto. Avoid recursion.
4621 * gfortran.h: Add prototypes for new functions.
4622 (gfc_constructor): Add offset, component and repeat.
4623 (iteratio_stack): Move to here.
4624 * resolve.c (check_data_variable): Convert data values into variable
4626 (traverse_data_list): Build implicit loop chain.
4627 (gfc_resolve): Ditto.
4628 * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
4629 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
4630 * trans-expr.c (gfc_conv_structure): Handle array initializers.
4631 (gfc_conv_expr): Update to match.
4632 * trans.h (gfc_conv_structure): Declare.
4635 2003-09-20 Kejia Zhao <kejia_zh@yahoo.com.cn>
4637 * trans.h: Add declarations for gfor_fndecl_si_kind and
4638 gfor_fndecl_sr_kind.
4639 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
4640 * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
4641 (g95_conv_intrinsic_sr_kind): New function.
4642 (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
4645 2003-09-17 Lars Segerlund <Lars.Segerlund@comsys.se>
4647 * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
4648 instead of _4 and _8 as postfix for libgfortran calls.
4650 2003-09-16 Paul Brook <paul@nowt.org>
4652 * array.c (compare_bounds): New function.
4653 (gfc_compare_array_spec): Use it.
4655 2003-09-14 Paul Brook <paul@nowt.org>
4657 * primary.c (gfc_match_rvalue): Make sure sym->result is set.
4658 * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
4660 2003-09-14 Paul Brook <paul@nowt.org>
4662 * check.c (dim_rank_check): Allow assumed bounds if requested.
4663 (gfc_check_lbound): Call it.
4664 (gfc_check_ubound): Ditto.
4665 (gfc_check_size): Change to match.
4666 * simplify.c (gfc_simplify_bound): New function.
4667 (gfc_simplify_lbound): New function.
4668 (gfc_simplify_ubound): New function.
4669 * intrinsic.h: Declare them.
4670 * intrinsic.c (add_functions): Use them.
4672 2003-09-14 Paul Brook <paul@nowt.org>
4674 * io.c (format_lex): Initialize negative_flag.
4675 (check_format): Intialize repeat.
4676 * trans-io.c (gfc_new_nml_name_expr): Declare static.
4677 (gfc_new_var_expr): Ditto.
4679 2003-09-14 Paul Brook <paul@nowt.org>
4681 * trans-array.c (gfc_conv_array_initializer): Handle derived types.
4682 * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
4684 2003-09-12 Paul Brook <paul@nowt.org>
4686 * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
4688 2003-09-12 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
4690 * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
4691 for a correct expression.
4693 2003-09-10 Kejia Zhao <kejia_zh@yahoo.com.cn>
4695 * trans-intrinsic.c (real_compnt_info): New struct.
4696 (prepare_arg_info): New function.
4697 (gfc_conv_intrinsic_set_exponent): New function.
4698 (gfc_conv_intrinsic_scale): New function.
4699 (gfc_conv_intrinsic_nearest): New function.
4700 (gfc_conv_intrinsic_fraction): New function.
4701 (gfc_conv_intrinsic_exponent): New function.
4702 (gfc_conv_intrinsic_spacing): New function.
4703 (gfc_conv_intrinsic_rrspacing): New function.
4704 (gfc_conv_intrinsic_function): Use them.
4706 2003-08-24 XiaoQiang Zhang (zhangapache@yahoo.com>
4708 * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
4709 build_int_2 changed from (high, low) to (low, high).
4710 * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
4711 ioparm_namelist_read_mode, iocall_set_nml_val_int,
4712 iocall_set_nml_val_float, iocall_set_nml_val_char,
4713 iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
4714 (gfc_build_io_library_fndecls): Add variable initialization.
4715 (gfc_new_nml_name_expr, get_new_var_expr): New function.
4716 (build_dt): Add namelist support.
4717 * io.c (value): New variable.
4718 (check_format): Support FMT_H now.
4720 2003-09-07 Paul Brook <paul@nowt.org>
4722 * io.c (gfc_resolve_dt): Error if format label is not defined.
4724 2003-09-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
4726 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
4727 about case_switch's break. The other is about building the condition
4728 statement tree, which judges the argument in the range of the
4729 corresponding integer type.
4730 * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
4731 for the large values.
4733 2003-09-05 Paul Brook <paul@nowt.org>
4735 * f95-lang.c (expand_function_body): Gimplify the function.
4737 2003-09-04 Jeff Law <law@redhat.com>
4739 * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
4742 2003-09-04 Paul Brook <paul@nowt.org>
4744 * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
4745 (gfc_expand_stmt): New function.
4746 (LANG_HOOKS_RTL_EXPAND_STMT): Define.
4747 (expand_function_body): Use tree_rest_of_compilation.
4748 * trans-decl.c (gfc_generate_function_code): Don't free cfun.
4750 2003-09-03 Jeff Law <law@redhat.com>
4752 * f95-lang.c (gfc_init_builtin_functions): C arrays start at
4755 2003-08-30 Paul Brook <paul@nowt.org>
4757 * f95-lang.c (builtin_function): Remove #if 0 code.
4758 (gfc_define_builtin): New function.
4759 (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
4760 * mathbuiltins.def: New file.
4761 * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
4762 (gfc_intrinsic_map): Use mathbuiltins.def.
4763 (gfc_intrinsic_builtin_t): Remove.
4764 (gfc_build_intrinsic_lib_fndecls): Update.
4765 * trans-types.c (gfc_init_types): Remove redundant initilaization of
4766 signed_size_type_node.
4768 2003-08-29 Paul Brook <paul@nowt.org>
4770 * arith.c (gfc_real_kinds): Use correct minimum exponents.
4772 2003-08-22 Kejia Zhao <kejia_zh@yahoo.com.cn>
4774 * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
4775 (gfc_conv_intrinsic_function): Add MODULO.
4777 2003-08-22 Jason Merrill <jason@redhat.com>
4779 * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
4781 2003-08-22 Andreas Jaeger <aj@suse.de>
4783 * Make-lang.in (f95.install-common): Add DESTDIR support.
4784 * (f95.install-info): Likewise.
4785 (f95.uninstall): Likewise.
4787 2003-08-19 Diego Novillo <dnovillo@redhat.com>
4789 * trans-types.c (gfc_init_types): Initialize
4790 signed_size_type_node with size_type_node.
4792 2003-08-18 Paul Brook <paul@nowt.org>
4794 * dependency.c (gfc_dependency): New enum.
4795 (check_another_array_ref): Remove.
4796 (gfc_get_array_from_component): Remove.
4798 (get_range): Remove.
4799 (get_no_of_elements): Use mpz_t, not mpf_t.
4800 (transform_sections): New function.
4801 (gfc_check_range_range): Rename ...
4802 (gfc_check_section_vs_section): ... to this. Use new function.
4803 (gfc_is_inside_range): Rewrite to match.
4804 (gfc_check_element_vs_section): Ditto.
4805 (gfc_check_element_vs_element): Ditto.
4807 (gfc_dep_resolver): Ditto. Remove unused parameter.
4808 * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
4809 gfc_check_element_vs_element, gfc_is_inside_range,
4810 gfc_get_array_from_component): Remove prototypes for static functions.
4811 (gfc_dep_resolver): Update prototype.
4812 * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
4814 2003-08-15 Paul Brook <paul@nowt.org>
4816 * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
4817 return values to parent scope.
4818 (gfc_build_dummy_array_decl): Ditto.
4820 2003-08-14 Paul Brook <paul@nowt.org>
4822 * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
4823 size of the type, not the pointer.
4824 * resolve.c (resolve_symbol): Give more accurate error message.
4826 2003-08-10 Paul Brook <paul@nowt.org>
4828 * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
4830 2003-08-10 Paul Brook <paul@nowt.org>
4832 * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
4835 2003-08-10 Chun Huang <compiler@sohu.com>
4837 * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
4838 (resolve_symbol): Ditto.
4839 * trans-expr.c (gfc_conv_statement_function): New function.
4840 (gfc_conv_function_expr): Use it.
4842 2003-08-10 Paul Brook <paul@nowt.org>
4844 * trans-array.c (gfc_conv_ss_startstride): Handle functions.
4845 (walk_function_expr): Set section rank.
4846 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
4848 2003-08-10 Paul Brook <paul@nowt.org>
4850 * intrinsic.c (add_sym): Prefix names with correct string.
4851 (add_sym_0s): New function.
4852 (add_subroutines): Register abort.
4854 2003-08-10 Erik Schnetter <schnetter@uni-tuebingen.de>
4856 * gfortran.h: Introduce options to control the mangling.
4857 * lang.opt: Likewise.
4858 * options.c (gfc_init_options): Handle the options.
4859 * trans-common.c (gfc_sym_mangled_common_id): New function.
4860 (gfc_build_common_decl): Call it.
4861 * trans-decl.c (gfc_sym_mangled_function_id): New function.
4862 (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
4864 2003-08-09 Paul Brook <paul@nowt.org>
4866 * module.c (mio_symbol): Always ouput a namespace for formal args.
4867 (load_needed): Namespace now belong to their proper symbol.
4868 (gfc_dump_module): Change G95=>GFORTRAN.
4870 2003-08-05 Paul Brook <paul@nowt.org>
4872 * options.c: Force -fg77-calls.
4874 2003-08-02 Paul Brook <paul@nowt.org>
4876 * Makelang.in: Rename G95_* to GFORTRAN_*.
4877 * All sources: Rename G95_* to GFC_*.
4879 2003-08-01 Paul Brook <paul@nowt.org>
4881 * fortran/Make-lang.in: Use GMPLIBS.
4882 * fortran/config-lang.in: Set need_gmp.
4883 * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
4885 2003-07-27 Andreas Jaeger <aj@suse.de>
4887 * trans-decl.c (gfc_generate_constructors): Convert prototype to
4889 * trans-const.c (gfc_init_constants): Likewise.
4890 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
4892 * gfortranspec.c: Convert to ISO C90.
4893 (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
4895 2003-07-26 Paul Brook <paul@nowt.org>
4897 * lang.opt: Add -fdump-parse-tree.
4898 * options.c (gfc_handle_option): Ditto.
4899 * resolve.c (resolve_forall_iterators): Convert to proper type.
4900 * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
4902 2003-07-26 Paul Brook <paul@nowt.org>
4904 * Makefile.in: Add build dependencies on files common with rest of gcc.
4906 2003-07-26 Lifang Zeng <zlf605@hotmail.com>
4908 * trans.h: Declare g95_trans_pointer_assignment.
4909 * trans-expr.c (g95_trans_pointer_assignment): New function.
4910 (g95_trans_pointer_assign): Use it.
4911 * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
4912 (g95_trans_pointer_assign_need_temp): New function.
4914 2003-07-26 Paul Brook <paul@nowt.org>
4916 * gfortran.texi: Replace references to g95.
4918 2003-07-26 Paul Brook <paul@nowt.org>
4920 Rename g95_* to gfc_*.
4922 2003-07-25 Paul Brook <paul@nowt.org>
4924 * gfortran.h: Rename from g95.h.
4925 * trans-types.c (boolean_type_node, booelan_true_node,
4926 boolean_false_node): Remove.
4927 * trans-types.h: Ditto.
4929 2003-07-25 Chun Huang <compiler@sohu.com>
4931 * parse.c (accept_statement): Implement BLOCK DATA statement.
4932 * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
4935 2003-07-24 Lifang Zeng <zlf605@hotmail.com>
4937 * trans-stmt.c (temporary_list): Define.
4938 (g95_trans_assign_need_temp): New function.
4939 (g95_trans_forall_1): Modified for WHERE.
4940 (g95_trans_where_assign): Modified.
4941 (g95_trans_where_2): Modified.
4942 (g95_evaluate_where_mask): Modified.
4943 (g95_trans_where): Modified.
4944 (g95_get_temp_expr): Removed.
4945 (g95_add_to_where_stmt_list): Removed.
4946 (compute_overall_iter_number): Modified for WHERE.
4947 * trans.h: Remove where_stmt_list.
4949 2003-07-24 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4951 * lang.opt: Correct description of options -J and -M.
4953 2003-07-23 Steven Bosscher <steven@gcc.gnu.org>
4955 * lang.opt: Move help text to here.
4956 * lang-options.h: Remove.
4958 2003-07-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
4959 * iresolve.c (g95_resolve_transpose): Proper variable in switch.
4960 * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
4963 2003-07-22 Steven Bosscher <steven@gcc.gnu.org>
4964 Paul Brook <paul@nowt.org>
4966 * check.c (check_rest): Use global pedantic flag.
4967 * io.c (data_desc): Ditto.
4968 * error.c (g95_warning, g95_warning_now): Use global flag.
4969 * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
4970 (expand_function_body): Update to new prototypes.
4971 (g95_init): Use new option names.
4972 * g95.h (g95_option_t): Standardize names.
4973 (g95_init_options, g95_handle_option): Update prototypes.
4974 * interface.c: Use new option names.
4981 * simplify.c: Ditto.
4983 * trans-array.c: Ditto.
4984 * trans-expr.c: Ditto.
4985 * trans-types.c: Ditto.
4986 * trans-decl.c: Ditto.
4987 (g95_build_library_function_decl): Remove obsolete VPARAMS.
4989 * options.c (g95_display_help): Remove.
4990 (g95_init_options): Convert to new scheme.
4992 (g95module_option): Ditto, rename from g95_parse_arg.
4993 (g95_handle_module_path_options): New function.
4994 * trans-equivalence.c: Fix error message.
4995 * lang.opt: Corrections.
4997 2003-07-21 Steven Bosscher <steven@gcc.gnu.org>
4999 * lang.opt: New file.
5001 2003-07-21 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5003 * decl.c (match_attr_spec): Set colon_seen.
5005 2003-07-14 Paul Brook <paul@nowt.org>
5007 * trans-array.c: Update comment.
5008 (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
5009 * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
5010 minmaxloc,minmaxval): Ditto.
5011 * trans-io.c (g95_trans_transfer): Ditto.
5012 * trans-stmt.c: Remove unneeded prototypes.
5013 (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
5014 (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
5015 (compute_inner_temp_size): Remove bits of dead code. Add comments.
5016 Don't share loopinfo.
5017 (compute_overall_iter_number): Declare as static.
5018 (allocate_temp_for_forall_nest): Ditto.
5019 (g95_trans_forall_1): Don't pass shared loopinfo.
5020 * trans.c (g95_start_block): Expand comment.
5022 2003-07-12 Paul Brook <paul@nowt.org>
5024 * arith.c (g95_index_integer_kind): Remove unused initializer.
5025 * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
5026 index by size of element.
5027 (generate_loop_for_rhs_to_temp): Ditto.
5028 (allocate_temp_for_forall_nest): Use element size, not index size.
5030 2003-07-11 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5032 * arith.c (g95_index_integer_kind): Add a TODO.
5033 * simplify.c (g95_simplify_nearest): Add a TODO.
5035 2003-07-09 Chun Huang <compiler@sohu.com>
5037 * trans.h: Add declarations for gfor_fndecl_string_scan and
5038 gfor_fndecl_string_verify.
5039 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
5040 * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
5041 (g95_conv_intrinsic_verify): New function.
5042 (g95_conv_intrinsic_function): Add SCAN and VERIFY.
5043 * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
5044 of parameter 'BACK=.TRUE.'
5046 2003-07-05 Lifang Zeng <zlf605@hotmail.com>
5048 * trans-stmt.c (iter_info, forall_info): Define.
5049 (g95_trans_forall_block): Remove.
5050 (g95_trans_forall_loop): Use forall info blocks.
5051 (g95_trans_nested_forall_loop): New function.
5052 (g95_do_allocate): Handle things other than logical masks.
5053 (generate_loop_for_temp_to_lhs): New function.
5054 (generate_loop_for_rsh_to_temp): New function.
5055 (compute_inner_temp_size): New function.
5056 (compute_overall_iter_number): New function.
5057 (allocate_temp_for_forall_nest): New function.
5058 (g95_trans_forall): Move body ...
5059 (g95_trans_forall_1): ... to here. Handle loops with temporaries.
5061 2003-07-02 Paul Brook <paul@nowt.org>
5063 * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
5064 in correct scope. Change callers to match.
5065 * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
5066 * iresolve.c (g95_resolve_reshape): Only use constant shapes.
5068 2003-07-02 Paul Brook <paul@nowt.org>
5070 * trans-array.c (g95_conv_loop_setup): Remove dead var. Use
5071 expression shape for all expressions.
5072 * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
5074 2003-07-03 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5076 * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
5077 g95_parse_arg), intrinsic.c (g95_convert_type): support of
5079 * intrinsic.c, g95.h: Add g95_convert_type_warn,
5080 * resolve.c (g95_resolve_index): Call it.
5082 2003-07-02 Paul Brook <paul@nowt.org>
5084 * iresolve.c (g95_resolve_reshape): Set expression shape.
5085 (g95_resolve_shape): Ditto.
5086 * simplify.c (g95_simplify_shape): Move common code outside condition.
5087 * trans-array.c (g95_conv_array_initializer): Teach it how to count.
5089 2003-07-01 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5091 * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
5094 2003-06-29 Paul Brook <paul@nowt.org>
5096 * array.c (g95_simplify_iterator_var): Don't bother with return value.
5097 * expr.c (find_array_element, find_component_ref): New functions.
5098 (remove_subobject_ref): New function.
5099 (simplify_const_ref): Use them. Rename from simplify_component_ref.
5100 (simplify_ref_chain): New function.
5101 (g95_simplify_expr): Use it. Simplify parameter variable subobjects.
5102 (g95_specification_expr): Simplify the expression.
5103 * resolve.c (resolve_operator): Check simplifications return code.
5104 (g95_resolve_expr): Ditto.
5106 2003-06-26 Paul Brook <paul@nowt.org>
5108 * expr.c (simplify_component_ref): New function.
5109 (g95_simplify_expr): Use it.
5110 * resolve.c (resolve_structure_cons): Handle references.
5112 2003-06-25 Paul Brook <paul@nowt.org>
5114 * trans-io.c (build_dt): Handle internal units.
5116 2003-06-25 Canqun Yang <canqun@yahoo.com.cn>
5118 * trans-common.c (g95_build_common_decl): Array index range starts at 0.
5119 (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
5120 Use g95_array_index_type instead of integer_type_node.
5121 (g95_build_common_decl, g95_set_common_master_type): Use
5122 g95_character1_type_node instead of char_type_node.
5123 * trans-equivalence.c (g95_layout_local_equiv): As above.
5125 2003-06-24 Steven G. Kargl <kargls@attbi.com>
5127 * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
5128 remove last remains of -fquiet.
5130 2003-06-22 Paul Brook <paul@nowt.org>
5132 * resolve.c (resolve_operator): Don't fail if we can't simplify.
5133 (g95_resolve_expr): Ditto.
5134 (resolce_code): Mark as static.
5135 * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
5136 gimplifer doesn't (yet).
5138 2003-06-20 Paul Brook <paul@nowt.org>
5140 * g95.h: Add ST_PAUSE and EXEC_PAUSE.
5141 * match.c (g95_match_if): Add ST_PAUSE.
5142 (g95_match_stopcode): New function.
5143 (g95_match_pause, g95_match_stop): Use it.
5144 * parse.c (g95_ascii_statement): Handle ST_PAUSE.
5145 (decode_stmt, next_statement, parse_executable): Ditto.
5146 * resolve.c (resolve_code): Ditto.
5147 * st.c (g95_free_statement): Ditto.
5148 * trans-stmt.c (g95_trans_pause): New function.
5149 * trans-stmt.h: Declare it.
5150 * trans.c (g95_trans_code): Use it.
5151 * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
5153 (g95_build_builtin_function_decls): Initialize them.
5155 * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
5157 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5159 * io.c (g95_match_open , g95_match_close, g95_match_inquire,
5160 match_filepos): Fix error handling.
5162 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5164 * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
5165 Add assertions on arguments.
5166 * resolve.c (expression_shape): Remove useless &.
5167 * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
5168 g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
5169 g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
5170 g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
5171 g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
5172 g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
5173 (g95_simplify_not, g95_simplify_scale): Add assertions.
5175 2003-06-15 Paul Brook <paul@nowt.org>
5177 Clean up stuff to work with the ssa optimizers.
5178 * convert.c (convert): Handle BOOLEAN_TYPEs.
5179 * f95-lang.c (g95_truthvalue_conversion): Implement.
5180 * trans-array.c (g95_trans_array_constructor_value): Group multiple
5182 * trans.h (g95_truthvalue_conversion): Declare.
5183 * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
5184 * trans-stmt.c (g95_trans_character_select): Don't create array
5185 assignments. Mark labels as indirect jump targets.
5186 * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
5187 (g95_get_dtype_cst): Handle LOGICAL types.
5189 2003-06-14 Paul Brook <paul@nowt.org>
5191 * f95-lang.c (g95_gimplify_expr): New function.
5192 * trans-array.c (g95_trans_array_constructor_value): Don't create
5194 (g95_conv_expr_descriptor): Rename simple->gimple.
5195 * trans-expr.c (conv_expr_op): Use proper logical operators.
5196 * trans-intrinsic.c (build_fixbound_expr): New function.
5197 (build_fix_expr): Ditto.
5198 (g95_conv_intinsic_aint): Use them. Use builtin functions.
5199 (g95_conv_intrinsic_function): Add FLOOR and CEILING.
5201 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5203 * array.c (g95_compare_array_spec): Remove unreachable code.
5204 * expr.c (g95_copy_expr): Likewise.
5205 * intrinsic.c (g95_convert_type): Likewise.
5206 * misc.c (g95_code2string): Likewise.
5207 * simplify.c (g95_simplify_ishft, g95_simplify_real,
5208 g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
5209 * trans-stmt.c (g95_trans_select): Likewise.
5210 * primary.c (extend_ref): Add an assertion.
5211 * simplify.c (g95_convert_constant): Add const.
5212 * intrinsic.h: Remove g95_check_x_ni.
5213 * f95-lang.c (g95_finish): Call g95_release_include_path.
5215 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5217 * resolve.c (resolve_contained_functions): Fix typo introduced on
5220 2003-06-09 Paul Brook <paul@nowt.org>
5222 * g95.h: Include system.h not hwint.h.
5223 * many: use safe-ctype.h not ctype.h. Change isalpha -> ISALPHA, etc.
5224 * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
5226 2003-06-09 Paul Brook <paul@nowt.org>
5228 * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
5229 * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
5230 * trans-decl.c (g95_add_decl_to_functions): Make non-static.
5231 (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
5232 (g95_generate_function_code): Translate COMMON and EQUIVALENCE
5234 * trans.h (g95_trans_equivalence, g95_trans_common,
5235 g95_add_decl_to_function): Declare.
5236 * trans-common.c, trans-equivalence.c: New files.
5238 2003-06-08 Steven Bosscher <steven@gcc.gnu.org>
5240 * intrinsic.c (g95_intrinsic_extension): Remove.
5241 (add_functions): Substitute g95_check_x for g95_check_x_ni
5243 (g95_init_expr_extensions): New function.
5244 (g95_intrinsic_func_interface): Use it.
5245 * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
5246 * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
5247 g95_check_precision, g95_check_present, g95_check_radix,
5248 g95_check_range, g95_check_selected_real_kind): Do not set
5249 g95_intrinsic_extension.
5250 (g95_check_x_ni): Remove now duplicate of g95_check_x.
5252 * expr.c (check_inquiry): Add FIXME, fixup some code style.
5254 2003-06-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5256 * g95.h (ref_type): Name this type explicitly.
5257 * module.c (MIO_NAME): Add specialisations of mio_name.
5258 (mio_symbol_attribute, mio_typespec, mio_array_ref,
5259 mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
5260 (ab_attribute): Name this type explicitly.
5261 (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
5263 2003-06-05 Kejia Zhao <kejia_zh@yahoo.com.cn>
5265 * trans-intrinsic.c (g95_conv_allocated): New function.
5266 (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
5268 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
5270 * f95-lang.c: Don't include g95-support.h
5271 (g95_mark_addressable): Add prototype.
5272 (g95_init_decl_processing): Remove C front end hack.
5273 * f95-tree.c: Remove file.
5274 * support.c: Remove file.
5275 * g95-support.h: Remove file.
5276 * trans-types.c (g95_init_types): Set up boolean
5277 type related tree nodes.
5278 * Make-lang.in: Remove rules for dead files and
5279 dependencies on them.
5281 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
5283 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
5284 C front end dependency. Also, convert.c does not depend on
5285 g95-support.h anymore.
5286 * convert.c: Don't include c-common.h and g95-support.h
5287 * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
5288 (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
5289 stmts_are_full_exprs_p, current_stmt_tree,
5290 current_scope_stmt_stack): Remove.
5291 * g95-support.h (unsigned_conversion_warning): Kill proto.
5292 (boolean_type_node, boolean_true_node, boolean_false_node):
5293 Don't define here. Instead, make then true tree nodes in
5295 * support.c (c_global_trees): Die, C front end, die!!!
5296 (g95_init_c_decl_hacks): Don't touch intmax_type_node,
5297 uintmax_type_node, string_type_node and const_string_type_node.
5298 (decl_constant_value, overflow_warning): Make static functions.
5299 They are in death row too, though.
5300 (default_conversion, c_expand_asm_operands): Remove.
5301 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
5302 trans.c: Don't include c-common.h.
5303 * trans-types.c (boolean_type_node, boolean_true_node,
5304 boolean_false_node): Make them real tree nodes.
5305 * trans-types.h (intmax_type_node, string_type_node,
5306 const_string_type_node): Hack to work around C dependencies
5307 in builtin-types.def.
5309 2003-06-04 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5311 * decl.c (decl_types): Add some iterators-like sentinels.
5312 * decl.c (match_attr_spec): Use them.
5313 Use "decl_types" instead of "int".
5314 Add cast in call to g95_match_strings.
5315 * dump-parse-tree.c (g95_show_namespace): Use "g95_intrinsic_op"
5317 * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
5318 (g95_interface_info): Use "g95_intrinsic_op".
5319 * dump-parse-tree.c (g95_show_namespace): Use them.
5320 * interface.c (g95_check_interfaces): Use them.
5321 * module.c (read_module, write_module): Use them.
5322 * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
5323 Use "g95_intrinsic_op".
5324 * interface.c (check_operator_interface): Use "g95_intrinsic_op".
5325 Add a default case in switch statement.
5326 * intrinsic.h (g95_generic_isym_id): Moved to...
5327 * g95.h (g95_generic_isym_id): here.
5328 (g95_intrinsic_sym): Use "g95_generic_isym_id".
5329 * intrinsic.c (make_generic): Use "g95_generice_isym_id".
5330 * trans-intrinsic.c (g95_intrinsic_map_t,
5331 g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
5332 * match.c (g95_match_intrinsic_op): Add cast in call to
5335 2003-06-03 Steven Bosscher <steven@gcc.gnu.org>
5337 * support.c (skip_evaluation, warn_conversion, lvalue_p,
5338 lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
5339 constant_fits_type_p, convert_and_check,
5340 unsigned_conversion_warning): Remove these ugly remnants
5341 we inherited from the C front end.
5342 (function_types_compatible): Remove '#if 0'-edcode.
5343 (build_modify_expr): Likewise.
5344 (convert_for_assignment): Don't use the deceased functions.
5345 The parameter fundecl is now unused.
5346 (decl_constant_value): Always just return decl. In fact
5347 this function is not used at present, but it might be in
5348 the future, when we start using the tree inliner.
5349 (overflow_warning, default_conversion, c_expand_asm_operands):
5350 Abort when these are called, they are part of the C type
5351 checking implementation and therefore poison to Fortran.
5353 2003-06-04 Steven Bosscher <steven@gcc.gnu.org>
5355 * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
5356 c-pretty-print.o and c-dump.o. Add a comment on why we
5357 depend on c-semantics.c.
5358 * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
5359 Don't use the C front end tree dumper hook to dump the
5360 language specific tree representation -- we don't have
5361 one. So instead, inherit the default langhook.
5363 2003-06-02 Paul Brook <paul@nowt.org>
5365 * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
5367 2003-06-02 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5369 * check.c (g95_check_associated): Use proper types. Remove
5370 extraneous argument in call to g95_error().
5372 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
5374 * resolve.c (resolve_operator): Make logical operands convert to the
5375 type with higher kind.
5377 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
5379 * check.c (g95_check_associated): Make sure both pointer and target has
5380 the same type and rank. Null pointer or array section with vector
5381 subscript as target are not allowed.
5382 * trans.h: Declare gfor_fndecl_associated.
5383 * trans-decl.c: (g95_build_builtin_function_decls): Initialize
5384 gfor_fndecl_associated.
5385 * trans-intrinsic.c (g95_conv_associated): New function.
5386 (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
5388 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
5390 * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
5391 according to POINTER itself rather than TARGET.
5392 (g95_conv_expr_descriptor): Make lbound start at 1.
5393 * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
5395 2003-06-01 Paul Brook <paul@nowt.org>
5397 * expr.c (g95_type_convert_binary): Make it match the standard.
5398 * g95.texi: Remove dead link.
5400 2003-06-01 Steven Bosscher <steven@gcc.gnu.org>
5402 * g95.texi: Cleanup somewhat in preparation for inclusion
5405 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5406 Canqun Yang <canqun@yahoo.com.cn>
5408 * resolve.c (compare_bound_int, resolve_where_shape): Proper return
5410 (g95_find_forall_index): Return proper value.
5411 (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
5412 compare the return value from g95_find_forall_index.
5414 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5415 * g95.h, io.c (g95_st_label): Remove "length".
5416 (g95_symtree): Remove "link".
5417 (g95_case): Remove "code".
5418 * arith.c, arith.h (g95_compare_string, g95_convert_integer,
5419 g95_convert_real): Make an argument pointer to const.
5420 * decl.c (colon_seen): Add a TODO.
5421 * interface.c (g95_compare_types): Fix typo.
5422 * interface.c (compare_interfaces): Preserve value of "p".
5423 * intrinsic.c (sort_actual): Remove "i".
5424 * match.c (g95_match_assign): Proper type in call to g95_match().
5425 * parse.c (next_free): Avoid duplicate call due to macro.
5426 * parse.c (check_statement_label): wrong type in call to g95_error.
5427 * primary.c (match_real_constant): Add a TODO.
5428 * resolve.c (resolve_select): Remove useless conditional.
5429 * simplify.c (g95_simplify_repeat): Proper assignment to
5430 "value.character.string".
5431 * simplify.c (g95_simplify_reshape): Wrong variable in call to
5434 2003-05-20 Canqun Yang <canqun@yahoo.com.cn>
5436 * trans-stmt.c: Remove unnecessary include file defaults.h.
5438 2003-05-19 Lifang Zeng <zlf605@hotmail.com>
5440 * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
5442 (g95_trans_forall): Allow arbitrary number of FORALL indexes and
5443 actual variables used as FORALL indexes.
5445 2003-05-15 Paul Brook <paul@nowt.org>
5447 * trans-array.c (g95_trans_static_array_pointer): Use
5449 (g95_trans_deferred_array): Initialize static array pointers.
5450 * trans-expr.c (g95_conv_function_call): Use formal arglist to
5451 correctly pass POINTER and absent CHARACTER arguments.
5453 2003-05-14 Lifang Zeng <zlf605@hotmail.com>
5455 * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
5456 (g95_resolve_forall_body): Resolve FORALL body.
5457 (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
5458 (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
5459 (g95_find_forall_index): Check whether the FORALL index appears in
5460 the expression or not.
5461 (resolve_code): Modified.
5463 2003-05-14 Paul Brook <paul@nowt.org>
5465 * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
5467 2003-05-13 Paul Brook <paul@nowt.org>
5469 * trans-types.c (g95_max_array_element_size): Now a tree node.
5470 (g95_init_types): Work out max size properly.
5471 (g95_get_dtype_cst): Modify to match.
5473 2003-05-11 Paul Brook <paul@nowt.org>
5475 * trans-io.c (add_case): Create a label decl for case labels.
5477 2003-05-11 Paul Brook <paul@nowt.org>
5479 * arith.c (g95_integer_index_kind): New variable.
5480 * f95-lang.c (g95_init): Move frontend initialization here ...
5481 (g95_post_options): ... from here.
5482 * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
5483 * intrinsic.c (add_functions): Use index kinds.
5484 * iresolve.c: Convert to index_kind where needed.
5485 * resolve.c (g95_resolve_index): Make public, use index_kind.
5486 (resolve_array_ref): Adjust to match.
5487 * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
5488 * trans-stmt.c: Ditto.
5489 * trans-types.c: Ditto.
5490 * trans-types.h (g95_array_index_kind): Remove declaration.
5491 * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
5493 2003-05-07 Paul Brook <paul@nowt.org>
5495 * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
5496 * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
5499 2003-05-07 Paul Brook <paul@nowt.org>
5501 * trans-array.c (trans_static_array_pointer,
5502 g95_trans_array_constructor_value, g95_conv_array_initializer,
5503 g95_conv_structure): CONSTRUCTOR nodes only have one operand.
5504 (g95_add_loop_ss_code): Convert subscripts to the correct type.
5505 * trans-stmt.c (g95_trans_character_select): Ditto.
5506 * trans-types.c (g95_init_types): Ditto.
5508 2003-05-07 Steven Bosscher <steven@gcc.gnu.org>
5510 * f95-lang.c (expand_function_body): Use input_line, not lineno.
5511 * trans-decl.c (g95_generate_function_code,
5512 g95_generate_constructors): Likewise.
5513 * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
5514 g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
5517 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
5518 * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
5519 with components point to the DERIVED type itself, and two DERIVED
5520 type with components point to each other.
5521 * trans-expr.c (g95_conv_componet_ref): Modified
5523 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
5524 * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
5526 (g95_trans_pointer_assign): Implement Nullify.
5528 2003-05-01 Paul Brook <paul@nowt.org>
5530 * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
5531 * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
5533 2003-05-01 Paul Brook <paul@nowr.org>
5535 * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
5536 trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
5539 2003-05-01 Canqun Yang <canqun@yahoo.com.cn>
5541 * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
5544 2003-04-28 Paul Brook <paul@nowt.org>
5546 * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
5547 as their kind suggests.
5548 (g95_resolve_reshape): Ditto.
5550 2003-04-28 Chun Huang <compiler@sohu.com>
5552 * trans-expr.c (g95_conv_substring_expr): New function.
5553 (g95_conv_expr): Use it.
5555 2003-04-28 Paul Brook <paul@nowt.org>
5557 * iresolve.c (g95_resolve_transpose): Make it match the
5559 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
5561 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
5563 * trans-types.c (g95_add_field_to_struct): New function to
5564 add a field to a UNION_TYPE or RECORD_TYPE.
5565 * trans-types.h (g95_add_field_to_struct): Prototype.
5566 (g95_get_derived_type): Use g95_add_field_to_struct to add
5568 * trans-io.c (g95_add_field): Remove.
5569 (ADD_FIELD): Use new g95_add_field_to_struct function.
5570 (ADD_STRING): Likewise.
5571 * trans-stmt.c (g95_trans_select): Likewise.
5572 (g95_add_field): Remove duplicated function.
5574 2003-04-18 Canqun Yang <canqun@yahoo.com.cn>
5576 Port implementation for CHARACTER SELECT from Andy's tree.
5577 * trans-stmt.c (g95_trans_character_select): Implement character
5578 select. (g95_add_field): New function.
5579 * trans-decl.c: Declare 'gfor_gndecl_select_string'.
5580 (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
5581 * g95.h (struct g95_case): Add field 'int n'.
5582 * trans.h: Declare 'gfor_fndecl_select_string'.
5584 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
5586 * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
5587 (g95_insert_bbd): Die on duplicates.
5588 * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
5590 2003-04-14 Steven Bosscher <steven@gcc.gnu.org>
5592 * g95.texi: Require GMP 4.0 -- like we actually
5593 do. Explain the testsuite and what-goes-where.
5594 Don't use undefined texinfo symbol. Break very
5595 long line. Remove finished item from the list
5598 2003-04-11 Canqun Yang <canqun@yahoo.com.cn>
5600 * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
5603 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
5605 * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
5606 (g95_trans_forall_body): New function.
5608 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
5610 * resolve.c (resove_where): New function.
5611 (resolve_where_shape): New function.
5612 (resolve_code): Add call to 'resolve_where'
5613 * trans-stmt.c (g95_trans_where): Modified.
5614 (g95_trans_where_2): New function.
5615 (g95_trans_where_assign): New function.
5616 (g95_evaluate_where_mask): New function.
5617 (g95_add_to_stmt_list): New function.
5618 (g95_get_temp_expr): New function.
5619 * trans.h (where_stmt_list): New structure.
5621 2003-04-10 Paul Brook <paul@nowt.org>
5623 * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
5624 (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
5626 2003-04-10 Steven Bosscher <steven@gcc.gnu.org>
5628 Update after mainline -> tree-ssa-branch merge.
5629 * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
5631 (g95_init): Update for new lang_hooks definition.
5632 (g95_post_options): New langhook.
5633 (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
5634 * scanner.c (g95_new_file): Comment update.
5636 2003-04-09 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5638 * g95.h, lang-options.h: Add -Wimplicit-interface.
5639 * options.c (g95_init_options, g95_parse_arg): Set it.
5640 * interface.c (check_intents): Warn about call with implicit
5642 * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
5645 2003-04-05 Paul Brook <paul@nowt.org>
5647 * iresolve.c (g95_resolve_spread): Don't resole based on type.
5648 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
5650 2003-03-29 Paul Brook <paul@nowt.org>
5652 * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
5653 (g95_resolve_unpack): Ditto.
5654 * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
5655 (g95_conv_intrinsic_function): Use it. Remove PACK and UNPACK.
5656 (g95_is_intrinsic_libcall): Add PACK and UNPACK.
5658 2003-03-25 Paul Brook <paul@nowt.org>
5660 * arith.c (g95_unary_user, g95_user): Remove dead functions.
5662 * array.c (g95_free_array_ref): Ditto.
5664 * symbol.c (g95_use_derived_tree): Ditto.
5665 * intrinsic.c (add_functions): Use simplification for SCALE.
5666 * primary.c (g95_match_rvalue): Test sym, not symtree.
5668 2003-03-25 Paul Brook <paul@nowt.org>
5670 * trans-decl.c (build_function_decl): Add parameter before it gets
5671 turned into a constant.
5672 * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
5673 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
5674 * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
5676 2003-03-22 Paul Brook <paul@nowt.org>
5678 * trans-array.c (g95_conv_array_initializer): Allow scalar
5680 * trans-decl.c (g95_finish_var_decl): Result variables are not
5682 * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
5683 (g95_conv_intrinsic_function): Use it.
5684 * trans-types.h (g95_type_spec): Remove dead declaration.
5686 2003-03-21 Paul Brook <paul@nowt.org>
5688 * trans-decl.c (g95_build_function_decl): Mark string parameters.
5690 2003-03-20 Paul Brook <paul@nowt.org>
5692 * trans-decl.c (g95_build_function_decl): Put character length
5693 parameters at the end of the function declaration.
5694 * trans-expr.c (g95_conv_function_call): Ditto.
5695 * trans-types.c (g95_get_function_type): Ditto.
5697 2003-03-20 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5699 * resolve.c (resolve_formal_arglist): Don't impose intent for
5700 procedure arguments of pure functions.
5701 (resolve_select): Remove redundant assignment.
5703 2003-03-19 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5705 * arith.c (validate_logical), g95.h, options.c (g95_init_options):
5707 * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
5708 * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
5710 * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
5712 * symbol.c (g95_add_type): Fix typo in comment.
5715 2003-03-16 Paul Brook <paul@nowt.org>
5717 * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
5718 * expr.c (g95_build_call): Remove.
5719 * f95-lang.c (puchdecl_top_level): New function.
5720 * g95.h (g95_code): Store resolved symbol, not just the name.
5721 * intrinsic.c (g95_intrinsic_namespace): New global namespace.
5722 (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
5723 (g95_get_intrinsic_sub_symbol): New function.
5724 * iresolve.c (g95_resolve_cpu_time): Use it.
5725 (g95_resolve_random_number): Ditto.
5726 * resolve.c: Set code->resolved_sym instead of code->sub_name.
5727 * trans-decl.c (g95_get_extern_function_decl): Give external decls
5728 the correct DECL_CONTEXT. Add global symbold to the global scope.
5729 * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
5732 2003-03-16 Paul Brook <paul@nowt.org>
5734 * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
5735 * options.c (g95_parse_arg): Ditto.
5736 * module.c (mio_symbol_attribute): Handle the always_explicit bit.
5737 * resolve.c (resolve_formal_arglist): The always_explicit sould be set
5738 for the procedure, not the parameter.
5739 * trans-array.c (g95_trans_g77_array): New function.
5740 (g95_trans_assumed_size): Use it.
5741 (g95_trans_dummy_array_bias): Ditto.
5742 (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
5743 (g95_conv_expr_descriptor): ... to here. Update callers.
5744 * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
5745 (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
5746 * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
5747 * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
5748 * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
5749 (g95_sym_type): Ditto.
5751 2003-03-15 Paul Brook <paul@nowt.org>
5753 * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
5755 * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
5757 2003-03-14 Paul Brook <paul@nowt.org>
5759 * trans-array.c (g95_array_is_packed): Remove.
5760 (g95_conv_array_base): Correctly handle all descriptorless cases.
5761 (g95_conv_array_stride): Use descriptorless strides.
5762 (g95_trans_dummy_array_bias): Don't always repack the array.
5763 (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
5765 * trans-types.c (g95_get_nodesc_array_type): Differentiate between
5766 dummy and non-dummy arrays...
5767 (g95_sym_type, g95_get_derived_type): ... like these.
5768 (g95_get_array_type_bounds): Allow discontiguous arrays.
5770 2003-03-12 Paul Brook <paul@nowt.org>
5772 * array.c (g95_resolve_array_spec): Fix comment.
5773 * g95.h (symbol_attributes): New flag always_explicit.
5774 * resolve.c (resolve_formal_arglist): Set it always_explicit.
5775 * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
5776 * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
5777 (g95_trans_array_bounds): Allow assumed shape arrays.
5778 (g95_trans_repack_array): Remove.
5779 (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
5780 * trans-decl.c (g95_build_qualified_array): Only ignore absent
5781 bounds for assumed size arrays.
5782 (g95_build_dummy_array_decl): Use descriptorless arrays.
5783 * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
5784 (g95_trans_pointer_assign): Fix typo.
5785 * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
5787 (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
5788 * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
5789 Also modify callers.
5790 * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
5792 2003-03-08 Paul Brook <paul@nowt.org>
5794 * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
5795 (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
5796 * resolve.c (compare_spec_to_ref): Allow full array sections.
5798 2003-03-08 Paul Brook <paul@nowt.org>
5800 * expr.c (g95_simplify_expr): Also simplify array index and
5801 substring expressions.
5802 * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
5803 * trans-array.c (g95_trans_array_bounds): New function.
5804 (g95_trans_auto_array_allocation): Use it.
5805 (g95_trans_assumed_size): Rewrite.
5806 * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
5807 (gfor_fndecl_repack): Remove.
5808 (g95_build_qualified_array): Handle absent upper bounds.
5809 (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
5810 (g95_get_symbol_decl): Update.
5811 (g95_build_intrinsic_function_decls): Initialize new decls.
5812 * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
5813 (gfor_fndecl_repack): Remove.
5814 * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
5815 * trans-types.c: (g95_build_array_type): Merge duplicated code..
5816 (g95_get_nodesc_array_type): Handle absent bounds.
5817 * trans-types.h (g95_get_nodesc_array_type): Declare.
5819 2003-03-04 Paul Brook <paul@nowt.org>
5821 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
5824 2003-03-02 Paul Brook <paul@nowt.org>
5826 * options.c (g95_init_options): Drfault to 1.
5827 (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
5828 * trans-array.c (g95_conv_array_data, g95_conv_array_base,
5829 g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
5830 Handle non-constant size automatic arrays.
5831 (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
5832 generic bound functions.
5833 (g95_trans_auto_array_allocation): Don't create a descriptor.
5834 (g95_trans_assumed_size): New function (broken).
5835 (g95_trans_dummy_array_bias): Remove unused var.
5836 * trans-array.h (g95_trans_assumed_size): Declare.
5837 * trans-decl.c (create_index_var): New fuction.
5838 (g95_build_qualified_array): New function.
5839 (g95_get_symbol_decl): Use it.
5840 (g95_trans_deferred_vars): Handle assumed shape seperately.
5841 * trans-types.c (get_element_type): Handle heap allocated arrays.
5842 (g95_is_nodesc_array): Include non-const size arrays.
5843 (g95_get_nodesc_array_type): Ditto.
5845 2003-02-23 Paul Brook <paul@nowt.org>
5847 * trans-array.c (g95_array_init_size): Should use stride, not size of
5850 2003-02-18 Paul Brook <paul@nowt.org>
5852 * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
5853 after intrinsic function check.
5855 2003-02-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5857 * io.c (match_io): Fix missing return value and remove useless
5859 * match.c (g95_match): Remove useless assignment.
5860 * module.c (parse_string): Remove useless post increment.
5861 * simplify.c (g95_simplify_verify): Remove useless assignment.
5863 2003-02-15 Paul Brook <paul@nowt.org>
5865 * expr.c (restricted_intrinsic): Handle bad values gracefully.
5866 * g95.h (symbol_attribute): Add referenced member.
5867 (g95_symbol): Add dummy_order member.
5868 (g95_set_sym_referenced): Declare.
5869 * match.c (g95_match_assignment, g95_match_call): Use it
5870 * primary.c (match_actual_arg, g95_match_rvalue,
5871 g95_match_variable): Ditto.
5872 * symbol.c (next_dummy_order): New variable.
5873 (g95_set_sym_referenced): New function.
5874 (check_done): New function.
5875 (g95_add_*): Use it.
5876 * trans-decl.c: Make formatting conform to GCC standards.
5877 (g95_defer_symbol_init): Add dummy variables in the right order.
5878 (g95_get_symbol_decl): Only accept referenced variables.
5879 (g95_create_module_variable): Module variables are always required.
5880 (generatr_local_decls): New function.
5881 (generate_local_vars): New function.
5882 (g95_generate_function_code): Use it.
5884 2003-02-13 Paul Brook <paul@nowt.org>
5886 * trans-decl.c (g95_conv_struct_cons): Remove.
5887 (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
5888 * trans-expr.c (g95_conv_structure): New function.
5889 (g95_conv_expr): Use it.
5891 2003-02-09 Paul Brook <paul@nowt.org>
5893 * trans-array.c (g95_array_init_size): Don't evaluate the linit
5894 expressions multiple times.
5895 (g95_trans_auto_arry_allocation): Use pointer not tmp.
5897 2003-02-08 Paul Brook <paul@nowt.org>
5899 * module.c (mio_symtree_ref): Declare as static.
5900 (mio_expr): Remove dead code.
5901 (read_module): Set the symtree link for fixups.
5902 * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
5903 (build_round_expr): ... to this.
5904 (g95_conv_intrinsic_aint): New function.
5905 (g95_conv_intrinsic_function): Use it.
5907 2003-02-08 Paul Brook <paul@nowt.org>
5909 * trans-array.c (g95_trans_array_constructor_value): Use the acutal
5910 offset after modificaton, not the increment expression.
5911 * dependency.c: Kill excess whitespace.
5913 2003-02-07 Sanjiv Gupta <sanjivg@noida.hcltech.com>
5915 * dependency.h: Remove some function declarations.
5916 * dependency.c (get_no_of_elements): Change this function not to
5918 * other: Add comments for all modified functions.
5920 2003-02-06 Paul Brook <paul@nowt.org>
5922 * g95spec.c (lang_specific_functions): Fix initializer warning.
5923 * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
5924 for structure type names.
5925 * trans-decl.c (g95_cons_structure_cons): New function.
5926 (g95_get_symbol_decl): Use it.
5927 * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
5930 2003-02-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5932 * resolve.c (compare_cases): Add const to casts.
5934 2003-01-30 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5936 * g95.h (g95_check_f): Change a1 to f1m.
5937 * intrinsic.c (add_sym_1m, check_specific,
5938 g95_intrinsic_func_interface): Use it.
5940 * module.c (init_pi_tree): Remove useless cast.
5941 (fp2): Fix argument type.
5943 * parse.c (parse_select_block): Add comment.
5945 2003-02-05 Toon Moene <toon@moene.indiv.nluug.nl>
5947 * lang-options.h: Fix warning involving C90 concatenated
5950 2003-02-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
5951 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
5953 * io.c (format_asterisk): Complete initializer to kill warning.
5954 * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
5955 DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
5956 (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
5957 new defines to complete initializers. Kills all warnings.
5959 * Make-lang.in: Comment cleanup.
5961 2003-02-05 Paul Brook <paul@nowt.org>
5963 * array.c (g95_free_constructor): Handle NULL expressions.
5964 * resolve.c (resolve_structure_cons): Ditto.
5965 * decl.c (g95_match_null): New Function.
5966 (variable_decl): Use it.
5967 * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
5968 * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
5969 * trans-types.c (g95_set_decl_attributes): Remove empty function.
5971 2003-02-05 Paul Brook <paul@nowt.org>
5973 * trans.h (build1_v): New macro.
5974 (build_v): Remove pointless and incorrect prototype.
5975 * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
5976 * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
5978 2003-02-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
5980 * Make-lang.in (F95_OBJS): Remove one more dead file.
5982 2003-02-01 Paul Brook <paul@nowt.org>
5984 * lang-specs.h: Don't pass -ffixed-form to the linker.
5985 * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
5987 2003-02-01 Paul Brook <paul@nowt.org>
5989 * Make-lang.in (F95_OBJS): Remove dead files.
5990 * trans-array.c (g95_array_init_size): Do the right thing when
5992 * trans-decl.c (g95_generate_function_code): Initialize deffered
5993 symbol list before translating contained subroutines.
5994 * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
5995 scalar invariant values here...
5996 (g95_conv_variable, g95_conv_function_call): ... instead of here ...
5997 * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
5999 2003-01-29 Paul Brook <paul@nowt.org>
6001 * trans-array.c (g95_add_loop_code): Put pre code in the right block.
6002 (g95_walk_elemental_function_args): Reverse chains before adding.
6003 (g95_reverse_ss): Move about a bit.
6004 * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
6007 2003-01-28 Paul Brook <paul@nowt.org>
6009 * intrinsic.c (resolve_intrinsic): Use correct union member.
6010 * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
6012 * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
6013 use associated variables.
6014 * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
6015 * trans-expr.c (g95_conv_expr_present): ... to here.
6016 * trans.h: Declare it.
6017 * trans-types.c (g95_sym_type): Assume subroutine if not specified.
6019 2003-01-28 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
6021 * array.c (expand_iterator): Suppress useless assignment.
6022 * decl.c (match_char_spec): Ditto.
6023 * io.c (match_io_iterator): Ditto.
6024 * primary.c (match_real_constant): Ditto.
6025 * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
6026 Ditto. Also, use g95_intrinsic_op not int for intrinsic operators.
6027 * matchexp.c (match_add_operand, match_level_5): Likewise.
6028 * module.c (parse_atom, find_enum): Likewise.
6029 * resolve.c: move #include <string.h>
6030 (resolve_select): Fix serious typo.
6032 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.n>
6034 * Make-lang.in: Don't build with broken tree-ssa-pre.
6036 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.nl>
6038 * resolve.c (resolve_index): Add a TODO.
6039 * symbol.c: Remove useless "#include <ctype.h>".
6041 2003-01-27 Paul Brook <paul@nowt.org>
6043 * check.c (check_rest): Allow different type kinds as an extension.
6044 * g95.h (g95_resolve_f): Add f1m.
6045 * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
6046 * intrinsic.h: Chenge prototypes for MIN and MAX.
6047 * iresolve.c (g95_resolve_minmax): New function.
6048 (g95_resolve_min, g95_resolve_max): Use it.
6049 * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
6051 (g95_conv_intrinsic_present): Fix logic.
6053 2003-01-27 Steven Bossche <s.bosscher@student.tudelft.nl>
6055 * g95.h (g95_case): Don't be a tree, be a double linked list.
6056 * match.c (match_case_selector): Remove redundant semantics check.
6057 Clean up a few goto's to make it a tiny little bit faster.
6058 * resolve.c (case_tree): Die.
6059 (compare_cases): Accept and compare unbounded cases too.
6060 (check_case_overlap): Don't build a tree. Instead, merge-sort the
6061 whole list of g95_cases passed from resolve_select.
6062 (sane_logical_select): Die.
6063 (check_case_expr): Return FAILURE if a CASE label is of the wrong
6065 (resolve_select): Fixup case expression for computed GOTOs, put it
6066 in expr, not expr2, for easier handing in the parse tree dumper and
6067 the code generator. Rewrite the rest of the function: Kill
6068 unreachable case labels and unreachable case blocks.
6069 * dump-parse-tree.c (g95_show_code_node): Always dump expr for
6070 an EXEC_SELECT, not case2 anymore.
6071 * trans-const.c (g95_conv_constant_to_tree): New function.
6072 (g95_conv_constant): Use it.
6073 * trans-const.h: Declare prototype for the new function.
6074 * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
6075 g95_trans_character_select): New static functions.
6076 (g95_trans_select): Rewrite.
6078 2003-01-26 Paul Brook <paul@nowt.org>
6080 * intrinsic.c (add_fnctions): Properly add dreal.
6081 * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
6082 (g95_conv_intrinsic_function): Use it.
6083 * trans-io.c (build_dt): Abort on internal files (unimplemented).
6085 2003-01-26 Paul Brook <paul@nowt.org>
6087 Widespread changes to the handling of symbols in expressions. These
6088 are now linked via g95_symtree nodes.
6089 * parse.c (g95_fixup_sibling symbols): New function.
6090 (parse_contained): Use it.
6091 * g95.h (symbol_attribute): Add contained. Indicates a symbol is a
6092 contained procedure that has bee correctly fixed up.
6093 (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
6095 2003-01-24 Paul Brook <paul@nowt.org>
6097 * trans-array.c (g95_walk_expr): Function result attributes are in
6099 * trans-expr.c (g95_conv_function_call,
6100 g95_trans_arrayfunc_assign): Ditto.
6101 * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
6103 2003-01-23 Steven Bosscher <s.bosscher@student.tudelft.nl>
6105 * expr.c (check_restricted): Fix error message.
6106 * symbol.c (free_st_labels): Plug memleak.
6108 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
6110 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
6111 reduce_binary_aa, reduce_binary, eval_intrinsic,
6112 eval_intrinsic_f2): Use typesafe prototypes for eval functions.
6113 * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
6114 for typesafe intrinsics helper functions.
6115 (g95_intrinsic_sym): Use them.
6116 * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
6117 add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
6118 add_sym_5, add_conv, resolve_intrinsic, do_simplify,
6119 check_specific, g95_intrinsic_func_interface,
6120 g95_intrinsic_sub_interface): Adjust all calls to intrinsics
6122 * trans-decl.c (g95_get_extern_function_decl): Likewise.
6123 * Make-lang.in: Don't disable warnings for strict prototypes
6124 any longer, everything is typesafe now.
6126 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
6128 * bbt.c (duplicate_node): Make static.
6129 * module.c (module_name): Make static.
6130 * scanner.c (include_dirs): Make static.
6132 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
6134 Hard coded _gfor_'s should not show up anymore.
6135 * g95.h (PREFIX): New macro.
6136 * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
6138 (g95_resolve_random_number): Likewise.
6139 * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
6140 * trans-io.c: Remove 'prefix' macro. Replace all uses with
6141 the new PREFIX macro from g95.h.
6143 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
6145 The troubles of forking... Andy implemented this just now too.
6146 Let's stick to that and keep the trees close.
6147 * g95.h (g95_st_label): 'format' member is now a g95_expr.
6148 * io.c: Revert previous changes.
6149 (g95_match_format): Match the format string as a character
6151 * match.h (g95_statement_label): Declare external.
6152 * parse.c: Revert previous changes.
6153 * symbol.c (g95_free_st_label): Free a g95_expr instead
6155 * trans-io.c: Revert previous changes.
6156 (build_dt): Use set_string to set the format string.
6158 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
6160 * io.c (format_string): Make non-static.
6161 (g95_match_format): Remember the format string.
6162 (terminate_io): Add I/O termination for empty I/O lists.
6163 * match.h: Declare external format_string.
6164 * parse.c (check_statement_label): Attack the format string
6165 to a format label for FORMAT statements.
6166 * trans-io.c (g95_add_field): Define prefix macro. Replace
6167 all uses of PREFIX define with a use of this macro.
6168 (build_dt): Implement formatted I/O for format labels.
6170 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
6172 * lang-options.h: Kill "-std=F".
6173 * options.c: Remove unimplemented "-std=F". Modify
6175 * misc.c (g95_terminal_width): New function.
6176 * error.c (g95_error_init_1): Use g95_terminal_width.
6177 * g95.h: Add prototype for g95_terminal_width, remove
6180 2003-01-19 Steven Bosscher <s.bosscher@student.tudelft.nl>
6182 * Make-lang.in: Fix typo.
6184 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
6186 * g95.h (struct g95_case): Remove unused cruft, new member
6187 'where' to keep track of the locus of the default case.
6188 * match.c (g95_match_case): Add locus to the current case.
6189 (match_case_selector): Likewise.
6190 * parse.c (parse_select_block): Move semantics check for
6191 multiple DEFAULT cases out of here to...
6192 * resolve.c (check_case_overlap): ...here. Return sooner
6194 (check_case_expr): Take two g95_cases now, use to sure the
6195 expression kinds are the same.
6196 (resolve_select): Cleanup.
6198 2003-01-18 Paul Brook <paul@nowt.org>
6200 * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
6201 * trans-decl.c (g95_set_symbol_decl): Handle non-array result
6203 (g95_get_extern_function_decl): Put decls in the correct context.
6205 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
6207 * trans-io.c: Port changes from Andy to set ERR flag.
6209 2003-01-17 Paul Brook <paul@nowt.org>
6211 * trans-array.c: Add various comments.
6212 (g95_ss_terminator): Declare as const.
6213 (g95_walk_expr): Remove first parameter and update all callers.
6214 (g95_walk_op_expr): Initialize scalar SS properly.
6215 * trans-array.h (g95_walk_expr): Update prototype.
6216 * trans-expr.c: Update for new g95_walk_expr.
6217 * trans-intrinsic.c: Ditto.
6218 * trans-io.c: Ditto.
6219 * trans.h: Various comments for SS chains.
6221 2003-01-17 Paul Brook <paul@nowt.org>
6223 * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
6225 * intrinsic.c (add_functions): Use them.
6226 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
6227 * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
6229 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
6231 Fallout of a small merge conflict:
6232 * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
6234 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
6236 * initrinsic.c: New add_sym_* functions for strong typing.
6237 (add_conv): Make prototype strict.
6238 * dump-parse-tree.c, dependency.c: Include config.h
6239 * resolve.c, trans-io.c: Fix typos.
6241 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
6243 * dump-parse-tree.c (g95_show_code_node): Show the
6244 condition for a computed GOTO that was transformed
6245 to a SELECT CASE construct.
6246 * resolve.c (check_case_overlap): Revert previous switch
6247 to treaps, it was too slow and didn't catch all trouble.
6248 (resolve_symbol): Be more flexible about module procedures.
6249 * symbol.c (check_conflict): Point to relevant section in
6250 the standard for dubious conflict. Allow procedure
6251 dummy arguments to be optional again.
6252 * trans-io (add_field): Rename to g95_add_field. Change
6254 * trans-stmt (trans_select): Handle unbounded cases for
6255 integer SELECT CASE constructs. Fix/add more comment.
6257 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
6259 * g95.h: Uses GCC's function attribute macros.
6260 * error.c, module.c, parse.c, g95.h: More function attributes.
6262 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
6264 * trans-decl.c (get_label_decl): Use TREE_LINENO instead
6265 of DECL_SOURCE_LINE, and TREE_FILENAME instead of
6268 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
6270 * f95-lang.c (pushdecl): Use TREE_LINENO instead of
6272 * trans.c (g95_trans_code): Use annotate_all_with_file_line
6273 instead of nowdead wrap_all_with_wfl.
6275 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
6277 * parse.c (g95_parse_file): In verbose mode, dump the parse tree
6278 before generating code, so we can still see it even if the code
6279 generation phase dies.
6281 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
6283 * decl.c (build_sym): Split out initialization expression parts...
6284 (add_init_expr_to_sym): ...to here.
6285 (variable_decl): Add the symbol following an attribute list to the
6286 symbol tree before parsing the optional initialization expression
6287 if the symbol is not of a derived type.
6288 * primary.c (g95_match_rvalue): Don't assume a symbol always has
6289 a value if it is a PARAMETER.
6291 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
6293 * misc.c: Don't #include <mcheck.h>
6294 * module.c: Ditto. Kill uses of mtrace, muntrace. If there
6295 ever was a glibc bug, then either this was never reported to
6296 glibc people, or it has been fixed for so long that there's
6297 no information you can find about it, anywhere.
6299 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
6302 * module.c (attr_bits, bt_types, array_spec_types):
6303 Switch 'const' and 'static'.
6304 * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
6306 GNU'ify source code:
6307 * trans-io.c: Numerous fixes, one fixed warning and a few
6308 TODO markers so that we don't forget about them.
6310 2003-01-13 Paul Brook <paul@nowt.org>
6312 * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
6313 * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
6315 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
6316 * match.c (g95_match_stop): Fix dumb == -> != error.
6318 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
6320 * dump-parse-tree.c (show_indent): Add line breaks. This
6321 whole dumping process needs cleanups.
6322 * f95-lang.c (g95_mark_addressable): Fix prototype to match
6323 the langhook. Fix 'return's accordingly.
6324 * g95-support.h: Adjust prototype.
6325 * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
6326 * lang-options.h: Add '-fsyntax-only'.
6327 * options.c (g95_init_options): Init 'no_backend'.
6328 (g95_parse_arg): Deal with '-fsyntax-only'.
6329 * parse.c (g95_parse_file): Do not generate code if 'no_backend'
6332 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
6334 * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
6335 arguments. Also make sure that if a symbol is marked INTRINSIC,
6336 an intrinsic with the symbol's name actually exists.
6337 (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
6338 Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
6339 ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
6341 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
6343 * resolve.c (resolve_contained_functions): Fix condition, don't
6344 throw internal_error if a child namespace has no name. Apparently
6345 this can be the case?
6347 2003-01-11 Paul Brook <paul@nowt.org>
6349 Port changes from Andy's tree:
6350 * g95.h (g95_code): Add stop_code.
6351 * match.c (g95_match_stop): Detter syntax checking.
6352 * resolve.c (resolve_generic_f0): Return match type.
6353 (resolve_generic_f): Remove dead/duplicated code.
6354 (resolve_specific_f): Ditto.
6355 * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
6356 * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
6357 * trans-stmt.c (g95_trans_stop): Handle new STOP format.
6359 2003-01-11 Paul Brook <paul@nowt.org>
6361 * trans-array.c: Various documentation/comment changes.
6362 * trans-stmt.c: Ditto.
6365 2003-01-10 Paul Brook <paul@nowt.org>
6367 * options.c/h: Add -fdump-parse-tree as alias of -v.
6369 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
6371 * dump-parse-tree.c (g95_show_namespace): Fixed another
6372 typo. Sorry, it's Friday...
6374 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
6377 * trans-array.c, trans-array.h, trans.c, trans-const.c,
6378 trans-const.h, trans-decl.c, trans-expr.c, trans.h
6379 trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
6380 trans-types.c: Fix bogus copyright years, add 2003.
6381 * trans-types.h: Give copyright header.
6383 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
6385 * dump-parse-tree.c (g95_show_namespace): Fixed typo.
6386 * expr.c, options.c, scanner.c: Add some more 'const' markers.
6387 * intrinsic.c: Some constant strings moved to read-only memory.
6388 * io.c (format_asterisk): Move to...
6391 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
6393 * dump-parse-tree.c (g95_show_namespace): Dump implicit
6394 types for ranges instead of per-letter. Indent the
6395 'CONTAINS' just like everything else.
6396 * resolve.c (resolve_contained_functions): Clarify comment.
6397 Explain non-obvious conditional expression. Improve
6398 diagnostics if tyoe cannot be resolved.
6399 Port semi-fix from Andy's tree:
6400 (was_declared): Move up before first use.
6401 (generic_sym, specific_sym): New functions. Code moved
6402 out if procedure_kind.
6403 (procedure_kind): Simplify using new functions.
6404 (resolve_generic_f): Make sure the functions we find in
6405 a parent namespace is generic.
6406 (resolve_specific_f): Ditto for specific functions.
6408 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
6410 * trans-stmt.c, trans.c: Fix some code style issues. Add
6411 some more comment (but still not enough!).
6413 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
6415 * symbol.c (flavors, procedures, intents, acces_types,
6416 access_types, ifsrc_types): Make const.
6417 * misc.c (g95_string2code): Make 'm' param 'const'.
6418 * module.c (find_enum, write_atom, mio_name): Make
6420 (attr_bits, bt_types, array_spec_types, array_ref_types,
6421 ref_types, expr_types): Make const.
6422 * g95.h: Adjust external decls.
6424 2003-01-09 Paul Brook <paul@nowt.org>
6426 * Testsuite: Add a load of new cases.
6428 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
6430 * Make-file.in: Add dependency on back end header files;
6431 a parallel build should work now.
6432 * f95-lang-c (lang_identifier): Remove bogus comment.
6433 (g95_be_parse_file): Fix prototype.
6434 (g95_init): Make static.
6435 (g95_finish): Make static.
6436 * error.c (g95_syntax_error): Kill. Make define in...
6437 * g95.h (g95_syntax_error): Define.
6438 (g95.options): Make 'source' member 'const'.
6439 * interface.c (g95_match_interface): Explain
6440 hard-to-read condition.
6441 (g95_match_end_interface): Ditto.
6442 * trans_const.c (g95_build_string_const): Make 's' parameter
6444 * trans_const.h: Adjust protoype accordingly.
6445 * trans-decl.c: Include tree-dump.h
6446 (g95_generate_function_code): Build fixes for recent changes
6447 in the tree-ssa branch.
6449 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
6451 * format.c: Kill, move code from here...
6453 * Make-lang.in: Adjust.
6456 * BUGS: Mention where to submit bugs. Move old content...
6457 * TODO: ...to here. New file.
6459 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
6460 Fix most warnings, and suppress the ones we can't fix for now.
6461 * Make-lang.in: Suppress warnings about bad proto's in g95.h,
6462 these warnings just clutter the screen and there's not much
6463 we can do about them for now anyway.
6464 * check.c, iresolve.c: Mark unused function parameters.
6465 * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
6466 they should be resolved before they get here.
6467 * error.c: Remove unused FILE *status_out.
6468 * f95-lang.c (g95_init): Remove bogus cast.
6469 * Many files: Make things 'const' where required.
6470 * g95.h: Fix prototypes for all modified functions above.
6471 (g95_options): Remove 'object' member.
6473 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
6475 * Make-file.in: Cleanup bogus targets. Add more comment.
6476 * lang-options.h: New option '-w'.
6477 * g95.h: add no_options field to struct g95_options.
6478 * options.c (g95_init_options): Default no_warnings to off.
6479 (g95_parse_arg): Recognise the '-w' switch and its alias,
6481 * error.c (g95_warning, g95_warning_now): Don't emit warning if
6482 no_warning option is set.
6483 * iresolve.c (g95_resolve_shape): Fix warning.
6485 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
6487 * primary.c (g95_next_string_char): Rename next_string_char, and
6488 make static. Adjust callers accordingly.
6489 * resolve.c (resolve_generic_f0): Return try, not match. Adjust
6490 callers accordingly.
6491 * g95.h: Split out all g95_match* functions to...
6492 * match.h: ...here. New file.
6493 * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
6494 matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
6496 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
6498 * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
6499 g95_merge_new_implicit): New functions.
6500 (g95_match_implicit_none, g95_match_implicit): Move from here...
6501 * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
6502 Modify to use the new functions in symbol.c.
6503 * g95.h: Add and move prototypes.
6505 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
6507 * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
6508 node compare function.
6509 (g95_insert_bbt): Likewise.
6510 (g95_insert_bbt_with_overlap): Likewise.
6511 (g95_delete_bbt): Likewise.
6512 (delete_treap): Likewise. Also fix a potential bug when calling it.
6513 * module.c (compare_pointers): Change proto to compare_fn.
6514 (compare_integers): Likewise.
6515 (compare_true_names): Likewise.
6516 (find_true_name): Adjust call to compare_true_names to match proto.
6517 (require_atom, write_atom, mio_name): Fix 'const' warnings.
6518 (init_pi_tree): Make compare a compare_fn instead of (int *).
6519 * resolve.c (compare_cases): Change proto to compare_fn.
6520 * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
6521 it static, and rename to compare_symtree.
6522 (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
6524 * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
6525 of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
6527 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
6528 * Make-lang.in: Fix spaces/tabs issues from previous patch.
6529 * patch.options: Blow away Paul's checkin mistake :-)
6530 * io.c (terminate_io): Fix memory leak (Arnaud).
6532 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
6534 * Make-lang.in: Teach about building DVI, info manual.
6535 * g95.texi: New file.
6537 2003-01-02 Paul Brook <paul@nowt.org>
6539 * trans-array.c (g95_reverse_ss): Make static and don't use.
6540 (g95_conv_ss_descriptor): Don't use g95_loopinfo
6541 (g95_conv_array_parameters): Modify for pointer assignments.
6542 (g95_walk_subexpr): New function.
6543 (g95_walk_expr*): Use it.
6544 * trans-array.h (g95_reverse_ss): Remove prototype.
6545 * trans-expr.c (g95_trans_pointer_assign): Implement.
6546 (Many): Set se.want_pointer before calling g95_conv_array_parameter.
6547 * trans-intrinsic.c: Sync with scalarizer changes.
6548 * trans-io.c: Ditto.
6550 2002-12-29 Paul Brook <paul@nowt.org>
6552 * trans-array.c: Document calling convention for arrays.
6554 2002-12-19 Paul Brook <paul@nowt.org>
6556 * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
6557 assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
6558 optional parameters for some intrinsics.
6559 (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
6560 * trans-expr.c (g95_conv_function_call): Pass NULL for absent
6561 optional parameters.
6562 * trans.h (g95_se): Add ignore_optional flag.
6564 2002-12-15 Paul Brook <paul@nowt.org>
6566 * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
6567 * trans-decl.c (g95_generate_function_code): Use TDI_original.
6569 2002-12-14 Paul Brook <paul@nowt.org>
6571 * trans-stmt.c (g95_trans_call): Use resolved symbol name.
6573 2002-12-12 Paul Brook <paul@nowt.org>
6575 * trans-array.c (g95_trans_array_constructor_subarray): Fully
6576 initialize the scalarizer.
6577 (various): Update to new format of g95_expr->value.constructor.
6579 2002-12-08 Paul Brook <paul@nowt.org>
6581 * trans-array.c (g95_put_offset_into_var): New function.
6582 (g95_trans_array_constructor_subarray): New function.
6583 (g95_trans_array_constructor_value): Use it.
6584 (g95_array_cons_size): Don't abort() on array components.
6586 2002-12-08 Paul Brook <paul@nowt.org>
6588 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
6589 * support.c: Update #includes.
6590 (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
6591 * trans-array.c: Update #includes.
6593 * trans-const.c: Ditto.
6594 * trans-io.c: Ditto.
6595 * trans-types.c: Ditto.
6596 (g95_init_types): Set size_type_node.
6597 * trans-decl.c: Update #includes.
6598 (gfor_fndecl_adjust{l,r}): Declare and initialize.
6599 * trans-stmt.c: Update #includes.
6600 (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
6601 (g95_trans_select): Fix check for unbounded ranges.
6602 * trans-expr.c: Update #includes.
6603 (g95_conv_string_tmp): New function.
6604 (g95_conv_concat_op): Use it.
6605 * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
6606 * Trans-intrisic.c: Update #includes.
6607 (g95_conv_intrinsic_strcmp): New function.
6608 (g95_conv_intrinsic_adjust): Ditto.
6609 (g95_conv_intrinsic_function: Use them.
6611 2002-11-30 Paul Brook <paul@nowt.org>
6613 * trans-array.c (g95_walk_function_expr): Handle non-array return by
6615 * trans-dec.c (g95_build_function_decl): Handle character return
6617 (g95_get_fake_result_decl): Ditto.
6618 (g95_trans_deferred_vars): Ditto.
6619 * trans-expr.c (g95_conv_function_call): Ditto.
6620 (g95_trans_arrayfunc_assign) Limit to array valued functions.
6621 * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
6622 (g95_conv_intrinsic_function): Use it.
6623 * trans-types.c (g95_sym_type): Handle functions returning strings.
6624 (g95_return_by_reference): Ditto.
6625 (g95_get_function_type): Ditto.
6627 2002-11-18 Paul Brook <paul@nowt.org>
6629 * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
6630 requires a temporary.
6631 (g95_trans_select): Handle computed gotos.
6632 * trans-types.c (g95_build_array_type): Warn about non-functional
6633 assumed shape arrays.
6634 * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
6636 * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
6637 (g95_conv_intrinsic_int): New function.
6638 (g95_conv_intrinsic_mod): New function.
6639 (g95_conv_intrinsic_ichar): New function.
6640 (g95_conv_intrinsic_function): Use them.
6641 (g95_conv_intrinsic_dim): Use g95_evaluate_now.
6643 2002-11-17 Toon Moene <toon@moene.indiv.nluug.nl>
6645 * trans-types.c (g95_build_array_type): Assumed
6646 sized arrays can have rank > 1.
6647 * trans.c (g95_trans_code): Remove erroneous
6648 warning about CONTINUE.
6649 * trans-expr.c (g95_conv_variable): Remove
6652 2002-11-15 Paul Brook <paul@nowt.org>
6654 * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
6656 2002-10-31 Paul Brook <paul@nowt.org>
6658 * f95-tree.c: Remove tree copying stuff that's now in gimple.c
6659 * trans-expr.c (g95_conv_component_ref): Handle character string
6661 (g95_conv_string_parameter): Ditto.
6662 * trans-types.c (g95_get_derived_type): Add length decl to caracter
6665 2002-10-10 Paul Brook <paul@nowt.org>
6667 * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
6668 * trans-expr.c (g95_conv_function_call): Remove unreliable return value
6670 * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
6671 (g95_conv_intrinsic_function): Handle size and shape intrinsics.
6672 (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
6673 * trans-types.c (pvoid_type_node): Declare and initialize.
6674 * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
6675 (g95_array_allocate): Fix when base==data.
6676 (g95_conv_array_parameter): Correctly handle reduced rank sections.
6677 * trans-io.c (g95_trans_write): Correctly handle string modifiers.
6679 2002-10-09 Paul Brook <paul@nowt.org>
6681 * (g95_conv_expr_reference): Handle character strings correctly.
6683 2002-10-07 Paul Brook <paul@nowt.org>
6685 (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
6687 * trans-array.c (g95_build_array_initializer): Remove.
6688 (g95_conv_array_initializer): New Function.
6689 (g95_trans_auto_arry_allocation): Cleanup.
6690 (g95_trans_init_character_array): Remove.
6691 * g95spec.c: Link in libgforbegin.
6692 * trans.c (g95_generate_code): Rename main function to MAIN__.
6693 (g95_create_var): New function.
6694 (g95_create_var_np): New function.
6695 (g95_evaluate_now): New function.
6696 (g95_start_block): New function.
6697 (g95_finish_block): New function.
6698 (g95_add_expr_to_block): New function.
6699 (g95_add_block_to_block): New function.
6700 * trans-expr.c (g95_conv_componen_ref): New function.
6701 * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
6702 (F95_OBJS): Add dependency.o.
6703 * f95-lang.c (g95_is_simple_stmt): Remove.
6704 * f95-tree.c (mark_not_simple): New function.
6705 (unshare_all_trees): New function.
6706 (create_tmp_var, create_tmp_alias_var): Remove.
6707 * support.c (declare_tmp_vars, tree_last_decl): Remove.
6708 * trans*: Convert to new IR using GENERIC trees. Don't bother about
6709 SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
6711 2002-10-01 Paul Brook <paul@nowt.org>
6713 * trans-array.c: Add support for descriptorless arrays.
6714 (g95_conv_array_data): New function.
6715 (g95_conv_array_base): New function.
6716 * trans-array.h: Declare these here.
6717 * trans-decl.c(g95_create_mopdule_variable): Perform variable
6718 initialization and creation here.
6719 (g95_create_module_vars): Instead of here.
6720 * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
6721 * trans-intrinsic.c: Ditto.
6722 * trans-types.c (g95_is_nodesc_array): New function.
6723 (g95_get_nodesc_array_type): New function.
6724 (g95_sym_type, g95_get_derived_type): Use them.
6725 * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
6727 2002-09-28 Paul Brook <paul@nowt.org>
6729 * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
6730 * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
6733 2002-09-24 Paul Brook <paul@nowt.org>
6735 * f95-lang.c (listify): Remove declaration.
6736 (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
6738 * f95-tree.c (get_name): New function.
6739 * trans.c (module_namespace): Remove.
6740 * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
6741 * trans-types.c: Ditto.
6743 2002-09-19 Paul Brook <paul@nowt.org>
6745 * trans-array.c (g95_get_array_cons_size): New Function.
6746 (g95_con_ss_startstride): Handle Array constructors.
6747 (g95_conv_loop_setup): Ditto.
6748 (g95_conv_array_parameter): Ditto.
6749 * tras-decl.c (g95_finish_var_decl): Make initializes variables
6752 2002-09-19 Paul Brook <paul@nowt.org>
6754 * trans.c (g95_simple_fold_tmp): Detect variables inside
6756 * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
6758 2002-09-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
6760 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
6762 2002-09-14 Paul Brook <paul@nowt.org>
6764 * trans.c (g95_create_module_variable): Move to trans-decl.c.
6765 * trans-const.c (g95_conv_string_init): New Function.
6766 * trans-const.h: Declare it.
6767 * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
6768 variables. Don't bail on intrinsic symbols.
6769 (get_extern_function_decl): Handle specific intrinsic functions.
6770 * trans-types.c (g95_sym_type): Dummy functions don't return
6772 * trans-array.c (g95_build_array_initializer): New Function.
6773 (g95_trans_auto_array_allocation): Build initializer for static decls.
6774 Don't use mpz_addmul, it's GMP4 only.
6776 2002-09-12 Paul Brook <paul@nowt.org>
6778 * trans-decl.c (g95_generate_code): Fix thinko with return variable.
6779 (g95_get_extern_function_decl, g95_build_function_decl): Mangle
6780 assembler names for module procedures.
6782 2002-09-11 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
6784 * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
6787 2002-09-10 Paul Brook <paul@nowt.org>
6789 * trans-array.c: Change format of G95_SS_TEMP strictures.
6790 (g95_check_fncall_dependancy): New function.
6791 (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
6793 * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
6795 (g95_build_function_decl): Don't assume result arrays are packed.
6796 (g95_trans-deferred-vars): Handle array result variables.
6797 (g95_generate_fuction_code): Clear saved_function_decls.
6798 * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
6800 (g95_trans_arrayfunc_assign): New function.
6801 (g95_trans_assignment): Use it.
6802 * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
6803 (g95_se): Add direct_byref.
6804 * trans-types.c: Use sym->result rather than sym where appropriate.
6805 * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
6806 Update other functions to use this.
6807 (g95_is_intrinsic_libcall): New function.
6808 (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
6809 (g95_walk_intrinsic_function): Ditto.
6811 2002-09-08 Paul Brook <paul@nowt.org>
6813 * trans-types.c: Change rank field to dtype field in array descriptor.
6814 * trans-array.c: Implement filling of dtype array descriptor field.
6815 * trans-intrinsic.c: Fix broken LEN intrinsic.
6817 2002-09-07 Paul Brook <paul@nowt.org>
6819 * trans-intrinsic.c: Remove outdated todo intrinsic list.
6820 (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
6821 (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
6823 2002-09-06 Paul Brook <paul@nowt.org>
6825 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
6826 (gt-f95-trans-types.h): Add dependancy information.
6827 * config-lang.in (gtfiles): Add trans-types.c
6828 * f95-lang.c (g95_be_parse_file): Pass error and warning counts
6829 back to top-level code.
6830 * trans-array.c, trans-types.c: Change format of array descriptor.
6831 (g95_conv_descriptor_dimension): New function.
6832 * trans-types.h (g95_conv_descriptor_rank): define.
6833 * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
6836 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
6838 * trans-array.c, trans-types.c: Add rank information to descriptor.
6840 2002-09-06 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
6842 * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
6844 2002-09-04 Paul Brook <paul@nowt.org>
6846 * f95-lang.c (g95_create_decls): New function.
6847 (g95_init): Move initialization of external decls to above, and call
6848 from g95_be_parse_file.
6849 * trans.c (g95_finish_stmt): Don't amputate the decl chain.
6850 * trans-types.c (g95_init_types): Always name integer and char types.
6851 (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
6853 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
6855 * Make-lang.in: Add options.c to F95_PARSER_OBJS
6857 2002-09-02 Paul Brook <paul@nowt.org>
6859 * g95_generate_code: Clear the attr for __fortran_main.
6860 * trans-types.c (g95_finish_type): New function.
6861 * g95_init_io_state_type: Use g95_finish_type.
6862 * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
6864 2002-09-01 Paul Brook <paul@nowt.org>
6866 * README.backend: Warn about the dangers of extra config.h files.
6867 Remove obsolete libgfor stuff.
6868 * config-lang.in: Add target-libgfor dependancy.
6869 * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
6871 2002-09-01 Toon Moene <toon@moene.indiv.nluug.nl>
6873 * g95_conv_mpz_to_tree: Free storage pointed to by q,
6876 2002-08-30 Paul Brook <paul@nowt.org>
6878 * trans-intrinsic.c (g95_conv_intrinsic_function,
6879 g95_walk_intrinsic_function): Added ANY and ALL.
6880 (g95_conv_intrinsic_anyall): New function.
6881 * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in