1 2008-12-12 Daniel Franke <franke.daniel@gmail.com>
4 * check.c (gfc_check_matmul): Fixed error message for invalid
5 types to correctly identify the offending argument, added check
8 2008-12-11 Richard Guenther <rguenther@suse.de>
10 * Make-lang.in (install-finclude-dir): Use correct mode argument
13 2008-12-09 Daniel Franke <franke.daniel@gmail.com>
17 * lang-specs.h: Pass on -i* options to f951 to (probably) report
18 them as unknown. Duplicate gcc.c (cpp_options), but omit
19 -fpch-preprocess on -save-temps.
21 2008-12-09 Daniel Franke <franke.daniel@gmail.com>
24 * lang.opt: Added option idirafter.
25 * cpp.h (gfc_cpp_add_include_path_after): New prototype.
26 * cpp.c (gfc_cpp_handle_option): Recognize and handle OPT_dirafter.
27 (gfc_cpp_add_include_path_after): New, adds user-defined search path
28 after any other paths.
29 * invoke.texi (idirafter): New.
30 (no-range-check): Fixed entry in option-index.
32 2008-12-09 Mikael Morin <mikael.morin@tele2.fr>
35 * expr.c (find_array_element): Simplify array bounds.
36 Assert that both bounds are constant expressions.
38 2008-12-09 Mikael Morin <mikael.morin@tele2.fr>
41 * trans-expr.c (gfc_trans_subcomponent_assign):
42 Add se's pre and post blocks to current block.
43 (gfc_trans_structure_assign): Remove specific handling
44 of C_NULL_PTR and C_NULL_FUNPTR.
46 2008-12-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
49 * io.c (check_io_constraints): Check constraints on REC=, POS=, and
50 internal unit with POS=. Fix punctuation on a few error messages.
52 2008-12-06 Janus Weil <janus@gcc.gnu.org>
55 * expr.c (gfc_check_pointer_assign): Added a check for abstract
56 interfaces in procedure pointer assignments, removed check involving
57 gfc_compare_interfaces until PR38290 is fixed completely.
59 2008-12-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
62 * io.c (match_dt_element): Use dt->pos in matcher.
63 (gfc_free_dt): Free dt->pos after use.
64 (gfc_resolve_dt): Use dt->pos in resolution of stream position tag.
66 2008-12-05 Sebastian Pop <sebastian.pop@amd.com>
69 * Make-lang.in (f951): Add BACKENDLIBS, remove GMPLIBS.
71 2008-12-02 Jakub Jelinek <jakub@redhat.com>
72 Diego Novillo <dnovillo@google.com>
74 * Make-lang.in (install-finclude-dir): Use mkinstalldirs
75 and don't remove the finclude directory beforehand.
77 2008-12-02 Janus Weil <janus@gcc.gnu.org>
81 * decl.c (match_result): Result may be a standard variable or a
83 * expr.c (gfc_check_pointer_assign): Additional checks for procedure
85 * primary.c (gfc_match_rvalue): Bugfix for procedure pointer
87 * resolve.c (resolve_function): Check for attr.subroutine.
88 * symbol.c (check_conflict): Addtional checks for RESULT statements.
89 * trans-types.c (gfc_sym_type,gfc_get_function_type): Support procedure
90 pointers as function result.
92 2008-12-01 Mikael Morin <mikael.morin@tele2.fr>
95 * parse.c (parse_spec): Skip statement order check in case
96 of a CONTAINS statement.
98 2008-11-30 Daniel Kraft <d@domob.eu>
101 * gfortran.h (struct gfc_entry_list): Fixed typo in comment.
102 * resolve.c (is_illegal_recursion): New method.
103 (resolve_procedure_expression): Use new is_illegal_recursion instead of
104 direct check and handle function symbols correctly.
105 (resolve_actual_arglist): Removed useless recursion check.
106 (resolve_function): Use is_illegal_recursion instead of direct check.
107 (resolve_call): Ditto.
109 2008-11-29 Eric Botcazou <ebotcazou@adacore.com>
111 * trans-array.c (gfc_conv_array_parameter): Guard union access.
113 2008-11-29 Janus Weil <janus@gcc.gnu.org>
114 Mikael Morin <mikael@gcc.gnu.org>
118 * decl.c (match_procedure_decl): Handle whitespaces.
119 * resolve.c (resolve_specific_s0): Bugfix in check for intrinsic
122 2008-11-25 H.J. Lu <hongjiu.lu@intel.com>
124 * module.c (gfc_dump_module): Report error on unlink only if
127 2008-11-25 Mikael Morin <mikael.morin@tele2.fr>
130 * expr.c (replace_symbol): Don't replace the symtree
131 if the expresion is an intrinsic function. Don't create
132 non-existent symtrees. Use symbol's name instead of symtree's,
133 different in case of module procedure dummy arguments.
135 2008-11-25 Jan Kratochvil <jan.kratochvil@redhat.com>
138 * module.c (gfc_dump_module): Check rename/unlink syscalls errors.
140 2008-11-25 Eric Botcazou <ebotcazou@adacore.com>
143 * parse.c (match_deferred_characteristics): Make sure 'name' is
144 initialized before reading it.
146 2008-11-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
149 * arith.c (gfc_check_real_range): Add mpfr_check_range.
150 * simplify.c (gfc_simplify_nearest): Add mpfr_check_range.
152 2008-11-24 Mikael Morin <mikael.morin@tele2.fr>
155 * simplify.c (is_constant_array_expr): Return true instead of false
156 if the array constructor is empty.
158 2008-11-24 Daniel Kraft <d@domob.eu>
161 * resolve.c (resolve_procedure_expression): New method.
162 (resolve_variable): Call it.
163 (resolve_actual_arglist): Call gfc_resolve_expr for procedure arguments.
165 2008-11-24 Paul Thomas <pault@gcc.gnu.org>
168 * trans-expr.c (gfc_conv_function_call): Remove all code to
169 deallocate intent out derived types with allocatable
171 (gfc_trans_assignment_1): An assignment from a scalar to an
172 array of derived types with allocatable components, requires
173 a deep copy to each array element and deallocation of the
174 converted rhs expression afterwards.
175 * trans-array.c : Minor whitespace.
176 * trans-decl.c (init_intent_out_dt): Add code to deallocate
177 allocatable components of derived types with intent out.
178 (generate_local_decl): If these types are unused, set them
179 referenced anyway but allow the uninitialized warning.
182 * trans-expr.c (gfc_trans_subcomponent_assign): If a conversion
183 expression has a null data pointer argument, nullify the
184 allocatable component.
187 * trans-expr.c (gfc_trans_subcomponent_assign): Only nullify
188 the data pointer if the source is not a variable.
190 2008-11-23 Paul Thomas <pault@gcc.gnu.org>
193 * trans-array.c (structure_alloc_comps): Do not duplicate the
194 descriptor if this is a descriptorless array!
196 2008-11-12 Tobias Burnus <burnus@net-b.de>
199 * trans-types.c (gfc_validate_c_kind): Remove function.
200 * decl.c (gfc_match_kind_spec): Add C kind parameter check.
201 (verify_bind_c_derived_type): Remove gfc_validate_c_kind call.
202 (verify_c_interop_param): Update call.
203 * gfortran.h (verify_bind_c_derived_type): Update prototype.
204 (gfc_validate_c_kind): Remove.
205 * symbol.c (verify_bind_c_derived_type): Update verify_c_interop call.
206 * resolve.c (gfc_iso_c_func_interface): Ditto.
208 2008-11-22 Jakub Jelinek <jakub@redhat.com>
211 * trans-io.c (gfc_build_io_library_fndecls): Decrease pad size back
212 to 16 pointers plus 32 integers. Don't use max integer kind
213 alignment, only gfc_intio_kind's alignment.
214 (gfc_trans_inquire): Only set flags2 if mask2 is non-zero.
215 * ioparm.def: Fix order, bitmasks and types of inquire round, sign
216 and pending fields. Move u in dt before id.
217 * io.c (gfc_free_inquire): Free decimal and size exprs.
218 (match_inquire_element): Match size instead of matching blank twice.
219 (gfc_resolve_inquire): Resolve size.
221 2008-11-20 Jakub Jelinek <jakub@redhat.com>
224 * trans-array.c (trans_array_constructor_value,
225 gfc_build_constant_array_constructor): Fill in TREE_PURPOSE.
227 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use
229 (gfc_conv_intrinsic_size): Use gfc_index_{zero,one}_node.
232 * trans-intrinsic.c (gfc_conv_intrinsic_size): Inline 2 argument
233 size if the second argument is not optional and one argument size
236 2008-11-19 Paul Thomas <pault@gcc.gnu.org>
239 * module.c (load_equiv): Regression fix; check that equivalence
240 members come from the same module only.
242 2008-11-16 Mikael Morin <mikael.morin@tele2.fr>
245 * dependency.c (gfc_check_argument_var_dependency): Add
246 elemental check flag. Issue a warning if we find a dependency
247 but don't generate a temporary. Add the case of an elemental
248 function call as actual argument to an elemental procedure.
249 Add the case of an operator expression as actual argument
250 to an elemental procedure.
251 (gfc_check_argument_dependency): Add elemental check flag.
252 Update calls to gfc_check_argument_var_dependency.
253 (gfc_check_fncall_dependency): Add elemental check flag.
254 Update call to gfc_check_argument_dependency.
255 * trans-stmt.c (gfc_trans_call): Make call to
256 gfc_conv_elemental_dependency unconditional, but with a flag
257 whether we should check dependencies between variables.
258 (gfc_conv_elemental_dependency): Add elemental check flag.
259 Update call to gfc_check_fncall_dependency.
260 * trans-expr.c (gfc_trans_arrayfunc_assign): Update call to
261 gfc_check_fncall_dependency.
262 * resolve.c (find_noncopying_intrinsics): Update call to
263 gfc_check_fncall_dependency.
264 * dependency.h (enum gfc_dep_check): New enum.
265 (gfc_check_fncall_dependency): Update prototype.
267 2008-11-16 Mikael Morin <mikael.morin@tele2.fr>
270 * gfortran.h (gfc_namespace): Added member old_cl_list,
272 (gfc_free_charlen): Added prototype.
273 * symbol.c (gfc_free_charlen): New function.
274 (gfc_free_namespace): Use gfc_free_charlen.
275 * parse.c (next_statement): Backup gfc_current_ns->cl_list.
276 (reject_statement): Restore gfc_current_ns->cl_list.
277 Free cl_list's elements before dropping them.
279 2008-11-16 Tobias Burnus <burnus@net-b.de>
282 * trans-expr.c (gfc_map_intrinsic_function): Fix pointer access.
284 2008-11-16 Paul Thomas <pault@gcc.gnu.org>
287 * trans-array.c (gfc_trans_create_temp_array): Set the
288 loop->from to zero and the renormalisation of loop->to for all
291 2008-11-16 Paul Thomas <pault@gcc.gnu.org>
294 * trans-expr.c (gfc_free_interface_mapping): Null sym->formal
295 (gfc_add_interface_mapping): Copy the pointer to the formal
296 arglist, rather than using copy_formal_args - fixes regression.
298 2008-11-15 Paul Thomas <pault@gcc.gnu.org>
301 * trans-expr.c (gfc_add_interface_mapping): Transfer the formal
302 arglist and the always_explicit attribute if the dummy arg is a
305 2008-11-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
308 * io.c (enum format_token): For readability replace FMT_POS with FMT_T,
309 FMT_TL, and FMT_TR. (format_lex): Use new enumerators. (check_format):
310 Add check for missing positive integer.
312 2008-10-14 Paul Thomas <pault@gcc.gnu.org>
315 * trans-array.c (gfc_trans_create_temp_array): Stabilize the
317 (gfc_conv_loop_setup): Use the end expression for the loop 'to'
320 2008-11-12 Jakub Jelinek <jakub@redhat.com>
324 * trans-const.c (gfc_conv_constant_to_tree): Warn when
325 converting an integer outside of LOGICAL's range to
327 * trans-intrinsic.c (gfc_conv_intrinsic_function,
328 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer):
329 Use INTEGER_TYPE instead of BOOLEAN_TYPE for TRANSFER as
330 argument of another TRANSFER.
332 2008-11-12 Tobias Burnus <burnus@net-b.de>
335 * resolve.c (resolve_fntype): Fix private derived type checking.
337 2008-11-09 Paul Thomas <pault@gcc.gnu.org>
340 * intrinsic.c (add_functions): Reference gfc_simplify._minval
341 and gfc_simplify_maxval.
342 * intrinsic.h : Add prototypes for gfc_simplify._minval and
344 * simplify.c (min_max_choose): New function extracted from
346 (simplify_min_max): Call it.
347 (simplify_minval_maxval, gfc_simplify_minval,
348 gfc_simplify_maxval): New functions.
350 2008-11-04 Paul Thomas <pault@gcc.gnu.org>
353 * parse.c (gfc_fixup_sibling_symbols ): Fixup contained, even
354 when symbol not found.
356 2008-11-03 Tobias Burnus <burnus@net-b.de>
359 * cpp.c (gfc_cpp_add_include_path): Use BRACKET.
360 * scanner.c (add_path_to_list): Argument to add at head.
361 (gfc_add_include_path): Add new argument.
362 (gfc_add_intrinsic_modules_path) Update call.
363 (load_file): Print filename/line in the error message.
364 * gfortran.h (gfc_add_include_path): Update prototype.
365 * options.c (gfc_post_options,gfc_handle_module_path_options,
366 gfc_handle_option): Update call.
367 * lang-spec.h (F951_OPTIONS): Don't insert include path twice.
369 * arith.c (arith_error): Add -fno-range-error to the message.
371 2008-11-03 Paul Thomas <pault@gcc.gnu.org>
374 * resolve.c (resolve_actual_arglist ): Correct comparison of
375 FL_VARIABLE with e->expr_type.
376 (resolve_call): Check that host association is correct.
377 (resolve_actual_arglist ): Remove return is old_sym is use
378 associated. Only reparse expression if old and new symbols
379 have different types.
382 * resolve.c (gfc_resolve_assign_in_forall): Change error to a
385 2008-11-01 Janus Weil <janus@gcc.gnu.org>
388 * expr.c (replace_symbol): Replace all symbols which lie in the
389 formal namespace of the interface and copy their attributes.
390 * resolve.c (resolve_symbol): Add charlen to namespace.
392 2008-11-01 Steven G. Kargl <kargls@comcast.net>
395 * trans-array.c (gfc_trans_array_constructor_value): Fix comment.
396 (gfc_conv_array_initializer): Convert internal_error() to gfc_error_now.
397 * array.c: Remove GFC_MAX_AC_EXPAND macro.
398 (gfc_expand_constructor): Use gfc_option.flag_max_array_constructor.
399 * gfortran.h (gfc_option): Add flag_max_array_constructor member.
400 * lang.opt: Add -fmax-array-constructor option.
401 * expr.c (gfc_match_init_expr): Fix error message to mention new option.
402 * invoke.texi: Document new option.
403 * options.c (gfc_init_options): Set default value for new option.
404 (gfc_handle_option): Deal with commandline.
406 2008-11-01 Daniel Kraft <d@domob.eu>
409 * gfortran.h (struct gfc_code): New field `resolved_isym'.
410 * trans.h (gfc_build_memcpy_call): Made public.
411 * trans-array.h (gfc_trans_create_temp_array): New argument `initial'.
412 * intrinsic.c (gfc_intrinsic_sub_interface): Set resolved_isym.
413 * iresolve.c (create_formal_for_intents): New helper method.
414 (gfc_resolve_mvbits): Put dummy formal arglist on resolved_sym.
415 * resolve.c (resolve_call): Initialize resolved_isym to NULL.
416 * trans-array.c (gfc_trans_allocate_array_storage): New argument
417 `initial' to allow initializing the allocated storage to some initial
418 value copied from another array.
419 (gfc_trans_create_temp_array): Allow initialization of the temporary
420 with a copy of some other array by using the new extension.
421 (gfc_trans_array_constructor): Pass NULL_TREE for initial argument.
422 (gfc_conv_loop_setup): Ditto.
423 * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Ditto.
424 * trans-expr.c (gfc_conv_function_call): Ditto.
425 (gfc_build_memcpy_call): Made public.
426 * trans-stmt.c (gfc_conv_elemental_dependencies): Initialize created
427 temporary for INTENT(INOUT) arguments to the value of the mirrored
428 array and clean up the temporary as very last intructions in the created
430 * trans.c (gfc_trans_code): For EXEC_CALL, see if we have a MVBITS call
431 and enable elemental dependency checking if we have.
433 2008-11-01 Janus Weil <janus@gcc.gnu.org>
437 * gfortran.h: New function gfc_expr_replace_symbols.
438 * decl.c (match_procedure_decl): Increase reference count for interface.
439 * expr.c: New functions replace_symbol and gfc_expr_replace_symbols.
440 * resolve.c (resolve_symbol): Correctly copy array spec and char len
441 of PROCEDURE declarations from their interface.
442 * symbol.c (gfc_get_default_type): Enhanced error message.
443 (copy_formal_args): Call copy_formal_args recursively for arguments.
444 * trans-expr.c (gfc_conv_function_call): Bugfix.
446 2008-11-01 Dennis Wassel <dennis.wassel@gmail.com>
449 * fortran/check.c (gfc_check_random_seed): Check PUT size
452 2008-10-31 Mikael Morin <mikael.morin@tele2.fr>
455 * expr.c (gfc_reduce_init_expr): New function, containing checking code
456 from gfc_match_init_expr, so that checking can be deferred.
457 (gfc_match_init_expr): Use gfc_reduce_init_expr.
458 * io.c (check_io_constraints): Use gfc_reduce_init_expr instead of
459 checking that the expression is a constant.
460 * match.h (gfc_reduce_init_expr): Prototype added.
462 2008-10-31 Mikael Morin <mikael.morin@tele2.fr>
465 * resolve.c (gfc_count_forall_iterators): New function.
466 (gfc_resolve_forall): Use gfc_count_forall_iterators to evaluate
467 the needed memory amount to allocate. Don't forget to free allocated
468 memory. Add an assertion to check for memory leaks.
470 2008-10-30 Steven G. Kargl <kargls@comcast.net>
473 * fortran/arith.c (gfc_mpfr_to_mpz): Test for NaN and Inf values.
474 Remove stale comment and kludge code for MPFR 2.0.1 and older.
475 (gfc_real2int): Error on conversion of NaN or Inf.
476 (gfc_complex2int): Ditto.
477 * fortran/arith.h: Update mpfr_to_mpz prototype.
478 * fortran/simplify.c (gfc_simplify_ceiling, gfc_simplify_floor,
479 gfc_simplify_ifix, gfc_simplify_idint, simplify_nint): Update function
480 calls to include locus.
482 2008-10-30 Mikael Morin <mikael.morin@tele2.fr>
485 * trans-array.c (gfc_trans_create_temp_array): If n is less
486 than the temporary dimension, assert that loop->from is
487 zero (reverts to earlier versions). If there is at least one
488 null loop->to[n], it is a callee allocated array so set the
489 size to NULL and break.
490 (gfc_trans_constant_array_constructor): Set the offset to zero.
491 (gfc_trans_array_constructor): Remove loop shifting around the
493 (gfc_conv_loop_setup): Prefer zero-based descriptors if
494 possible. Calculate the translation from loop variables to
495 array indices if an array constructor.
497 2008-10-30 Mikael Morin <mikael.morin@tele2.fr>
500 * trans-array.c (gfc_trans_create_temp_array): If size is NULL
501 use the array bounds for loop->to.
503 2008-10-28 Tobias Burnus <burnus@net-b.de>
505 * intrinsic.texi: Update OpenMP section for OMPv3.
507 2008-10-24 Jakub Jelinek <jakub@redhat.com>
509 * Make-lang.in (check-f95-subtargets, check-fortran-subtargets): New
510 aliases for check-gfortran-subtargets.
511 (lang_checks_parallelized): Add check-gfortran.
512 (check_gfortran_parallelize): New variable.
514 2008-10-19 Paul Thomas <pault@gcc.gnu.org>
517 * dependency.c (gfc_dep_resolver ): If we find equal array
518 element references, go on to the next reference.
520 2008-10-16 Daniel Kraft <d@domob.eu>
522 * resolve.c (resolve_elemental_actual): Handle calls to intrinsic
523 subroutines correctly.
525 2008-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
527 * simplify.c: Remove MPFR_VERSION_NUM(2,3,0) conditionals.
529 2008-10-12 Daniel Kraft <d@domob.eu>
532 * expr.c (gfc_expr_check_typed): Extend permission of untyped
533 expressions to both top-level variable and basic arithmetic expressions.
535 2008-10-12 Paul Thomas <pault@gcc.gnu.org>
538 * dependency.c (gfc_are_equivalenced_arrays): Look in symbol
539 namespace rather than current namespace, if it is available.
541 2008-10-12 Steven G. Kargl <kargls@comcast.net>
544 * fortran/resolve.c (resolve_fl_variable): Simplify the
545 initializer if there is one.
547 2008-10-11 Paul Thomas <pault@gcc.gnu.org>
550 * module.c (check_for_ambiguous): Remove redundant code.
552 2008-10-09 Daniel Kraft <d@domob.eu>
555 * gfortran.h (gfc_suppress_error): Removed from header.
556 (gfc_push_suppress_errors), (gfc_pop_suppress_errors): New methods.
557 * array.c (gfc_array_size): Use new gfc_push/pop_suppress_errors
558 instead of directly changing gfc_suppress_error.
559 * intrinsic.c (gfc_intrinsic_func_interface): Ditto.
560 (gfc_intrinsic_sub_interface): Ditto.
561 * error.c (suppress_errors): Made static from `gfc_suppress_error'.
562 (gfc_push_suppress_errors), (gfc_pop_suppress_errors): New methods.
563 (gfc_notify_std), (gfc_error): Use new static name of global.
564 * expr.c (check_arglist), (check_references): New methods.
565 (check_restricted): Check arglists and references of EXPR_FUNCTIONs
566 and EXPR_VARAIBALEs, respectively. Allow PARAMETER symbols.
568 2008-10-07 Jakub Jelinek <jakub@redhat.com>
570 * f95-lang.c (poplevel): Don't clear BLOCK_VARS if functionbody.
571 * trans-decl.c (gfc_build_qualified_array): Build accurate debug type
573 (build_entry_thunks, gfc_generate_function_code,
574 gfc_generate_constructors): Ensure DECL_SAVED_TREE is a BIND_EXPR
575 with DECL_INITIAL as its BLOCK.
577 2008-10-05 Paul Thomas <pault@gcc.gnu.org>
580 * gfortran.h : Add 'error' bit field to gfc_expr structure.
581 * expr.c (check_inquiry): When checking a restricted expression
582 check that arguments are either variables or restricted.
583 (check_restricted): Do not emit error if the expression has
584 'error' set. Clean up detection of host-associated variable.
586 2008-10-05 Daniel Kraft <d@domob.eu>
589 * gfortran.h (struct gfc_typebound_proc): New flag `error'.
590 * resolve.c (update_arglist_pass): Added assertion.
591 (update_compcall_arglist): Fail early for erraneous procedures to avoid
593 (resolve_typebound_generic_call): Ignore erraneous specific targets
594 and added assertions.
595 (resolve_typebound_procedure): Set new `error' flag.
597 2008-10-04 Paul Thomas <pault@gcc.gnu.org>
600 * module.c (load_equiv): Check the module before negating the
603 2008-10-02 Steven Bosscher <steven@gcc.gnu.org>
606 * intrinsic.c (add_functions): Add LEADZ and TRAILZ as generics.
607 * intrinsic.h (gfc_simplify_leadz, gfc_simplify_trailz): New protos.
608 * gfortran.h <enum gfc_isym_id>: (GFC_ISYM_LEADZ, GFC_ISYM_TRAILZ): New.
609 * f95-lang (gfc_init_builtin_functions): Add BUILT_IN_CLZ,
610 BUILT_IN_CLZL, BUILT_IN_CLZLL, BUILT_IN_CTZ, BUILT_IN_CTZL, and
612 * trans-intrinsic.c (gfc_conv_intrinsic_leadz,
613 gfc_conv_intrinsic_trails): New code-generation functions for LEADZ
614 and TRAILZ intrinsics.
615 (gfc_conv_intrinsic_function): Use them
616 * intrinsic.texi: Add documentation for LEADZ and TRAILZ.
617 * simplify.c (gfc_simplify_leadz, gfc_simplify_trailz): New functions.
619 2008-09-30 Janus Weil <janus@gcc.gnu.org>
622 * symbol.c (check_conflict): If a symbol in a COMMON block is a
623 procedure, it must be a procedure pointer.
624 (gfc_add_in_common): Symbols in COMMON blocks may be variables or
626 * trans-types.c (gfc_sym_type): Make procedure pointers in COMMON
629 2008-09-25 Jerry DeLisle <jvdelisle@gcc.gnu.org
632 * trans-io.c (build_dt): Revert previous patch..
633 * ioparm.def: Delete IOPARM_dt_f2003.
635 2008-09-25 Tobias Burnus <burnus@net-b.de>
638 * expr.c (gfc_check_pointer_assign): Allow assignment of
640 * match.c (gfc_match_assignment,gfc_match_pointer_assignment):
641 Remove unreachable code.
643 2008-09-24 Tobias Burnus <burnus@net-b.de>
645 * options.c (set_default_std_flags,gfc_init_options):
646 Add comment: keep in sync with libgfortran.
648 2008-09-24 Tobias Burnus <burnus@net-b.de>
651 * trans-array.c (gfc_trans_deferred_array): Don't auto-deallocate
654 2008-09-23 Daniel Kraft <d@domob.eu>
657 * gfortran.h (gfc_compare_actual_formal): Removed, made private.
658 (gfc_arglist_matches_symbol): New method.
659 * interface.c (compare_actual_formal): Made static.
660 (gfc_procedure_use): Use new name of compare_actual_formal.
661 (gfc_arglist_matches_symbol): New method.
662 (gfc_search_interface): Moved code partially to new
663 gfc_arglist_matches_symbol.
664 * resolve.c (resolve_typebound_generic_call): Resolve actual arglist
665 before checking against formal and use new gfc_arglist_matches_symbol
667 (resolve_compcall): Set type-spec of generated expression.
669 2008-09-23 Tobias Burnus <burnus@net-b.de>
672 * expr.c (gfc_check_pointer_assign): Add checks for pointer
675 2008-09-22 Jerry DeLisle <jvdelisle@gcc.gnu.org
678 * trans-io.c (gfc_build_io_library_fndecls): Bump pad size.
679 (build_dt): Set mask bit for IOPARM_dt_f2003.
680 * ioparm.def: Add IOPARM_dt_f2003.
682 2008-09-22 Janus Weil <janus@gcc.gnu.org>
685 * gfortran.h (gfc_option_t): New members flag_align_commons and
687 * lang.opt: New options falign-commons and Walign-commons.
688 * invoke.texi: Documentation for new options.
689 * options.c (gfc_init_options): Initialize new options.
690 (gfc_handle_options): Handle new options.
691 * trans-common.c (translate_common): Implement new options.
692 (gfc_trans_common): Set correct locus.
694 2008-09-21 Paul Thomas <pault@gcc.gnu.org>
697 * decl.c (scalarize_intrinsic_call): Both subroutines and
698 functions can give a true for get_proc_mame's last argument so
699 remove the &&gfc_current_ns->proc_name->attr.function.
700 resolve.c (resolve_actual_arglist): Add check for recursion by
701 reference to procedure as actual argument.
703 2008-09-21 Daniel Kraft <d@domob.eu>
706 * trans.h (gfc_conv_string_length): New argument `expr'.
707 * trans-expr.c (flatten_array_ctors_without_strlen): New method.
708 (gfc_conv_string_length): New argument `expr' that is used in a new
709 special case handling if cl->length is NULL.
710 (gfc_conv_subref_array_arg): Pass expr to gfc_conv_string_length.
711 * trans-array.c (gfc_conv_expr_descriptor): Ditto.
712 (gfc_trans_auto_array_allocation): Pass NULL as new expr.
713 (gfc_trans_g77_array), (gfc_trans_dummy_array_bias): Ditto.
714 (gfc_trans_deferred_array): Ditto.
715 (gfc_trans_array_constructor): Save and restore old values of globals
716 used for bounds checking.
717 * trans-decl.c (gfc_trans_dummy_character): Ditto.
718 (gfc_trans_auto_character_variable): Ditto.
720 2008-09-21 Daniel Kraft <d@domob.eu>
722 * decl.c (match_procedure_in_type): Changed misleading error message
723 for not yet implemented PROCEDURE(interface) syntax.
725 2008-09-18 Paul Thomas <pault@gcc.gnu.org>
728 * resolve.c (resolve_fl_variable_derived): Remove derived type
729 comparison for use associated derived types. Host association
730 of a derived type will not arise if there is a local derived type
731 whose use name is the same.
734 * match.c (gfc_match_call): Use the existing symbol even if
737 2008-09-18 Daniel Kraft <d@domob.eu>
740 * trans.h (gfc_trans_runtime_error): New method.
741 (gfc_trans_runtime_error_vararg): New method.
742 (gfc_allocate_array_with_status): New argument `expr' for locus/varname.
743 (gfc_deallocate_array_with_status): Ditto.
744 * trans-array.h (gfc_array_deallocate): Ditto.
745 * trans.c (gfc_trans_runtime_error): New method.
746 (gfc_trans_runtime_error_vararg): New method, moved parts of the code
747 from gfc_trans_runtime_check here.
748 (gfc_trans_runtime_error_check): Moved code partly to new method.
749 (gfc_call_malloc): Fix tab-indentation.
750 (gfc_allocate_array_with_status): New argument `expr' and call
751 gfc_trans_runtime_error for error reporting to include locus.
752 (gfc_deallocate_with_status): Ditto.
753 * trans-stmt.c (gfc_trans_deallocate): Pass expr as new argument.
754 * trans-array.c (gfc_array_allocate): Ditto.
755 (gfc_array_deallocate): New argument `expr', passed on.
756 (gfc_trans_dealloc_allocated): Pass NULL for expr.
757 * trans-openmp.c (gfc_omp_clause_default): Ditto.
759 2008-09-18 Paul Thomas <pault@gcc.gnu.org>
763 * module.c (check_for_ambiguous): New function to test loaded
764 symbol for ambiguity with fixup symbol.
765 (read_module): Call check_for_ambiguous.
766 (write_symtree): Do not write the symtree for symbols coming
767 from an interface body.
770 * resolve.c (count_specific_procs ): New function to count the
771 number of specific procedures with the same name as the generic
772 and emit appropriate errors for and actual argument reference.
773 (resolve_assumed_size_actual): Add new argument no_formal_args.
774 Correct logic around passing generic procedures as arguments.
775 Call count_specific_procs from two locations.
776 (resolve_function): Evaluate and pass no_formal_args.
777 (resolve call): The same and clean up a bit by using csym more
781 * symbol.c (gfc_add_access): Access can be updated if use
782 associated and not private.
784 2008-09-17 Jakub Jelinek <jakub@redhat.com>
787 * trans-stmt.c (gfc_trans_do): Optimize integer type non-simple
788 do loop initialization.
790 2008-09-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
791 Tobias Burnus <burnus@net.b.de>
794 * io.c (match_vtag): Add tag name to error message.
795 (match_out_tag): Cleanup whitespace.
796 (gfc_resolve_dt): Resolve id and async tags.
798 2008-09-13 Daniel Kraft <d@domob.eu>
801 * primary.c (gfc_match_varspec): Added missing type-spec clearing
802 after wrong implicit character typing.
804 2008-09-12 Richard Guenther <rguenther@suse.de>
806 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Use
807 build_fold_addr_expr to properly mark the argument
810 2008-09-11 Daniel Kraft <d@domob.eu>
813 * simplify.c (simplify_cmplx): Added linebreak to long line.
814 * target-memory.c (gfc_convert_boz): Fix indentation.
815 (gfc_interpret_float): Set mpfr precision to right value before
818 2008-09-10 H.J. Lu <hongjiu.lu@intel.com>
820 * expr.c (find_array_element): Reformat comment.
822 2008-09-10 H.J. Lu <hongjiu.lu@intel.com>
824 * expr.c (find_array_element): Reformat.
826 2008-09-10 Tobias Burnus <burnus@net-b.de>
829 * trans-decl.c (get_proc_pointer_decl): Fix -Wunused-variable.
831 2008-09-09 Daniel Kraft <d@domob.eu>
834 * resolve.c (expression_rank): Added assertion to guard against
835 EXPR_COMPCALL expressions.
836 (resolve_compcall): Set expression's rank from the target procedure's.
838 2008-09-09 Daniel Kraft <d@domob.eu>
841 * trans-array.c (gfc_conv_array_parameter): Added assertion that the
842 symbol has an array spec.
844 2008-09-08 Daniel Kraft <d@domob.eu>
847 * trans-expr.c (gfc_add_interface_mapping): Set new_sym->as.
848 (gfc_map_intrinsic_function): Added checks against NULL bounds in
851 2008-09-08 Tobias Burnus <burnus@net.b.de>
854 * symbol.c (gfc_set_default_type): Copy char len.
856 2008-09-06 Steven G. Kargl <kargls@comcast.net>
859 * fortran/resolve.c (resolve_function): Shortcircuit for SIZE and
860 UBOUND if 2nd argument is KIND.
862 2008-09-06 Steven G. Kargl <kargls@comcast.net>
865 * resolve.c (resolve_function): An intrinsic subroutine should not be
866 called as a function.
868 2008-09-05 Daniel Kraft <d@domob.eu>
871 * resolve.c (resolve_types): Restore gfc_current_ns on exit.
872 * symbol.c (gfc_save_all): Removed blank line.
874 2008-09-05 Daniel Kraft <d@domob.eu>
877 * primary.c (gfc_match_rvalue): Removed logic to handle implicit
878 typing to a derived-type if a component reference is found.
879 (gfc_match_varspec): Moved it here.
881 2008-09-04 Richard Guenther <rguenther@suse.de>
883 * trans-array.c (gfc_conv_array_parameter): Use correct types
884 in building COND_EXPRs.
885 * trans-expr.c (gfc_conv_missing_dummy): Likewise.
886 * trans-intrinsics.c (gfc_conv_intrinsic_merge): Likewise.
888 2008-09-04 Daniel Kraft <d@domob.eu>
891 * expr.c (simplify_const_ref): Update expression's character length
892 when pulling out a substring reference.
894 2008-09-04 Ian Lance Taylor <iant@google.com>
896 * symbol.c (generate_isocbinding_symbol): Compare
897 gfc_notification_std with ERROR rather than FAILURE.
898 * resolve.c (check_assumed_size_reference): Compare array type
899 with AR_FULL rather than DIMEN_ELEMENT.
900 (resolve_actual_arglist): Compare with EXPR_VARIABLE rather than
903 2008-09-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
906 * io.c (check_format): Allow specifying precision with g0 format.
908 2008-09-02 Daniel Kraft <d@domob.eu>
910 * gfortran.h (struct gfc_namespace): New member `implicit_loc'.
911 (gfc_add_abstract): New method.
912 * decl.c (gfc_get_type_attr_spec): Match ABSTRACT attribute.
913 (gfc_match_derived_decl): Copy abstract attribute in derived symbol.
914 * dump-parse-tree.c (show_attr): Show ABSTRACT attribute as `ABSTRACT'
915 only to allow for ABSTRACT types.
916 * parse.c (parse_interface): Use new gfc_add_abstract.
917 * primary.c (gfc_match_structure_constructor): Check that no ABSTRACT
919 * resolve.c (resolve_typespec_used): New method.
920 (resolve_fl_derived): Check type in respect to ABSTRACT attribute and
921 check that no component is of an ABSTRACT type.
922 (resolve_symbol): Check that no symbol is of an ABSTRACT type.
923 (resolve_types): Check IMPLICIT declarations for ABSTRACT types.
924 * symbol.c (gfc_merge_new_implicit): Remember loci of IMPLICIT's.
925 (gfc_add_abstract): New method.
927 2008-09-01 Daniel Kraft <d@domob.eu>
930 * module.c (read_module): Initialize use_only flag on used symbols.
932 2008-09-01 Daniel Kraft <d@domob.eu>
934 * gfc-internals.texi (F2003 OOP), (Type-bound Procedures): New chapter
935 and section to document the internals of type-bound procedures.
936 (gfc_expr): Document EXPR_COMPCALL.
937 * gfortran.h (struct gfc_expr): Remove unused `derived' from compcall.
938 * dump-parse-tree.c (show_compcall): New method.
939 (show_expr): Call it for EXPR_COMPCALL.
940 (show_typebound), (show_f2k_derived): New methods.
941 (show_symbol): Call show_f2k_derived.
942 (show_code_node): Handle EXEC_COMPCALL.
943 * primary.c (gfc_match_varspec): Don't initialize removed `derived' in
944 primary->value.compcall.
946 2008-08-31 Richard Guenther <rguenther@suse.de>
948 * trans-expr.c (gfc_trans_string_copy): Use the correct types
949 to compute slen and dlen.
951 2008-08-31 Daniel Kraft <d@domob.eu>
953 * gfortran.h (enum gfc_statement): New entry `ST_GENERIC'.
954 (struct gfc_tbp_generic): New type.
955 (struct gfc_typebound_proc): Removed `target' and added union with
956 `specific' and `generic' members; new members `overridden',
957 `subroutine', `function' and `is_generic'.
958 (struct gfc_expr): New members `derived' and `name' in compcall union
959 member and changed type of `tbp' to gfc_typebound_proc.
960 (gfc_compare_interfaces), (gfc_compare_actual_formal): Made public.
961 * match.h (gfc_typebound_default_access): New global.
962 (gfc_match_generic): New method.
963 * decl.c (gfc_match_generic): New method.
964 (match_binding_attributes): New argument `generic' and handle it.
965 (match_procedure_in_type): Mark matched binding as non-generic.
966 * interface.c (gfc_compare_interfaces): Made public.
967 (gfc_compare_actual_formal): Ditto.
968 (check_interface_1), (compare_parameter): Use new public names.
969 (gfc_procedure_use), (gfc_search_interface): Ditto.
970 * match.c (match_typebound_call): Set base-symbol referenced.
971 * module.c (binding_generic): New global array.
972 (current_f2k_derived): New global.
973 (mio_typebound_proc): Handle IO of GENERIC bindings.
974 (mio_f2k_derived): Record current f2k-namespace in current_f2k_derived.
975 * parse.c (decode_statement): Handle GENERIC statement.
976 (gfc_ascii_statement): Ditto.
977 (typebound_default_access), (set_typebound_default_access): Removed.
978 (gfc_typebound_default_access): New global.
979 (parse_derived_contains): New default-access implementation and handle
980 GENERIC statements encountered.
981 * primary.c (gfc_match_varspec): Adapted to new gfc_typebound_proc
982 structure and removed check for SUBROUTINE/FUNCTION from here.
983 * resolve.c (extract_compcall_passed_object): New method.
984 (update_compcall_arglist): Use it.
985 (resolve_typebound_static): Adapted to new gfc_typebound_proc structure.
986 (resolve_typebound_generic_call): New method.
987 (resolve_typebound_call): Check target is a SUBROUTINE and handle calls
989 (resolve_compcall): Ditto (check for target being FUNCTION).
990 (check_typebound_override): Handle GENERIC bindings.
991 (check_generic_tbp_ambiguity), (resolve_typebound_generic): New methods.
992 (resolve_typebound_procedure): Handle GENERIC bindings and set new
993 attributes subroutine, function and overridden in gfc_typebound_proc.
994 (resolve_fl_derived): Ensure extended type is resolved before the
996 * st.c (gfc_free_statement): Fix bug with free'ing EXEC_COMPCALL's.
997 * symbol.c (gfc_find_typebound_proc): Adapt for GENERIC changes.
999 2008-08-29 Jan Hubicka <jh@suse.cz>
1001 * parse.c (parse_interface): Silence uninitialized var warning.
1003 2008-08-29 Jakub Jelinek <jakub@redhat.com>
1005 * trans.h (struct lang_type): Add span.
1006 (GFC_TYPE_ARRAY_SPAN): Define.
1007 * trans-decl.c (gfc_get_symbol_decl): For subref array pointers,
1008 copy TREE_STATIC from decl to span instead of setting it
1009 unconditionally, set DECL_ARTIFICIAL, fix type of initializer
1010 and set GFC_TYPE_ARRAY_SPAN on decl's type.
1011 * trans-types.c (gfc_get_array_descr_info): If
1012 GFC_TYPE_ARRAY_SPAN is non-NULL, use it as element size.
1014 * trans-decl.c (check_constant_initializer,
1015 gfc_emit_parameter_debug_info): New functions.
1016 (gfc_generate_module_vars, gfc_generate_function_code): Emit
1017 PARAMETERs and unreferenced variables with initializers into
1020 * gfortran.h (gfc_use_list): Add where field.
1021 * module.c (use_locus): New static variable.
1022 (gfc_match_use): Set it.
1023 (gfc_use_module): Copy it to gfc_use_list's where field.
1024 * trans-decl.c (gfc_generate_module_vars): Call gfc_trans_use_stmts.
1025 (gfc_trans_use_stmts): Set backend locus before calling the debug
1026 hook. Allow non-VAR_DECLs to be created even for non-external
1027 module. Don't emit anything so far for renames from different
1031 * trans-decl.c (create_function_arglist): Set DECL_BY_REFERENCE on
1032 PARM_DECLs with pointer or reference type.
1034 * trans-decl.c (gfc_build_qualified_array): Build non-flat
1035 array type for debug info purposes.
1039 * f95-lang.c (gfc_init_ts): New function.
1040 (LANG_HOOKS_INIT_TS): Define.
1041 * gfortran.h (gfc_use_rename): New type, moved from module.c.
1042 (gfc_get_use_rename): New macro, moved from module.c.
1043 (gfc_use_list): New type.
1044 (gfc_get_use_list): New macro.
1045 (gfc_namespace): Add use_stmts field.
1046 (gfc_free_use_stmts): New prototype.
1047 * Make-lang.in (fortran/trans-decl.o): Depend on debug.h.
1048 * module.c (gfc_use_rename, gfc_get_use_rename): Moved to
1050 (gfc_use_module): Chain the USE statement info to
1052 (gfc_free_use_stmts): New function.
1053 * symbol.c (gfc_free_namespace): Call gfc_free_use_stmts.
1054 * trans.h (struct module_htab_entry): New type.
1055 (gfc_find_module, gfc_module_add_decl): New functions.
1056 * trans.c (gfc_generate_module_code): Create NAMESPACE_DECL for
1057 the module, adjust DECL_CONTEXTs of module procedures and
1058 call gfc_module_add_decl for them.
1059 * trans-common.c (build_common_decl): Set DECL_IGNORED_P
1060 on the common variable.
1061 (create_common): Set DECL_IGNORED_P for use associated vars.
1062 * trans-decl.c: Include debug.h.
1063 (gfc_get_symbol_decl): Set DECL_IGNORED_P on use_assoc vars from
1065 (build_function_decl): Allow current_function_decl's context
1066 to be a NAMESPACE_DECL.
1067 (module_htab, cur_module): New variables.
1068 (module_htab_do_hash, module_htab_eq, module_htab_decls_hash,
1069 module_htab_decls_eq, gfc_find_module, gfc_module_add_decl): New
1071 (gfc_create_module_variable): Adjust DECL_CONTEXTs of module
1072 variables and types and call gfc_module_add_decl for them.
1073 (gfc_generate_module_vars): Temporarily set cur_module.
1074 (gfc_trans_use_stmts): New function.
1075 (gfc_generate_function_code): Call it.
1076 (gfc_generate_block_data): Set DECL_IGNORED_P on decl.
1077 * trans-types.c (gfc_get_derived_type): Adjust DECL_CONTEXT
1078 and TYPE_CONTEXT of module derived types.
1080 2008-08-28 Daniel Kraft <d@domob.eu>
1082 * gfortran.h (enum expr_t): New value `EXPR_COMPCALL'.
1083 (gfc_get_typebound_proc): New macro.
1084 (struct gfc_expr): New union-member `compcall' for EXPR_COMPCALL.
1085 (enum gfc_exec_op): New value `EXEC_COMPCALL'.
1086 (gfc_find_typebound_proc): New argument.
1087 (gfc_copy_ref), (gfc_match_varspec): Made public.
1088 * decl.c (match_procedure_in_type): Use gfc_get_typebound_proc.
1089 * expr.c (free_expr0), (gfc_copy_expr): Handle EXPR_COMPCALL.
1090 (gfc_copy_ref): Made public and use new name.
1091 (simplify_const_ref): Use new name of gfc_copy_ref.
1092 (simplify_parameter_variable): Ditto.
1093 (gfc_simplify_expr): gcc_unreachable for EXPR_COMPCALL.
1094 * match.c (match_typebound_call): New method.
1095 (gfc_match_call): Allow for CALL's to typebound procedures.
1096 * module.c (binding_passing), (binding_overriding): New variables.
1097 (expr_types): Add EXPR_COMPCALL.
1098 (mio_expr): gcc_unreachable for EXPR_COMPCALL.
1099 (mio_typebound_proc), (mio_typebound_symtree): New methods.
1100 (mio_f2k_derived): Handle type-bound procedures.
1101 * primary.c (gfc_match_varspec): Made public and parse trailing
1102 references to type-bound procedures; new argument `sub_flag'.
1103 (gfc_match_rvalue): New name and argument of gfc_match_varspec.
1104 (match_variable): Ditto.
1105 * resolve.c (update_arglist_pass): New method.
1106 (update_compcall_arglist), (resolve_typebound_static): New methods.
1107 (resolve_typebound_call), (resolve_compcall): New methods.
1108 (gfc_resolve_expr): Handle EXPR_COMPCALL.
1109 (resolve_code): Handle EXEC_COMPCALL.
1110 (resolve_fl_derived): New argument to gfc_find_typebound_proc.
1111 (resolve_typebound_procedure): Ditto and removed not-implemented error.
1112 * st.c (gfc_free_statement): Handle EXEC_COMPCALL.
1113 * symbol.c (gfc_find_typebound_proc): New argument `noaccess' and
1114 implement access-checking.
1115 * trans-expr.c (gfc_apply_interface_mapping_to_expr): gcc_unreachable
1117 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Add missing break.
1118 * trans-openmp.c (gfc_trans_omp_array_reduction): Add missing
1119 intialization of ref->type.
1121 2008-08-28 Janus Weil <janus@gcc.gnu.org>
1124 * module.c (ab_attribute,attr_bits,mio_symbol_attribute): Take care of
1125 saving attr.procedure and attr.proc_ptr to the module file.
1127 2008-08-25 Daniel Kraft <d@domob.eu>
1129 * gfortran.h (gfc_find_component): Add new arguments.
1130 * parse.c (parse_derived_contains): Check if the derived-type containing
1131 the CONTAINS section is SEQUENCE/BIND(C).
1132 * resolve.c (resolve_typebound_procedure): Check for name collision with
1134 (resolve_fl_derived): Check for name collision with inherited
1135 type-bound procedures.
1136 * symbol.c (gfc_find_component): New arguments `noaccess' and `silent'.
1137 (gfc_add_component): Adapt for new arguments.
1138 * primary.c (match_varspec), (gfc_match_structure_constructor): Ditto.
1140 2008-08-24 Tobias Burnus <burnus@net-b.de>
1143 * decl.c (verify_bind_c_sym): Reject array/string returning
1146 2008-08-24 Tobias Burnus <burnus@net-b.de>
1149 * trans-expr.c (gfc_conv_function_call): Add string_length
1150 for character-returning bind(C) functions.
1152 2008-08-24 Daniel Kraft <d@domob.eu>
1154 * gfortran.h (gfc_typebound_proc): New struct.
1155 (gfc_symtree): New member typebound.
1156 (gfc_find_typebound_proc): Prototype for new method.
1157 (gfc_get_derived_super_type): Prototype for new method.
1158 * parse.h (gfc_compile_state): New state COMP_DERIVED_CONTAINS.
1159 * decl.c (gfc_match_procedure): Handle PROCEDURE inside derived-type
1161 (gfc_match_end): Handle new context COMP_DERIVED_CONTAINS.
1162 (gfc_match_private): Ditto.
1163 (match_binding_attributes), (match_procedure_in_type): New methods.
1164 (gfc_match_final_decl): Rewrote to make use of new
1165 COMP_DERIVED_CONTAINS parser state.
1166 * parse.c (typebound_default_access): New global helper variable.
1167 (set_typebound_default_access): New callback method.
1168 (parse_derived_contains): New method.
1169 (parse_derived): Extracted handling of CONTAINS to new parser state
1170 and parse_derived_contains.
1171 * resolve.c (resolve_bindings_derived), (resolve_bindings_result): New.
1172 (check_typebound_override), (resolve_typebound_procedure): New methods.
1173 (resolve_typebound_procedures): New method.
1174 (resolve_fl_derived): Call new resolving method for typebound procs.
1175 * symbol.c (gfc_new_symtree): Initialize new member typebound to NULL.
1176 (gfc_find_typebound_proc): New method.
1177 (gfc_get_derived_super_type): New method.
1179 2008-08-23 Janus Weil <janus@gcc.gnu.org>
1181 * gfortran.h (gfc_component): Add field "symbol_attribute attr", remove
1182 fields "pointer", "allocatable", "dimension", "access".
1183 Remove functions "gfc_set_component_attr" and "gfc_get_component_attr".
1184 * interface.c (gfc_compare_derived_types): Ditto.
1185 * trans-array.c (gfc_array_allocate,structure_alloc_comps): Ditto.
1186 * trans-expr.c (gfc_conv_component_ref,gfc_trans_subcomponent_assign,
1187 gfc_conv_structure): Ditto.
1188 * symbol.c (gfc_find_component,free_components,gfc_set_component_attr,
1189 gfc_get_component_attr,verify_bind_c_derived_type,
1190 generate_isocbinding_symbol): Ditto.
1191 * decl.c (build_struct): Ditto.
1192 * dump-parse-tree.c (show_components): Ditto.
1193 * trans-stmt.c (gfc_trans_deallocate): Ditto.
1194 * expr.c (gfc_check_assign,gfc_check_pointer_assign,
1195 gfc_default_initializer): Ditto.
1196 * module.c (mio_component): Ditto.
1197 * trans-types.c (copy_dt_decls_ifequal,gfc_get_derived_type): Ditto.
1198 * resolve.c (has_default_initializer,resolve_structure_cons,
1199 gfc_iso_c_func_interface,find_array_spec,resolve_ref,
1200 resolve_deallocate_expr,resolve_allocate_expr,resolve_fl_derived,
1201 resolve_equivalence_derived): Ditto.
1202 * trans-io.c (transfer_expr): Ditto.
1203 * parse.c (parse_derived): Ditto.
1204 * dependency.c (gfc_check_dependency): Ditto.
1205 * primary.c (gfc_variable_attr): Ditto.
1207 2008-08-23 Tobias Burnus <burnus@net-b.de>
1210 * arith.c (gfc_arith_concat): Fix concat of kind=4 strings.
1212 2008-08-23 Tobias Burnus <burnus@net-b.de>
1215 * target-memory.c (gfc_interpret_character): Support
1218 2008-08-22 Daniel Kraft <d@domob.eu>
1221 * symbol.c (gfc_add_type): Warn on -Wsurprising if a function-result
1222 type is re-declared but neither -pedantic nor -std=f* is given and so
1224 * invoke.texi (-Wsurprising): Document this new behaviour.
1226 2008-08-22 Daniel Kraft <d@domob.eu>
1228 * gfortran.h (in_prefix): Removed from this header.
1229 * match.h (gfc_matching_prefix): Moved and renamed from `in_prefix'.
1230 * decl.c (in_prefix): Removed from here.
1231 (gfc_match_prefix): Use new name of `gfc_matching_prefix'.
1232 * symbol.c (gfc_check_symbol_typed): Ditto.
1233 * expr.c (check_typed_ns): New helper variable.
1234 (expr_check_typed_help): New helper method.
1235 (gfc_expr_check_typed): Rewrote to use gfc_traverse_expr to do the
1236 work, fixing a minor problem.
1237 * match.c (gfc_matching_prefix): New variable.
1239 2008-08-22 Daniel Kraft <d@domob.eu>
1243 * gfortran.h (in_prefix): New global.
1244 (gfc_check_symbol_typed), (gfc_check_expr_typed): New methods.
1245 * array.c (match_array_element_spec): Check that bounds-expressions
1246 don't have symbols not-yet-typed in them.
1247 * decl.c (var_element): Check that variable used is already typed.
1248 (char_len_param_value): Check that expression does not contain
1249 not-yet-typed symbols.
1250 (in_prefix): New global.
1251 (gfc_match_prefix): Record using `in_prefix' if we're at the moment
1252 parsing a prefix or not.
1253 * expr.c (gfc_expr_check_typed): New method.
1254 * parse.c (verify_st_order): New argument to disable error output.
1255 (check_function_result_typed): New helper method.
1256 (parse_spec): Check that the function-result declaration, if given in
1257 a prefix, contains no not-yet-typed symbols when the IMPLICIT rules are
1259 * symbol.c (gfc_check_symbol_typed): Check that a symbol already has
1260 a type associated to it, otherwise use the IMPLICIT rules or signal
1263 2008-08-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1265 * f95-lang.c: Update all calls to pedwarn.
1267 2008-08-18 Daniel Franke <franke.daniel@gmail.com>
1270 * gfortran.texi: Document decision on include file handling in
1273 2008-08-16 Tobias Burnus <burnus@net-b.de>
1276 * libgfortran.h: Reduce GFC_MAX_DIMENSIONS to 7.
1278 2008-08-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1281 * io.c (gfc_match_open): Enable UTF-8 in checks.
1282 * simplify.c (gfc_simplify_selected_char_kind): Enable iso_10646.
1284 2008-08-14 Janus Weil <janus@gcc.gnu.org>
1287 * symbol.c (check_conflict): Move conflict checks for (procedure,save)
1288 and (procedure,intent) to resolve_fl_procedure.
1289 * resolve.c (resolve_fl_procedure): Ditto.
1291 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1294 * f95-lang.c (gfc_mark_addressable): Use "pedwarn (0," instead of
1297 2008-08-09 Paul Thomas <pault@gcc.gnu.org>
1300 * symbol.c (gfc_add_extension): New function.
1301 * decl.c (gfc_get_type_attr_spec): Call it.
1302 (gfc_match_derived_decl): Set symbol extension attribute from
1304 * gfortran.h : Add prototype for gfc_add_extension.
1306 2008-08-08 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1309 * options.c (set_Wall): Replace set_Wunused by warn_unused.
1311 2008-08-08 Daniel Kraft <d@domob.eu>
1313 * gfortran.h (gfc_finalizer): Replaced member `procedure' by two
1314 new members `proc_sym' and `proc_tree' to store the symtree after
1316 (gfc_find_sym_in_symtree): Made public.
1317 * decl.c (gfc_match_final_decl): Adapted for new member name.
1318 * interface.c (gfc_find_sym_in_symtree): Made public.
1319 (gfc_extend_expr), (gfc_extend_assign): Changed call accordingly.
1320 * module.c (mio_finalizer), (mio_f2k_derived), (mio_full_f2k_derived):
1321 New methods for module-file IO of f2k_derived.
1322 (mio_symbol): Do IO of f2k_derived namespace.
1323 * resolve.c (gfc_resolve_finalizers): Adapted for new member name and
1324 finding the symtree for the symbol here.
1325 * symbol.c (gfc_free_finalizer): Adapted for new members.
1327 2008-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1329 * gfc-internals.texi: Update to GFDL 1.2. Do not list GPL as
1331 * gfortran.texi: Likewise.
1332 * intrinsic.texi: Do not list GPL as Invariant Section.
1333 * invoke.texi: Likewise. Update copyright years.
1335 2008-07-29 Paul Thomas <pault@gcc.gnu.org>
1337 * trans-expr.c (conv_parent_component_references): New function
1338 to build missing parent references.
1339 (gfc_conv_variable): Call it
1340 * symbol.c (gfc_add_component): Check that component name in a
1341 derived type extension does not appear in parent.
1342 (gfc_find_component): For a derived type extension, check if
1343 the component appears in the parent derived type by calling
1344 self. Separate errors for private components and private types.
1345 * decl.c (match_data_constant): Add extra arg to call to
1346 gfc_match_structure_constructor.
1347 (check_extended_derived_type): New function to check that a
1348 parent derived type exists and that it is OK for exension.
1349 (gfc_get_type_attr_spec): Add extra argument 'name' and return
1350 it if extends is specified.
1351 (gfc_match_derived_decl): Match derived type extension and
1352 build a first component of the parent derived type if OK. Add
1353 the f2k namespace if not present.
1354 * gfortran.h : Add the extension attribute.
1355 * module.c : Handle attribute 'extension'.
1356 * match.h : Modify prototypes for gfc_get_type_attr_spec and
1357 gfc_match_structure_constructor.
1358 * primary.c (build_actual_constructor): New function extracted
1359 from gfc_match_structure_constructor and modified to call self
1360 iteratively to build derived type extensions, when f2k named
1361 components are used.
1362 (gfc_match_structure_constructor): Do not throw error for too
1363 many components if a parent type is being handled. Use
1364 gfc_find_component to generate errors for non-existent or
1365 private components. Iteratively call self for derived type
1366 extensions so that parent constructor is built. If extension
1367 and components left over, throw error.
1368 (gfc_match_rvalue): Add extra arg to call to
1369 gfc_match_structure_constructor.
1371 * trans-array.c (gfc_conv_resolve_dependencies): If lhs and rhs
1372 are the same symbol, aliassing does not matter.
1374 2008-07-29 Jan Hubicka <jh@suse.cz>
1376 * options.c (gfc_post_options): Do not set flag_no_inline.
1378 2008-07-29 Daniel Kraft <d@domob.eu>
1381 * trans-intrinsic.c (conv_generic_with_optional_char_arg): New method
1382 to append a string-length even if the string argument is missing, e.g.
1384 (gfc_conv_intrinsic_function): Call the new method for EOSHIFT, PACK
1387 2008-07-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1389 * gfortran.h (try): Remove macro. Replace try with gfc_try
1391 * array.c: Likewise.
1392 * check.c: Likewise.
1398 * error.c: Likewise.
1400 * interface.c: Likewise.
1401 * intrinsic.c: Likewise.
1402 * intrinsic.h: Likewise.
1404 * match.h: Likewise.
1405 * parse.c: Likewise.
1406 * parse.h: Likewise.
1407 * resolve.c: Likewise.
1408 * scanner.c: Likewise.
1409 * simplify.c: Likewise.
1410 * symbol.c: Likewise.
1411 * trans-openmp.c: Likewise.
1412 * trans-types.c: Likewise.
1414 2008-07-28 Tobias Burnus <burnus@net-b.de>
1416 * Make-lang.in: Remove -Wno-* from fortran-warn.
1418 2008-07-28 Richard Guenther <rguenther@suse.de>
1420 Merge from gimple-tuples-branch.
1422 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
1424 * trans-expr.c: Include gimple.h instead of tree-gimple.h.
1425 * trans-array.c: Same.
1426 * trans-openmp.c: Same.
1427 * trans-stmt.c: Same.
1430 * trans-decl.c: Same.
1431 * trans-intrinsic.c: Same.
1432 * trans.c: Same. Include tree-iterator.h.
1433 * Make-lang.in (trans.o): Depend on tree-iterator.h
1435 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
1437 * trans-array.h (gfc_conv_descriptor_data_set_internal):
1438 Rename to gfc_conv_descriptor_data_set.
1439 (gfc_conv_descriptor_data_set_tuples): Remove.
1440 * trans-array.c (gfc_conv_descriptor_data_get): Rename
1441 from gfc_conv_descriptor_data_set_internal.
1442 Remove last argument to gfc_add_modify.
1443 (gfc_trans_allocate_array_storage): Rename gfc_add_modify_expr to
1445 (gfc_trans_create_temp_array): Same.
1446 (gfc_conv_array_transpose): Same.
1447 (gfc_grow_array): Same.
1448 (gfc_put_offset_into_var): Same.
1449 (gfc_trans_array_ctor_element): Same.
1450 (gfc_trans_array_constructor_subarray): Same.
1451 (gfc_trans_array_constructor_value): Same.
1452 (gfc_trans_scalarized_loop_end): Same.
1453 (gfc_array_init_size): Same.
1454 (gfc_array_allocate): Same.
1455 (gfc_trans_array_bounds): Same.
1456 (gfc_trans_auto_array_allocation): Same.
1457 (gfc_trans_g77_array): Same.
1458 (gfc_trans_dummy_array_bias): Same.
1459 (gfc_conv_expr_descriptor): Same.
1460 (structure_alloc_comps): Same.
1461 * trans-expr.c: Same.
1462 * trans-openmp.c (gfc_omp_clause_default_ctor): Same.
1463 Rename gfc_conv_descriptor_data_set_tuples to
1464 gfc_conv_descriptor_data_set.
1465 (gfc_omp_clause_copy_ctor): Change build_gimple_modify_stmt to
1467 (gfc_omp_clause_assign_op): Same.
1468 (gfc_trans_omp_array_reduction): Rename gfc_add_modify_expr to
1470 (gfc_trans_omp_atomic): Same.
1471 (gfc_trans_omp_do): Same. Change GIMPLE_MODIFY_STMT to MODIFY_EXPR.
1472 Rename gfc_add_modify_stmt to gfc_add_modify.
1473 * trans-stmt.c: Rename gfc_add_modify_expr to
1475 * trans.c: Rename gfc_add_modify_expr to
1477 (gfc_add_modify): Remove last argument.
1478 Rename GIMPLE_MODIFY_STMT to MODIFY_EXPR.
1479 * trans.h: Remove gfc_add_modify_expr, gfc_add_modify_stmt.
1480 Add prototype for gfc_add_modify.
1481 * f95-lang.c (union lang_tree_node): Rename GENERIC_NEXT to TREE_CHAIN.
1482 * trans-decl.c: Rename gfc_add_modify_stmt to gfc_add_modify.
1484 * trans-intrinsic.c: Same.
1486 2008-02-25 Aldy Hernandez <aldyh@redhat.com>
1488 * Make-lang.in (fortran-warn): Add -Wno-format.
1490 2008-02-19 Diego Novillo <dnovillo@google.com>
1492 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
1494 * fortran/Make-lang.in (fortran-warn): Remove.
1496 2007-11-22 Aldy Hernandez <aldyh@redhat.com>
1498 * trans-expr.c (gfc_trans_string_copy): Use "void *" when building a
1501 2007-11-10 Aldy Hernandez <aldyh@redhat.com>
1503 * Make-lang.in (fortran-warn): Set to -Wno-format.
1504 * trans.c (gfc_trans_code): Update comment to say GENERIC.
1505 Call tree_annotate_all_with_locus instead of annotate_all_with_locus.
1507 2008-07-27 Tobias Burnus <burnus@net-b.de>
1512 * trans.c (gfc_trans_runtime_check): Allow run-time warning besides
1514 * trans.h (gfc_trans_runtime_check): Update declaration.
1515 * trans-array.c (gfc_trans_array_ctor_element,gfc_trans_array_bound_check,
1516 gfc_conv_array_ref,gfc_conv_ss_startstride,gfc_trans_dummy_array_bias):
1517 Updated gfc_trans_runtime_check calls.
1518 (gfc_conv_array_parameter): Implement flag_check_array_temporaries,
1519 fix packing/unpacking for nonpresent optional actuals to optional
1521 * trans-array.h (gfc_conv_array_parameter): Update declaration.
1522 * trans-expr.c (gfc_conv_substring,gfc_trans_arrayfunc_assign,
1523 gfc_conv_function_call): Updated gfc_trans_runtime_check calls.
1524 (gfc_conv_function_call): Update gfc_conv_array_parameter calls.
1525 * trans-expr.c (gfc_trans_goto): Updated gfc_trans_runtime_check
1527 * trans-io.c (set_string,gfc_conv_intrinsic_repeat): Ditto.
1528 (gfc_conv_intrinsic_transfer,gfc_conv_intrinsic_loc): Same for
1529 gfc_conv_array_parameter.
1530 * trans-intrinsics.c (gfc_conv_intrinsic_bound): Ditto.
1531 * trans-decl.c (gfc_build_builtin_function_decls): Add
1532 gfor_fndecl_runtime_warning_at.
1533 * lang.opt: New option fcheck-array-temporaries.
1534 * gfortran.h (gfc_options): New flag_check_array_temporaries.
1535 * options.c (gfc_init_options, gfc_handle_option): Handle flag.
1536 * invoke.texi: New option fcheck-array-temporaries.
1538 2008-07-24 Jan Hubicka <jh@suse.cz>
1540 * fortran/options.c (gfc_post_options): Remove flag_unline_trees code.
1542 2008-07-24 Daniel Kraft <d@domob.eu>
1545 * lang.opt (Wnonstd-intrinsics): Removed option.
1546 (Wintrinsics-std), (Wintrinsic-shadow): New options.
1547 * invoke.texi (Option Summary): Removed -Wnonstd-intrinsics
1548 from the list and added -Wintrinsics-std and -Wintrinsic-shadow.
1549 (Error and Warning Options): Documented the new options and removed
1550 the documentation for -Wnonstd-intrinsics.
1551 * gfortran.h (gfc_option_t): New members warn_intrinsic_shadow and
1552 warn_intrinsics_std, removed warn_nonstd_intrinsics.
1553 (gfc_is_intrinsic): Renamed from gfc_intrinsic_name.
1554 (gfc_warn_intrinsic_shadow), (gfc_check_intrinsic_standard): New.
1555 * decl.c (match_procedure_decl): Replaced gfc_intrinsic_name by
1556 the new name gfc_is_intrinsic.
1557 (warn_intrinsic_shadow): New helper method.
1558 (gfc_match_function_decl), (gfc_match_subroutine): Call the new method
1559 warn_intrinsic_shadow to check the just-parsed procedure.
1560 * expr.c (check_init_expr): Call new gfc_is_intrinsic to check whether
1561 the function called is really an intrinsic in the selected standard.
1562 * intrinsic.c (gfc_is_intrinsic): Renamed from gfc_intrinsic_name and
1563 extended to take into account the selected standard settings when trying
1564 to find out whether a symbol is an intrinsic or not.
1565 (gfc_check_intrinsic_standard): Made public and extended.
1566 (gfc_intrinsic_func_interface), (gfc_intrinsic_sub_interface): Removed
1567 the calls to check_intrinsic_standard, this check now happens inside
1569 (gfc_warn_intrinsic_shadow): New method defined.
1570 * options.c (gfc_init_options): Initialize new warning flags to false
1571 and removed intialization of Wnonstd-intrinsics flag.
1572 (gfc_post_options): Removed logic for Wnonstd-intrinsics flag.
1573 (set_Wall): Set new warning flags and removed Wnonstd-intrinsics flag.
1574 (gfc_handle_option): Handle the new flags and removed handling of the
1575 old Wnonstd-intrinsics flag.
1576 * primary.c (gfc_match_rvalue): Replaced call to gfc_intrinsic_name by
1577 the new name gfc_is_intrinsic.
1578 * resolve.c (resolve_actual_arglist): Ditto.
1579 (resolve_generic_f), (resolve_unknown_f): Ditto.
1580 (is_external_proc): Ditto.
1581 (resolve_generic_s), (resolve_unknown_s): Ditto.
1582 (resolve_symbol): Ditto and ensure for symbols declared INTRINSIC that
1583 they are really available in the selected standard setting.
1585 2008-07-24 Daniel Kraft <d@domob.eu>
1587 * match.c (gfc_match): Add assertion to catch wrong calls trying to
1588 match upper-case characters.
1590 2008-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1593 * gfortran.h: Add "warn_array_temp" to gfc_option_t.
1594 * lang.opt: Add -Warray-temporaries.
1595 * invoke.texi: Document -Warray-temporaries
1596 * trans-array.h (gfc_trans_create_temp_array): Add argument of
1598 (gfc_conv_loop_setup): Likewise.
1599 * trans-array.c (gfc_trans_create_temp_array): If
1600 -Warray-temporaries is given and locus is present, warn about
1601 creation of array temporaries.
1602 (gfc_trans_array_constructor_subarray): Add locus to call
1603 of gfc_conv_loop_setup.
1604 (gfc_trans_array_constructor): Add where argument. Pass where
1605 argument to call of gfc_trans_create_temp_array.
1606 (gfc_add_loop_ss_code): Add where argument. Pass where argument
1607 to recursive call of gfc_add_loop_ss_code and to call of
1608 gfc_trans_array_constructor.
1609 (gfc_conv_loop_setup): Add where argument. Pass where argument
1610 to calls to gfc_add_loop_ss_code and to gfc_trans_create_temp_array.
1611 (gfc_conv_expr_descriptor): Pass location to call of
1612 gfc_conv_loop_setup.
1613 (gfc_conv_array_parameter): If -Warray-temporaries is given,
1614 warn about creation of temporary arrays.
1615 * trans-expr.c (gfc_conv_subref_array_arg): Add where argument
1616 to call to gfc_conv_loop_setup.
1617 (gfc_conv_function_call): Add where argument to call to
1618 gfc_trans_creat_temp_array.
1619 (gfc_trans_subarray_assign): Likewise.
1620 (gfc_trans_assignment_1): Add where argument to call to
1621 gfc_conv_loop_setup.
1622 * trans-stmt.c (gfc_conv_elemental_dependencies): Add where
1623 argument to call to gfc_trans_create_temp_array.
1624 (gfc_trans_call): Add where argument to call to gfc_conv_loop_setup.
1625 (generate_loop_for_temp_to_lhs): Likewise.
1626 (generate_loop_for_rhs_to_temp): Likewise.
1627 (compute_inner_temp_size): Likewise.
1628 (gfc_trans-pointer_assign_need_temp): Likewise.
1629 (gfc_evaluate_where_mask): Likewise.
1630 (gfc_trans_where_assign): Likewise.
1631 (gfc_trans_where_3): Likewise.
1632 * trans-io.c (transfer_srray_component): Add where argument
1633 to function. Add where argument to call to gfc_conv_loop_setup.
1634 (transfer_expr): Add where argument to call to
1635 transfer_array_component.
1636 (gfc_trans_transfer): Add where expression to call to
1637 gfc_conv_loop_setup.
1638 * trans-intrinsic.c (gfc_conv_intrinsic_anyall): Add
1639 where argument to call to gfc_conv_loop_setup.
1640 (gfc_conv_intrinsic_count): Likewise.
1641 (gfc_conv_intrinsic_arith): Likewise.
1642 (gfc_conv_intrinsic_dot_product): Likewise.
1643 (gfc_conv_intrinsic_minmaxloc): Likewise.
1644 (gfc_conv_intrinsic_minmaxval): Likewise.
1645 (gfc_conv_intrinsic_array_transfer): Warn about
1646 creation of temporary array.
1647 Add where argument to call to gfc_trans_create_temp_array.
1648 * options.c (gfc_init_options): Initialize gfc_option.warn_array_temp.
1649 (gfc_handle_option): Set gfc_option.warn_array_temp.
1651 2008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1654 * f95-lang.c (gfc_mark_addressable): All calls to pedwarn changed.
1656 2008-07-22 Daniel Kraft <d@domob.eu>
1659 * io.c (error_element), (format_locus): New static globals.
1660 (unexpected_element): Spelled out this message fully.
1661 (next_char): Keep track of locus when not MODE_STRING.
1662 (next_char_not_space): Remember last parsed element in error_element.
1663 (format_lex): Fix two indentation errors.
1664 (check_format): Use format_locus and possibly error_element for a
1665 slightly better error message on invalid format.
1666 (check_format_string): Set format_locus to start of the string
1667 expression used as format.
1669 2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1671 * expr.c (gfc_check_pointer_assign): Fix typo in string.
1672 * io.c (check_format): Fix typo in string. Fix comment typos.
1673 * parse.c (gfc_global_used): Likewise.
1674 * resolve.c (resolve_allocate_expr): Likewise.
1675 * symbol.c (gfc_set_default_type): Likewise.
1676 * arith.c: Fix typos in comments.
1677 * array.c: Likewise.
1680 * dependency.c: Likewise.
1681 * f95-lang.c: Likewise.
1682 * gfortran.h: Likewise.
1683 * matchexp.c: Likewise.
1684 * module.c: Likewise.
1685 * primary.c: Likewise.
1686 * scanner.c: Likewise.
1687 * trans-array.c: Likewise.
1688 * trans-common.c: Likewise.
1689 * trans-decl.c: Likewise.
1690 * trans-expr.c: Likewise.
1691 * trans-intrinsic.c: Likewise.
1692 * trans-types.c: Likewise.
1693 * trans.c: Likewise.
1694 * trans.h: Likewise.
1696 2008-07-19 Tobias Burnus <burnus@net-b.de>
1699 * matchexp.c (gfc_get_parentheses): Remove obsolete workaround,
1700 which caused the generation of wrong code.
1702 2008-07-19 Tobias Burnus <burnus@net-b.de>
1705 * scanner.c (load_file): Add argument to destinguish between
1706 true filename and displayed filename.
1707 (include_line,gfc_new_file): Adapt accordingly.
1709 2008-07-19 Tobias Burnus <burnus@net-b.de>
1711 * check.c (gfc_check_cshift,gfc_check_eoshift,gfc_check_unpack): Add rank
1712 checks for cshift's shift and eoshift's shift and boundary args.
1713 (gfc_check_unpack): Add rank and shape tests for unpack.
1715 2008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1717 * gfortran.h (new): Remove macro.
1718 * array.c (gfc_append_constructor, match_array_list,
1719 gfc_match_array_constructor): Likewise.
1720 * bbt.c (insert, gfc_insert_bbt): Likewise.
1721 * decl.c (var_element, top_var_list, top_val_list, gfc_match_data,
1722 get_proc_name): Likewise.
1723 * expr.c (gfc_copy_actual_arglist): Likewise.
1724 * interface.c (compare_actual_formal, check_new_interface,
1725 gfc_add_interface): Likewise.
1726 * intrinsic.c gfc_convert_type_warn, gfc_convert_chartype):
1728 * io.c (match_io_iterator, match_io_list): Likewise.
1729 * match.c (match_forall_header): Likewise.
1730 * matchexp.c (build_node): Likewise.
1731 * module.c (gfc_match_use): Likewise.
1732 * scanner.c (load_file): Likewise.
1733 * st.c (gfc_append_code): Likewise.
1734 * symbol.c (save_symbol_data, gfc_get_sym_tree, gfc_undo_symbols,
1735 gfc_commit_symbols): Likewise.
1736 * trans-common.c (build_field): Likewise.
1737 * trans-decl.c (gfc_finish_var_decl): Likewise.
1738 * trans-expr.c (gfc_free_interface_mapping,
1739 gfc_get_interface_mapping_charlen, gfc_add_interface_mapping,
1740 gfc_finish_interface_mapping,
1741 gfc_apply_interface_mapping_to_expr): Likewise.
1742 * trans.h (gfc_interface_sym_mapping): Likewise.
1744 2008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1746 * gfortran.h (operator): Remove macro.
1747 (gfc_namespace, gfc_expr): Avoid C++ keywords.
1748 * arith.c (eval_intrinsic, eval_intrinsic_f2, eval_intrinsic_f3):
1750 * decl.c (access_attr_decl): Likewise.
1751 * dependency.c (gfc_dep_compare_expr): Likewise.
1752 * dump-parse-tree.c (show_expr, show_uop, show_namespace):
1754 * expr.c (gfc_copy_expr, gfc_type_convert_binary,
1755 simplify_intrinsic_op, check_intrinsic_op): Likewise.
1756 * interface.c (fold_unary, gfc_match_generic_spec,
1757 gfc_match_interface, gfc_match_end_interface,
1758 check_operator_interface, check_uop_interfaces,
1759 gfc_check_interfaces, gfc_extend_expr, gfc_extend_assign,
1760 gfc_add_interface, gfc_current_interface_head,
1761 gfc_set_current_interface_head): Likewise.
1762 * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
1764 * matchexp.c (gfc_get_parentheses, build_node): Likewise.
1765 * module.c (gfc_use_rename, gfc_match_use, find_use_name_n,
1766 number_use_names, mio_expr, load_operator_interfaces, read_module,
1767 write_operator, write_module): Likewise.
1768 * openmp.c (resolve_omp_atomic): Likewise.
1769 * resolve.c (resolve_operator, gfc_resolve_character_operator,
1770 gfc_resolve_uops): Likewise.
1771 * symbol.c (free_uop_tree, gfc_free_namespace): Likewise.
1772 * trans-expr.c (gfc_conv_expr_op): Likewise.
1773 * trans-openmp.c (gfc_trans_omp_atomic): Likewise.
1775 2008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1777 * gfortran.h (protected): Remove macro.
1778 * dump-parse-tree.c (show_attr): Avoid C++ keywords.
1779 * expr.c (gfc_check_pointer_assign): Likewise.
1780 * interface.c (compare_parameter_protected): Likewise.
1781 * intrinsic.c (enum class, add_sym, add_sym_0, add_sym_1,
1782 add_sym_1s, add_sym_1m, add_sym_2, add_sym_2s, add_sym_3,
1783 add_sym_3ml, add_sym_3red, add_sym_3s, add_sym_4, add_sym_4s,
1784 add_sym_5s): Likewise.
1785 * match.c (gfc_match_assignment, gfc_match_pointer_assignment):
1787 * module.c (mio_symbol_attribute): Likewise.
1788 * primary.c (match_variable): Likewise.
1789 * resolve.c (resolve_equivalence): Likewise.
1790 * symbol.c (check_conflict, gfc_add_protected, gfc_copy_attr):
1792 * trans-types.c (gfc_get_array_type_bounds): Likewise.
1794 2008-07-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1796 * arith.c (eval_type_intrinsic0): Avoid C++ keywords.
1797 * gfortran.h (try, protected, operator, new): Likewise.
1799 2008-07-17 Tobias Burnus <burnus@net-b.de>
1803 * array.c (gfc_match_array_spec): Fix array-rank check.
1804 * resolve.c (resolve_fl_derived): Fix constentness check
1805 for the array dimensions.
1807 2008-07-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1809 * Make-lang.in (gfortranspec.o): Fix dependencies.
1811 2008-07-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1814 * io.c: Add error check for g0 edit descriptor followed by '.'.
1816 2008-07-12 Daniel Kraft <d@domob.eu>
1818 * resolve.c (resolve_fl_derived): Allow pointer components to empty
1819 derived types fixing a missing part of PR fortran/33221.
1821 2008-07-10 Daniel Kraft <d@domob.eu>
1823 * gfc-internals.texi (section gfc_expr): Created documentation about
1824 the gfc_expr internal data structure.
1826 2008-07-07 Thomas Koenig <tkoenig@gcc.gnu.org>
1829 * iresolve.c (gfc_resolve_product): Set shape of return
1831 (gfc_resolve_sum): Likewise.
1833 2008-07-07 Jakub Jelinek <jakub@redhat.com>
1836 * f95-lang.c (poplevel): Don't ever add subblocks to
1837 global_binding_level.
1839 2008-07-02 Janus Weil <janus@gcc.gnu.org>
1840 Tobias Burnus <burnus@net-b.de>
1841 Paul Thomas <pault@gcc.gnu.org>
1844 * gfortran.h (struct gfc_symbol): New member "proc_pointer".
1845 * check.c (gfc_check_associated,gfc_check_null): Implement
1847 * decl.c (match_procedure_decl): Ditto.
1848 * expr.c (gfc_check_pointer_assign,gfc_check_assign_symbol): Ditto.
1849 * interface.c (compare_actual_formal): Ditto.
1851 * match.c (gfc_match_pointer_assignment): Ditto.
1852 * parse.c (parse_interface): Ditto.
1853 * primary.c (gfc_match_rvalue,match_variable): Ditto.
1854 * resolve.c (resolve_fl_procedure): Ditto.
1855 * symbol.c (check_conflict,gfc_add_external,gfc_add_pointer,
1856 gfc_copy_attr,gen_fptr_param,build_formal_args): Ditto.
1857 * trans-decl.c (get_proc_pointer_decl,gfc_get_extern_function_decl,
1858 create_function_arglist): Ditto.
1859 * trans-expr.c (gfc_conv_variable,gfc_conv_function_val,
1860 gfc_conv_function_call,gfc_trans_pointer_assignment): Ditto.
1862 2008-07-02 Thomas Koenig <tkoenig@gcc.gnu.org>
1866 * iresolve.c (resolve_mask_arg): Don't convert mask to
1867 kind=1 logical if it is of that type already.
1869 2008-06-29 Thomas Koenig <tkoenig@gcc.gnu.org>
1872 * iresolve.c (gfc_resolve_matmul): Copy shapes
1875 2008-06-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1877 * invoke.texi: Add documentation for runtime behavior of
1880 2008-06-28 Daniel Kraft <d@domob.eu>
1882 * gfc-internals.texi (section gfc_code): Extended documentation about
1883 gfc_code in the internal datastructures chapter including details about
1884 how IF, DO and SELECT blocks look like and an example for how the
1885 block-chaining works.
1887 2008-06-25 Paul Thomas <pault@gcc.gnu.org>
1890 * interface.c (check_intents): Correct error where the actual
1891 arg was checked for a pointer argument, rather than the formal.
1893 2008-06-24 Paul Thomas <pault@gcc.gnu.org>
1896 * expr.c (gfc_check_assign): Change message and locus for
1897 error when conform == 0.
1899 2008-06-23 Jakub Jelinek <jakub@redhat.com>
1902 * cpp.c (cpp_define_builtins): Change _OPENMP value to 200805.
1904 2008-06-20 Laurynas Biveinis <laurynas.biveinis@gmail.com>
1905 Tobias Burnus <burnus@net-b.de>
1909 * scanner.c (preprocessor_line): do not call gfc_free for
1910 current_file->filename if it differs from filename.
1912 2008-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1914 * arith.c (hollerith2representation): Fix for -Wc++-compat.
1915 * array.c (gfc_get_constructor): Likewise.
1916 * decl.c (gfc_get_data_variable, gfc_get_data_value, gfc_get_data,
1917 create_enum_history, gfc_match_final_decl): Likewise.
1918 * error.c (error_char): Likewise.
1919 * expr.c (gfc_get_expr, gfc_copy_expr): Likewise.
1920 * gfortran.h (gfc_get_charlen, gfc_get_array_spec,
1921 gfc_get_component, gfc_get_formal_arglist, gfc_get_actual_arglist,
1922 gfc_get_namelist, gfc_get_omp_clauses, gfc_get_interface,
1923 gfc_get_common_head, gfc_get_dt_list, gfc_get_array_ref,
1924 gfc_get_ref, gfc_get_equiv, gfc_get_case, gfc_get_iterator,
1925 gfc_get_alloc, gfc_get_wide_string): Likewise.
1926 * interface.c (count_types_test): Likewise.
1927 * intrinsic.c (add_char_conversions, gfc_intrinsic_init_1):
1929 * io.c (gfc_match_open, gfc_match_close, match_filepos, match_io,
1930 gfc_match_inquire, gfc_match_wait): Likewise.
1931 * match.c (gfc_match, match_forall_iterator): Likewise.
1932 * module.c (gfc_get_pointer_info, gfc_get_use_rename, add_fixup,
1933 add_true_name, parse_string, write_atom, quote_string,
1934 mio_symtree_ref, mio_gmp_real, write_common_0): Likewise.
1935 * options.c (gfc_post_options): Likewise.
1936 * primary.c (match_integer_constant, match_hollerith_constant,
1937 match_boz_constant, match_real_constant,
1938 gfc_get_structure_ctor_component, gfc_match_structure_constructor): Likewise.
1939 * scanner.c (gfc_widechar_to_char, add_path_to_list,
1940 add_file_change, load_line, get_file, preprocessor_line,
1941 load_file, unescape_filename, gfc_read_orig_filename): Likewise.
1942 * simplify.c (gfc_simplify_ibits, gfc_simplify_ishft,
1943 gfc_simplify_ishftc): Likewise.
1944 * symbol.c (gfc_get_st_label, gfc_get_namespace, gfc_new_symtree,
1945 gfc_get_uop, gfc_new_symbol, save_symbol_data, gfc_get_gsymbol):
1947 * target-memory.c (gfc_target_interpret_expr): Likewise.
1948 * trans-const.c (gfc_build_wide_string_const): Likewise.
1949 * trans-expr.c (gfc_add_interface_mapping): Likewise.
1950 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
1951 gfc_conv_intrinsic_int, gfc_conv_intrinsic_lib_function,
1952 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_ctime,
1953 gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam,
1954 gfc_conv_intrinsic_minmax, gfc_conv_intrinsic_minmax_char,
1955 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_index_scan_verify,
1956 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_trim): Likewise.
1957 * trans.c (gfc_get_backend_locus): Likewise.
1958 * trans.h (gfc_get_ss): Likewise.
1960 2008-06-18 Daniel Kraft <d@domob.eu>
1962 PR fortran/36517, fortran/36492
1963 * array.c (gfc_resolve_character_array_constructor): Call
1964 gfc_set_constant_character_len with changed length-chec argument.
1965 * decl.c (gfc_set_constant_character_len): Changed array argument to
1966 be a generic length-checking argument that can be used for correct
1967 checking with typespec and in special cases where the should-be length
1968 is different from the target length.
1969 (build_struct): Call gfc_set_constant_character_len with changed length
1970 checking argument and introduced additional checks for exceptional
1971 conditions on invalid code.
1972 (add_init_expr_to_sym), (do_parm): Call gfc_set_constant_character_len
1973 with changed argument.
1974 * match.h (gfc_set_constant_character_len): Changed third argument to
1975 int for the should-be length rather than bool.
1977 2008-06-17 Daniel Kraft <d@domob.eu>
1980 * array.c (gfc_resolve_character_array_constructor): Check that all
1981 elements with constant character length have the same one rather than
1982 fixing it if no typespec is given, emit an error if they don't. Changed
1983 return type to "try" and return FAILURE for the case above.
1984 (gfc_resolve_array_constructor): Removed unneeded call to
1985 gfc_resolve_character_array_constructor in this function.
1986 * gfortran.h (gfc_resolve_character_array_constructor): Returns try.
1987 * trans-array.c (get_array_ctor_strlen): Return length of first element
1988 rather than last element.
1989 * resolve.c (gfc_resolve_expr): Handle FAILURE return from
1990 gfc_resolve_character_array_constructor.
1992 2008-06-17 Paul Thomas <pault@gcc.gnu.org>
1995 * resolve.c (add_dt_to_dt_list): New function.
1996 (resolve_fl_derived): Call new function for pointer components
1997 and when derived type resolved.
1999 2008-06-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2002 * trans-decl.c (gfc_generate_function_code): Add range_check to options
2005 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2007 * gfc-internals.texi: Expand TABs, drop indentation outside examples.
2008 * gfortran.texi: Likewise.
2009 * intrinsic.texi: Likewise.
2010 * invoke.texi: Likewise.
2012 2008-06-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2015 * trans-io.c (gfc_build_io_library_fndecls): Build declaration for
2016 transfer_character_wide which includes passing in the character kind to
2017 support wide character IO. (transfer_expr): If the kind == 4, create the
2018 argument and build the call.
2019 * gfortran.texi: Fix typo.
2021 2008-06-13 Tobias Burnus <burnus@net-b.de>
2024 * decl.c (do_parm): Handle init expression for len=*.
2026 2008-06-12 Tobias Burnus <burnus@net-b.de>
2029 * trans-intrinsic.c (gfc_conv_intrinsic_index_scan_verify):
2030 Fix passing of the BACK= argument.
2032 2008-06-10 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2034 * cpp.c: Add copyright notice.
2035 * cpp.h: Add copyright notice.
2037 2008-06-08 Janus Weil <janus@gcc.gnu.org>
2040 * decl.c (match_procedure_decl): Correctly recognize if the interface
2041 is an intrinsic procedure.
2043 2008-06-08 Tobias Burnus <burnus@net-b.de>
2046 * resolve.c (resolve_symbol): Copy more attributes for
2047 PROCEDUREs with interfaces.
2049 2008-06-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2053 * io.c (check_format): Add new error message for zero width.
2054 Use new error message for FMT_A and with READ, FMT_G. Allow
2055 FMT_G with WRITE except when -std=F95 and -std=F2003.
2057 2008-06-07 Tobias Burnus <burnus@net-b.de>
2060 * intrinsic.c (add_functions): Implement c_sizeof.
2061 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Do not
2062 create unneeded variable in the scalar case.
2063 * intrinsic.texi: Add C_SIZEOF documentation.
2065 2008-06-06 Tobias Burnus <burnus@net-b.de>
2067 * intrinsic.texi (BESSEL_J1): Fix BES(S)EL_J1 typo.
2069 2008-06-06 Jakub Jelinek <jakub@redhat.com>
2071 * scanner.c (skip_free_comments, skip_fixed_comments): Handle tabs.
2072 * parse.c (next_free): Allow tab after !$omp.
2073 (decode_omp_directive): Handle !$omp task, !$omp taskwait
2075 (case_executable): Add ST_OMP_TASKWAIT.
2076 (case_exec_markers): Add ST_OMP_TASK.
2077 (gfc_ascii_statement): Handle ST_OMP_TASK, ST_OMP_END_TASK and
2079 (parse_omp_structured_block, parse_executable): Handle ST_OMP_TASK.
2080 * gfortran.h (gfc_find_sym_in_expr): New prototype.
2081 (gfc_statement): Add ST_OMP_TASK, ST_OMP_END_TASK and ST_OMP_TASKWAIT.
2082 (gfc_omp_clauses): Add OMP_SCHED_AUTO to sched_kind,
2083 OMP_DEFAULT_FIRSTPRIVATE to default_sharing. Add collapse and
2085 (gfc_exec_op): Add EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
2086 * f95-lang.c (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
2087 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP, LANG_HOOKS_OMP_CLAUSE_DTOR,
2088 LANG_HOOKS_OMP_PRIVATE_OUTER_REF): Define.
2089 * trans.h (gfc_omp_clause_default_ctor): Add another argument.
2090 (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
2091 gfc_omp_clause_dtor, gfc_omp_private_outer_ref): New prototypes.
2092 * types.def (BT_ULONGLONG, BT_PTR_ULONGLONG,
2093 BT_FN_BOOL_ULONGLONGPTR_ULONGLONGPTR,
2094 BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULLPTR_ULLPTR,
2095 BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULL_ULLPTR_ULLPTR,
2096 BT_FN_VOID_PTR_PTR, BT_PTR_FN_VOID_PTR_PTR,
2097 BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): New.
2098 (BT_BOOL): Use integer type with BOOL_TYPE_SIZE rather
2099 than boolean_type_node.
2100 * dump-parse-tree.c (gfc_show_omp_node): Handle EXEC_OMP_TASK,
2101 EXEC_OMP_TASKWAIT, OMP_SCHED_AUTO, OMP_DEFAULT_FIRSTPRIVATE,
2102 untied and collapse clauses.
2103 (gfc_show_code_node): Handle EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
2104 * trans.c (gfc_trans_code): Handle EXEC_OMP_TASK and
2106 * st.c (gfc_free_statement): Likewise.
2107 * resolve.c (gfc_resolve_blocks, resolve_code): Likewise.
2108 (find_sym_in_expr): Rename to...
2109 (gfc_find_sym_in_expr): ... this. No longer static.
2110 (resolve_allocate_expr, resolve_ordinary_assign): Adjust caller.
2111 * match.h (gfc_match_omp_task, gfc_match_omp_taskwait): New
2113 * openmp.c (resolve_omp_clauses): Allow allocatable arrays in
2114 firstprivate, lastprivate, reduction, copyprivate and copyin
2116 (omp_current_do_code): Made static.
2117 (omp_current_do_collapse): New variable.
2118 (gfc_resolve_omp_do_blocks): Compute omp_current_do_collapse,
2119 clear omp_current_do_code and omp_current_do_collapse on return.
2120 (gfc_resolve_do_iterator): Handle collapsed do loops.
2121 (resolve_omp_do): Likewise, diagnose errorneous collapsed do loops.
2122 (OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED): Define.
2123 (gfc_match_omp_clauses): Handle default (firstprivate),
2124 schedule (auto), untied and collapse (n) clauses.
2125 (OMP_DO_CLAUSES): Add OMP_CLAUSE_COLLAPSE.
2126 (OMP_TASK_CLAUSES): Define.
2127 (gfc_match_omp_task, gfc_match_omp_taskwait): New functions.
2128 * trans-openmp.c (gfc_omp_private_outer_ref): New function.
2129 (gfc_omp_clause_default_ctor): Add outer argument. For allocatable
2130 arrays allocate them with the bounds of the outer var if outer
2132 (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
2133 gfc_omp_clause_dtor): New functions.
2134 (gfc_trans_omp_array_reduction): If decl is allocatable array,
2135 allocate it with outer var's bounds in OMP_CLAUSE_REDUCTION_INIT
2136 and deallocate it in OMP_CLAUSE_REDUCTION_MERGE.
2137 (gfc_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
2138 for assumed-size arrays.
2139 (gfc_trans_omp_do): Add par_clauses argument. If dovar is
2140 present in lastprivate clause and do loop isn't simple,
2141 set OMP_CLAUSE_LASTPRIVATE_STMT. If dovar is present in
2142 parallel's lastprivate clause, change it to shared and add
2143 lastprivate clause to OMP_FOR_CLAUSES. Handle collapsed do loops.
2144 (gfc_trans_omp_directive): Adjust gfc_trans_omp_do callers.
2145 (gfc_trans_omp_parallel_do): Likewise. Move collapse clause to
2146 OMP_FOR from OMP_PARALLEL.
2147 (gfc_trans_omp_clauses): Handle OMP_SCHED_AUTO,
2148 OMP_DEFAULT_FIRSTPRIVATE, untied and collapse clauses.
2149 (gfc_trans_omp_task, gfc_trans_omp_taskwait): New functions.
2150 (gfc_trans_omp_directive): Handle EXEC_OMP_TASK and
2153 2008-06-04 Janus Weil <janus@gcc.gnu.org>
2157 * resolve.c (resolve_symbol): Correctly copy the interface for a
2158 PROCEDURE declaration.
2160 2008-06-02 Janus Weil <janus@gcc.gnu.org>
2163 * symbol.c (gfc_add_allocatable,gfc_add_dimension,
2164 gfc_add_explicit_interface): Added checks.
2165 * decl.c (attr_decl1): Added missing "var_locus".
2166 * parse.c (parse_interface): Checking for errors.
2168 2008-06-02 Daniel Kraft <d@domob.eu>
2170 * gfortran.h: New statement-type ST_FINAL for FINAL declarations.
2171 (struct gfc_symbol): New member f2k_derived.
2172 (struct gfc_namespace): New member finalizers, for use in the above
2173 mentioned f2k_derived namespace.
2174 (struct gfc_finalizer): New type defined for finalizers linked list.
2175 * match.h (gfc_match_final_decl): New function header.
2176 * decl.c (gfc_match_derived_decl): Create f2k_derived namespace on
2177 constructed symbol node.
2178 (gfc_match_final_decl): New function to match a FINAL declaration line.
2179 * parse.c (decode_statement): match-call for keyword FINAL.
2180 (parse_derived): Parse CONTAINS section and accept FINAL statements.
2181 * resolve.c (gfc_resolve_finalizers): New function to resolve (that is
2182 in this case, check) a list of finalizer procedures.
2183 (resolve_fl_derived): Call gfc_resolve_finalizers here.
2184 * symbol.c (gfc_get_namespace): Initialize new finalizers to NULL.
2185 (gfc_free_namespace): Free finalizers list.
2186 (gfc_new_symbol): Initialize new f2k_derived to NULL.
2187 (gfc_free_symbol): Free f2k_derived namespace.
2188 (gfc_free_finalizer): New function to free a single gfc_finalizer node.
2189 (gfc_free_finalizer_list): New function to free a linked list of
2190 gfc_finalizer nodes.
2192 2008-06-02 Daniel Franke <franke.daniel@gmail.com>
2196 * cpp.c (gfc_cpp_init): Do not initialize builtins if
2197 processing already preprocessed input.
2198 (gfc_cpp_preprocess): Finalize output with newline.
2200 2008-05-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2202 * intrinsic.texi: Revert wrong commit.
2204 2008-05-31 Steven G. Kargl <kargls@comcast.net>
2206 * arith.c (gfc_arith_init_1): Remove now unused r and c variables.
2207 Cleanup numerical inquiry function initialization.
2208 (gfc_arith_done_1): Replace multiple mpfr_clear() invocations with
2209 a single mpfr_clears().
2210 (gfc_check_real_range): Re-arrange logic to eliminate multiple
2211 unnecessary branching and assignments.
2212 (gfc_arith_times): Use mpfr_clears() in preference to multiple
2214 (gfc_arith_divide): Ditto.
2215 (complex_reciprocal): Eliminate now unused variables a, re, im.
2216 Cleanup the mpfr abuse. Use mpfr_clears() in preference to
2217 multiple mpfr_clear().
2218 (complex_pow): Fix comment whitespace. Use mpfr_clears() in
2219 preference to multiple mpfr_clear().
2220 * simplify.c (gfc_simplify_and): Remove blank line.
2221 (gfc_simplify_atan2): Move error checking earlier to eliminate
2222 a now unnecessay gfc_free_expr().
2223 (gfc_simplify_bessel_j0): Remove unnecessary gfc_set_model_kind().
2224 (gfc_simplify_bessel_j1): Ditto.
2225 (gfc_simplify_bessel_jn): Ditto.
2226 (gfc_simplify_bessel_y0): Ditto.
2227 (gfc_simplify_bessel_y1): Ditto.
2228 (gfc_simplify_bessel_yn): Ditto.
2229 (only_convert_cmplx_boz): Eliminate unnecessary duplicate code, and
2230 combine nested if statement rational expressions.
2231 (gfc_simplify_cos): Use mpfr_clears() in preference to multiple
2233 (gfc_simplify_exp): Ditto.
2234 (gfc_simplify_fraction): Move gfc_set_model_kind() to after the
2235 special case of 0. Use mpfr_clears() in preference to multiple
2237 (gfc_simplify_gamma): Eliminate unnecessary gfc_set_model_kind().
2238 (gfc_simplify_lgamma): Ditto.
2239 (gfc_simplify_log10): Ditto.
2240 (gfc_simplify_log): Move gfc_set_model_kind () inside switch
2241 statement. Use mpfr_clears() in preference to multiple mpfr_clear().
2242 (gfc_simplify_mod): Eliminate now unused variables quot, iquot,
2243 and term. Simplify the mpfr magic.
2244 (gfc_simplify_modulo): Ditto.
2245 (gfc_simplify_nearest): Eliminate unnecessary gfc_set_model_kind().
2246 (gfc_simplify_scale): Use mpfr_clears() in preference to multiple
2248 (gfc_simplify_sin): Ditto
2249 (gfc_simplify_sqrt): Ditto
2250 (gfc_simplify_set_exponent): Move gfc_set_model_kind() to after the
2251 special case of 0. Use mpfr_clears() in preference to multiple
2254 2008-05-29 Daniel Franke <franke.daniel@gmail.com>
2257 * Make-lang.in (F95_OBJS): Added dependency on FORTRAN_TARGET_OBJS.
2259 2008-05-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2261 * scanner.c (load_line): Add first_char argument. Don't call ungetc.
2262 (gfc_read_orig_filename): Adjust call to load_line. Don't call
2264 (load_file): Adjust call to load_line.
2266 2008-05-28 Janus Weil <janus@gcc.gnu.org>
2270 * interface.c (gfc_procedure_use): Enable argument checking for
2271 external procedures with explicit interface.
2272 * symbol.c (check_conflict): Fix conflict checking for externals.
2273 (copy_formal_args): Fix handling of arrays.
2274 * resolve.c (resolve_specific_f0, resolve_specific_s0): Fix handling
2276 * parse.c (parse_interface): Non-abstract INTERFACE statement implies
2279 2008-05-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2282 * intrinsic.c (gfc_convert_chartype): Don't mark conversion
2284 * trans-array.c (gfc_trans_array_ctor_element): Divide element
2285 size by the size of one character to obtain length.
2286 * iresolve.c (gfc_resolve_cshift): Call the _char4 variant when
2288 (gfc_resolve_eoshift): Likewise.
2289 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Minor beautification.
2290 (gfc_conv_intrinsic_fdate): Minor beautification.
2291 (gfc_conv_intrinsic_ttynam): Minor beautification.
2292 (gfc_conv_intrinsic_minmax_char): Allow all character kinds.
2293 (size_of_string_in_bytes): New function.
2294 (gfc_conv_intrinsic_size): Call size_of_string_in_bytes for
2295 character expressions.
2296 (gfc_conv_intrinsic_sizeof): Likewise.
2297 (gfc_conv_intrinsic_array_transfer): Likewise.
2298 (gfc_conv_intrinsic_trim): Allow all character kinds. Minor
2300 (gfc_conv_intrinsic_repeat): Fix comment typo.
2301 * simplify.c (gfc_convert_char_constant): Take care of conversion
2302 of array constructors.
2304 2008-05-27 Tobias Burnus <burnus@net-b.de>
2307 * trans-array.c (gfc_set_loop_bounds_from_array_spec):
2308 Add missing fold_convert.
2310 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
2312 * fortran/cpp.c (cpp_define_builtins): Remove usage of TARGET_* macros,
2313 added FIXME instead.
2315 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
2318 * lang.opt (A, C, CC, D, E, H, P, U, cpp, d, fworking-directory,
2319 imultilib, iprefix, iquote, isysroot, isystem, nocpp, nostdinc,
2320 o, undef, v): New options.
2321 * options.c (gfc_init_options): Also initialize preprocessor
2323 (gfc_post_options): Also handle post-initialization of preprocessor
2325 (gfc_handle_option): Check if option is a preprocessor option.
2326 If yes, let gfc_cpp_handle_option() handle the option.
2327 * lang-specs.h: Reorganized to handle new options.
2328 * scanner.c (gfc_new_file): Read temporary file instead of
2329 input source if preprocessing is enabled.
2330 * f95-lang.c (gfc_init): Initialize preprocessor.
2331 (gfc_finish): Clean up preprocessor.
2334 * Make-lang.in: Added new objects and dependencies.
2335 * gfortran.texi: Updated section "Preprocessing and
2336 conditional compilation".
2337 * invoke.texi: Added new section "Preprocessing Options",
2338 listed and documented the preprocessing options handled
2341 2008-05-25 Tobias Burnus <burnus@net-b.de>
2344 * trans-expr.c (gfc_conv_function_call): Remove library
2345 call for c_f_pointer with scalar Fortran pointers and for
2348 2008-05-21 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2351 * iresolve.c (check_charlen_present): Don't force the rank to 1.
2353 2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2356 * trans-expr.c (gfc_conv_string_tmp): Pick the correct type for
2357 the temporary variable.
2359 2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2361 * simplify.c (gfc_simplify_dble, gfc_simplify_real): Initialize
2362 result variable to avoid warnings.
2364 2008-05-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2366 * intrinsic.c (char_conversions, ncharconv): New static variables.
2367 (find_char_conv): New function.
2368 (add_functions): Add simplification functions for ADJUSTL and
2369 ADJUSTR. Don't check the kind of their argument. Add checking for
2370 LGE, LLE, LGT and LLT.
2371 (add_subroutines): Fix argument type for SLEEP. Fix argument name
2373 (add_char_conversions): New function.
2374 (gfc_intrinsic_init_1): Call add_char_conversions.
2375 (gfc_intrinsic_done_1): Free char_conversions.
2376 (check_arglist): Use kind == 0 as a signal that we don't want
2377 the kind value to be checked.
2378 (do_simplify): Also simplify character functions.
2379 (gfc_convert_chartype): New function
2380 * trans-array.c (gfc_trans_array_ctor_element): Don't force the
2381 use of default character type.
2382 (gfc_trans_array_constructor_value): Likewise.
2383 (get_array_ctor_var_strlen): Use integer kind to build an integer
2384 instead of a character kind!
2385 (gfc_build_constant_array_constructor): Don't force the use of
2386 default character type.
2387 (gfc_conv_loop_setup): Likewise.
2388 * trans-expr.c (gfc_conv_string_tmp): Don't force the use of
2389 default character type. Allocate enough memory for wide strings.
2390 (gfc_conv_concat_op): Make sure operand kind are the same.
2391 (string_to_single_character): Remove gfc_ prefix. Reindent.
2392 Don't force the use of default character type.
2393 (gfc_conv_scalar_char_value): Likewise.
2394 (gfc_build_compare_string): Call string_to_single_character.
2395 (fill_with_spaces): New function
2396 (gfc_trans_string_copy): Add kind arguments. Use them to deal
2397 with wide character kinds.
2398 (gfc_conv_statement_function): Whitespace fix. Call
2399 gfc_trans_string_copy with new kind arguments.
2400 (gfc_conv_substring_expr): Call gfc_build_wide_string_const
2401 instead of using gfc_widechar_to_char.
2402 (gfc_conv_string_parameter): Don't force the use of default
2404 (gfc_trans_scalar_assign): Pass kind args to gfc_trans_string_copy.
2405 * intrinsic.h (gfc_check_lge_lgt_lle_llt, gfc_convert_char_constant,
2406 gfc_resolve_adjustl, gfc_resolve_adjustr): New prototypes.
2407 * decl.c (gfc_set_constant_character_len): Don't assert the
2408 existence of a single character kind.
2409 * trans-array.h (gfc_trans_string_copy): New prototype.
2410 * gfortran.h (gfc_check_character_range, gfc_convert_chartype):
2412 * error.c (print_wide_char_into_buffer): New function lifting
2413 code from gfc_print_wide_char. Fix order to output '\x??' instead
2415 (gfc_print_wide_char): Call print_wide_char_into_buffer.
2416 (show_locus): Call print_wide_char_into_buffer with buffer local
2418 * trans-const.c (gfc_build_wide_string_const): New function.
2419 (gfc_conv_string_init): Deal with wide characters strings
2421 (gfc_conv_constant_to_tree): Call gfc_build_wide_string_const.
2422 * trans-stmt.c (gfc_trans_label_assign): Likewise.
2423 (gfc_trans_character_select): Deal with wide strings.
2424 * expr.c (gfc_check_assign): Allow conversion between character
2425 kinds on assignment.
2426 * trans-const.h (gfc_build_wide_string_const): New prototype.
2427 * trans-types.c (gfc_get_character_type_len_for_eltype,
2428 gfc_get_character_type_len): Create too variants of the old
2429 gfc_get_character_type_len, one getting kind argument and the
2430 other one directly taking a type tree.
2431 * trans.h (gfor_fndecl_select_string_char4,
2432 gfor_fndecl_convert_char1_to_char4,
2433 gfor_fndecl_convert_char4_to_char1): New prototypes.
2434 * trans-types.h (gfc_get_character_type_len_for_eltype): New
2436 * resolve.c (resolve_operator): Exit early when kind mismatches
2437 are detected, because that makes us issue an error message later.
2438 (validate_case_label_expr): Fix wording of error message.
2439 * iresolve.c (gfc_resolve_adjustl, gfc_resolve_adjustr): New
2441 (gfc_resolve_pack): Call _char4 variants of library function
2442 when dealing with wide characters.
2443 (gfc_resolve_reshape): Likewise.
2444 (gfc_resolve_spread): Likewise.
2445 (gfc_resolve_transpose): Likewise.
2446 (gfc_resolve_unpack): Likewise.
2447 * target-memory.c (size_character): Take character kind bit size
2448 correctly into account (not that it changes anything for now, but
2450 (gfc_encode_character): Added gfc_ prefix. Encoding each
2451 character of a string by calling native_encode_expr for the
2452 corresponding unsigned integer.
2453 (gfc_target_encode_expr): Add gfc_ prefix to encode_character.
2454 * trans-decl.c (gfc_build_intrinsic_function_decls): Build
2455 gfor_fndecl_select_string_char4, gfor_fndecl_convert_char1_to_char4
2456 and gfor_fndecl_convert_char4_to_char1.
2457 * target-memory.h (gfc_encode_character): New prototype.
2458 * arith.c (gfc_check_character_range): New function.
2459 (eval_intrinsic): Allow non-default character kinds.
2460 * check.c (gfc_check_access_func): Only allow default
2461 character kind arguments.
2462 (gfc_check_chdir): Likewise.
2463 (gfc_check_chdir_sub): Likewise.
2464 (gfc_check_chmod): Likewise.
2465 (gfc_check_chmod_sub): Likewise.
2466 (gfc_check_lge_lgt_lle_llt): New function.
2467 (gfc_check_link): Likewise.
2468 (gfc_check_link_sub): Likewise.
2469 (gfc_check_symlnk): Likewise.
2470 (gfc_check_symlnk_sub): Likewise.
2471 (gfc_check_rename): Likewise.
2472 (gfc_check_rename_sub): Likewise.
2473 (gfc_check_fgetputc_sub): Likewise.
2474 (gfc_check_fgetput_sub): Likewise.
2475 (gfc_check_stat): Likewise.
2476 (gfc_check_stat_sub): Likewise.
2477 (gfc_check_date_and_time): Likewise.
2478 (gfc_check_ctime_sub): Likewise.
2479 (gfc_check_fdate_sub): Likewise.
2480 (gfc_check_gerror): Likewise.
2481 (gfc_check_getcwd_sub): Likewise.
2482 (gfc_check_getarg): Likewise.
2483 (gfc_check_getlog): Likewise.
2484 (gfc_check_hostnm): Likewise.
2485 (gfc_check_hostnm_sub): Likewise.
2486 (gfc_check_ttynam_sub): Likewise.
2487 (gfc_check_perror): Likewise.
2488 (gfc_check_unlink): Likewise.
2489 (gfc_check_unlink_sub): Likewise.
2490 (gfc_check_system_sub): Likewise.
2491 * primary.c (got_delim): Perform correct character range checking
2493 * trans-intrinsic.c (gfc_conv_intrinsic_conversion): Generate
2494 calls to library functions convert_char4_to_char1 and
2495 convert_char1_to_char4 for character conversions.
2496 (gfc_conv_intrinsic_char): Allow all character kings.
2497 (gfc_conv_intrinsic_strcmp): Fix whitespace.
2498 (gfc_conv_intrinsic_repeat): Take care of all character kinds.
2499 * intrinsic.texi: For all GNU intrinsics accepting character
2500 arguments, mention that they're restricted to the default kind.
2501 * simplify.c (simplify_achar_char): New function.
2502 (gfc_simplify_achar, gfc_simplify_char): Call simplify_achar_char.
2503 gfc_simplify_ichar): Don't error out for wide characters.
2504 (gfc_convert_char_constant): New function.
2506 2008-05-18 Steven G. Kargl <kargls@comcast.net>
2509 * symbol.c (check_conflict): Issue errors for abuse of PUBLIC, PRIVATE,
2511 * resolve.c (gfc_verify_binding_labels): Fix NULL pointer dereference.
2513 2008-05-17 Tobias Burnus <burnus@net-b.de>
2515 * intrinsic.texi: Correct description of GET_COMMAND_ARGUMENT
2516 and GET_ENVIRONMENT_VARIABLE; fix keyword= name for GETENV,
2517 GETLOG, GMTIME, HOSTNM, IRAND, ITIME, KILL.
2518 Move LOG_GAMMA after LOG10.
2520 2008-05-17 Tobias Burnus <burnus@net-b.de>
2522 * intrinsic.c (add_functions): Change FLUSH(C) to FLUSH(UNIT).
2523 * intrinsic.texi: Change INTEGER(*) to INTEGER; fix keyword= name for
2524 ABS, ADJUSTL, AINT, ALLOCATED, ANINT, ASSOCIATED, C_ASSOCIATED,
2525 CEILING, DBLE, DFLOAT, DOT_PRODUCT, DREAL, FLOAT, FLOOR, GET_COMMAND.
2527 2008-05-16 Paul Thomas <pault@gcc.gnu.org>
2531 * trans-stmt.c (gfc_trans_where): Tighten up the dependency
2532 check for calling gfc_trans_where_3.
2535 * trans-stmt.c (gfc_trans_where_2): Set the mask size to zero
2536 if it is calculated to be negative.
2539 * trans-stmt.c (gfc_trans_where_3, gfc_trans_where_assign): Set
2540 ss->where for scalar right hand sides.
2541 * trans-array.c (gfc_add_loop_ss_code): If ss->where is set do
2542 not evaluate scalars outside the loop. Clean up whitespace.
2543 * trans.h : Add a bitfield 'where' to gfc_ss.
2545 2008-05-16 Tobias Burnus <burnus@net-b.de>
2547 * libgfortran.h: Increase GFC_MAX_DIMENSIONS to 15.
2548 * array.c (gfc_match_array_spec): Error with -std=f2003 if rank > 7.
2550 2008-04-16 Daniel Kraft <d@domob.eu>
2553 * gfortran.h: Added field "length_from_typespec" to gfc_charlength.
2554 * aray.c (gfc_match_array_constructor): Added code to parse typespec.
2555 (check_element_type, check_constructor_type, gfc_check_constructor_type):
2556 Extended to support explicit typespec on constructor.
2557 (gfc_resolve_character_array_constructor): Pad strings correctly for
2558 explicit, constant character length.
2559 * trans-array.c: New static global variable "typespec_chararray_ctor"
2560 (gfc_trans_array_constructor): New code to support explicit but dynamic
2563 2008-05-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2566 * decl.c (match_attr_spec): Check for matching pairs of parenthesis.
2567 * expr.c (gfc_specification_expr): Supplement the error message with the
2568 type that was found.
2569 * resolve.c (gfc_resolve_index): Likewise.
2570 * match.c (gfc_match_parens): Clarify error message with "at or before".
2571 (gfc_match_do): Check for matching pairs of parenthesis.
2573 2008-05-16 Tobias Burnus <burnus@net-b.de
2575 * intrinsic.texi: Write Fortran 77/90/95 instead of F77/90/95;
2576 add missing KIND argument to ACHAR and NINT; and state that
2577 the KIND argument is a F2003 extension for ACHAR, COUNT, IACHAR,
2578 ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND, VERIFY.
2580 2008-05-16 Daniel Kraft <d@domob.eu>
2582 * primary.c: New private structure "gfc_structure_ctor_component".
2583 (gfc_free_structure_ctor_component): New helper function.
2584 (gfc_match_structure_constructor): Extended largely to support named
2585 arguments and default initialization for structure constructors.
2587 2008-05-15 Steven G. Kargl <kargls@comcast.net>
2589 * simplify.c (gfc_simplify_dble, gfc_simplify_float,
2590 simplify_bound, gfc_simplify_nearest, gfc_simplify_real): Plug
2591 possible memory leaks.
2592 (gfc_simplify_reshape): Plug possible memory leaks and dereferencing
2595 2008-05-15 Steven G. Kargl <kargls@comcast.net>
2598 * simplify.c (gfc_simplify_int, gfc_simplify_intconv): Replaced hand
2599 rolled integer conversion with gfc_int2int, gfc_real2int, and
2601 (gfc_simplify_intconv): Renamed to simplify_intconv.
2603 2008-05-15 Steven G. Kargl, <kargl@comcast.net>
2604 * gfortran.dg/and_or_xor.f90: New test
2606 * fortran/simplify.c (gfc_simplify_and, gfc_simplify_or,
2607 gfc_simplify_xor): Don't range check logical results.
2609 2008-05-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2611 * trans-expr.c (gfc_conv_concat_op): Take care of nondefault
2613 (gfc_build_compare_string): Add kind argument and use it.
2614 (gfc_conv_statement_function): Fix indentation.
2615 * gfortran.h (gfc_character_info): New structure.
2616 (gfc_character_kinds): New array.
2617 * trans-types.c (gfc_character_kinds, gfc_character_types,
2618 gfc_pcharacter_types): New array.
2619 (gfc_init_kinds): Fill character kinds array.
2620 (validate_character): Take care of nondefault character kinds.
2621 (gfc_build_uint_type): New function.
2622 (gfc_init_types): Take care of nondefault character kinds.
2623 (gfc_get_char_type, gfc_get_pchar_type): New functions.
2624 (gfc_get_character_type_len): Use gfc_get_char_type.
2625 * trans.h (gfc_build_compare_string): Adjust prototype.
2626 (gfor_fndecl_compare_string_char4, gfor_fndecl_concat_string_char4,
2627 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
2628 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
2629 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
2630 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4): New
2632 * trans-types.h (gfc_get_char_type, gfc_get_pchar_type): New
2634 * trans-decl.c (gfor_fndecl_compare_string_char4,
2635 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
2636 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
2637 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
2638 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4,
2639 gfor_fndecl_concat_string_char4): New function decls.
2640 (gfc_build_intrinsic_function_decls): Define new *_char4 function
2642 * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char,
2643 gfc_conv_intrinsic_len_trim, gfc_conv_intrinsic_ichar,
2644 gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_trim,
2645 gfc_conv_intrinsic_function): Deal with nondefault character kinds.
2647 2008-05-15 Sa Liu <saliu@de.ibm.com>
2649 * iso-c-binding.def: Add standard parameter to macro NAMED_INTCST.
2650 All existing NAMED_INTCST definitions has standard GFC_STD_F2003,
2651 c_int128_t, c_int_least128_t and c_int_fast128_t are added as
2653 * iso-fortran-evn.def: Add standard parameter GFC_STD_F2003
2654 to macro NAMED_INTCST.
2655 * symbol.c (std_for_isocbinding_symbol): New helper function to
2656 return the standard that supports this isocbinding symbol.
2657 (generate_isocbinding_symbol): Do not generate GNU extension symbols
2658 if std=f2003. Add new parameter to NAMED_INTCST.
2659 * module.c (use_iso_fortran_env_module): Add new parameter to
2660 NAMED_INTCST and new field standard to struct intmod_sym.
2661 * gfortran.h: Add new parameter to NAMED_INTCST.
2662 * trans-types.c (init_c_interop_kinds): Add new parameter to
2664 * intrinsic.texi: Documented new types C_INT128_T, C_INT_LEASE128_T
2665 and C_INT_FAST128_T.
2667 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2670 * trans-decl.c (gfc_build_dummy_array_decl): Don't repack
2671 arrays that have the TARGET attribute.
2673 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2676 * simplify.c (only_convert_cmplx_boz): New function.
2677 (gfc_simplify_cmplx, gfc_simplify_complex, gfc_simplify_dcmplx):
2678 Call only_convert_cmplx_boz.
2680 2008-05-14 Paul Thomas <pault@gcc.gnu.org>
2683 * interface.c (compare_actual_formal): Do not check sizes if the
2684 actual is BT_PROCEDURE.
2686 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2689 * trans-array.c (gfc_conv_ss_startstride): Any negative size is
2690 the same as zero size.
2691 (gfc_conv_loop_setup): Fix size calculation.
2693 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2696 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Correctly
2697 handle zero-size sections.
2699 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2702 * scanner.c (preprocessor_line): Allocate enough memory for a
2705 2008-05-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2708 * target-memory.c (gfc_target_expr_size): Correctly treat
2710 (gfc_target_encode_expr): Likewise.
2711 (gfc_interpret_complex): Whitespace change.
2713 2008-05-11 Thomas Koenig <tkoenig@gcc.gnu.org>
2716 * trans.c (gfc_call_malloc): If size equals zero, allocate one
2717 byte; don't return a null pointer.
2719 2008-05-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2722 * module.c (quote_string): Fix sprintf format.
2724 2008-05-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2727 * module.c (quote_string, unquote_string,
2728 mio_allocated_wide_string): New functions.
2729 (mio_expr): Call mio_allocated_wide_string where needed.
2731 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
2733 * trans-decl.c (gfc_get_extern_function_decl, build_function_decl):
2734 Rename DECL_IS_PURE to DECL_PURE_P.
2736 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2738 * arith.c: (gfc_arith_concat, gfc_compare_string,
2739 gfc_compare_with_Cstring, hollerith2representation,
2740 gfc_hollerith2int, gfc_hollerith2real, gfc_hollerith2complex,
2741 gfc_hollerith2character, gfc_hollerith2logical): Use wide
2742 characters for character constants.
2743 * data.c (create_character_intializer): Likewise.
2744 * decl.c (gfc_set_constant_character_len): Likewise.
2745 * dump-parse-tree.c (show_char_const): Correctly dump wide
2747 error.c (print_wide_char): Rename into gfc_print_wide_char.
2748 (show_locus): Adapt to new prototype of gfc_print_wide_char.
2749 expr.c (free_expr0): Representation is now disjunct from
2750 character string value, so we always free it.
2751 (gfc_copy_expr, find_substring_ref, gfc_simplify_expr): Adapt
2752 to wide character strings.
2753 * gfortran.h (gfc_expr): Make value.character.string a wide string.
2754 (gfc_wide_toupper, gfc_wide_strncasecmp, gfc_wide_memset,
2755 gfc_widechar_to_char, gfc_char_to_widechar): New prototypes.
2756 (gfc_get_wide_string): New macro.
2757 (gfc_print_wide_char): New prototype.
2758 * io.c (format_string): Make a wide string.
2759 (next_char, gfc_match_format, compare_to_allowed_values,
2760 gfc_match_open): Deal with wide strings.
2761 * module.c (mio_expr): Convert between wide strings and ASCII ones.
2762 * primary.c (match_hollerith_constant, match_charkind_name):
2763 Handle wide strings.
2764 * resolve.c (build_default_init_expr): Likewise.
2765 * scanner.c (gfc_wide_toupper, gfc_wide_memset,
2766 gfc_char_to_widechar): New functions.
2767 (wide_strchr, gfc_widechar_to_char, gfc_wide_strncasecmp):
2768 Changes in prototypes.
2769 (gfc_define_undef_line, load_line, preprocessor_line,
2770 include_line, load_file, gfc_read_orig_filename): Handle wide
2772 * simplify.c (gfc_simplify_achar, gfc_simplify_adjustl,
2773 gfc_simplify_adjustr, gfc_simplify_char, gfc_simplify_iachar,
2774 gfc_simplify_ichar, simplify_min_max, gfc_simplify_new_line,
2775 gfc_simplify_repeat): Handle wide strings.
2776 (wide_strspn, wide_strcspn): New helper functions.
2777 (gfc_simplify_scan, gfc_simplify_trim, gfc_simplify_verify):
2778 Handle wide strings.
2779 * symbol.c (generate_isocbinding_symbol): Likewise.
2780 * target-memory.c (size_character, gfc_target_expr_size,
2781 encode_character, gfc_target_encode_expr, gfc_interpret_character,
2782 gfc_target_interpret_expr): Handle wide strings.
2783 * trans-const.c (gfc_conv_string_init): Lower wide strings to
2785 (gfc_conv_constant_to_tree): Likewise.
2786 * trans-expr.c (gfc_conv_substring_expr): Handle wide strings.
2787 * trans-io.c (gfc_new_nml_name_expr): Likewise.
2788 * trans-stmt.c (gfc_trans_label_assign): Likewise.
2790 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2792 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
2793 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
2794 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): Mark arguments
2795 with ATTRIBUTE_UNUSED.
2797 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2799 * check.c (gfc_check_sizeof): Switch to ATTRIBUTE_UNUSED.
2800 * simplify.c (gfc_simplify_lgamma): Likewise.
2802 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2804 * openmp.c (gfc_match_omp_eos): Use gfc_next_ascii_char and
2805 gfc_peek_ascii_char.
2806 * decl.c (gfc_match_kind_spec, gfc_match_type_spec,
2807 gfc_match_implicit_none, match_implicit_range, gfc_match_implicit,
2808 match_string_p, match_attr_spec, gfc_match_suffix,
2809 match_procedure_decl, gfc_match_entry, gfc_match_subroutine):
2811 * gfortran.h (gfc_char_t): New type.
2812 (gfc_linebuf): Make line member a gfc_char_t.
2813 (locus): Make nextc member a gfc_char_t.
2814 (gfc_wide_is_printable, gfc_wide_is_digit, gfc_wide_fits_in_byte,
2815 gfc_wide_tolower, gfc_wide_strlen, gfc_next_ascii_char,
2816 gfc_peek_ascii_char, gfc_check_digit): New prototypes.
2817 * error.c (print_wide_char): New function.
2818 (show_locus): Use print_wide_char and gfc_wide_strlen.
2819 * io.c (next_char): Use gfc_char_t type.
2820 (match_io): Use gfc_peek_ascii_char and gfc_next_ascii_char.
2821 * match.c (gfc_match_parens, gfc_match_eos,
2822 gfc_match_small_literal_int, gfc_match_name, gfc_match_name_C,
2823 gfc_match_intrinsic_op, gfc_match_char, gfc_match_return,
2824 gfc_match_common): Likewise.
2825 * match.h (gfc_match_special_char): Change prototype.
2826 * parse.c (decode_specification_statement, decode_statement,
2827 decode_omp_directive, next_free, next_fixed): Use
2828 gfc_peek_ascii_char and gfc_next_ascii_char.
2829 * primary.c (gfc_check_digit): Change name.
2830 (match_digits, match_hollerith_constant, match_boz_constant,
2831 match_real_constant, next_string_char, match_charkind_name,
2832 match_string_constant, match_logical_constant_string,
2833 match_complex_constant, match_actual_arg, match_varspec,
2834 gfc_match_rvalue, match_variable): Use gfc_peek_ascii_char and
2835 gfc_next_ascii_char.
2836 * scanner.c (gfc_wide_fits_in_byte, wide_is_ascii,
2837 gfc_wide_is_printable, gfc_wide_tolower, gfc_wide_is_digit,
2838 gfc_wide_is_digit, wide_atoi, gfc_wide_strlen, wide_strcpy,
2839 wide_strchr, widechar_to_char, wide_strncmp, wide_strncasecmp,
2840 gfc_next_ascii_char, gfc_peek_ascii_char):
2842 (next_char, gfc_define_undef_line, skip_free_comments,
2843 gfc_next_char_literal, gfc_next_char, gfc_peek_char,
2844 gfc_error_recovery, load_line, preprocessor_line, include_line,
2845 load_file, gfc_read_orig_filename): Use gfc_char_t for source
2846 characters and the {gfc_,}wide_* functions to manipulate wide
2849 2008-05-06 Tobias Burnus <burnus@net-b.de>
2852 * intrinsic.c (add_functions): Call gfc_simplify_bessel_*.
2853 * intrinsic.h: Add prototypes for gfc_simplify_bessel_*.
2854 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
2855 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
2856 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): New.
2858 2008-05-03 Janus Weil <jaydub66@gmail.com>
2860 * misc.c (gfc_clear_ts): Set interface to NULL.
2862 2008-05-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2865 * gfortran.h: Add extra_comma pointer to gfc_dt structure. Add iokind to
2866 gfc_expr value union. Add io_kind enum to here from io.c.
2867 * io.c (gfc_free_dt): Free extra_comma.
2868 (gfc_resolve_dt): If an extra comma was encountered and io_unit is type
2869 BT_CHARACTER, resolve to format_expr and set default unit. Error if
2870 io_kind is M_WRITE. (match_io): Match the extra comma and set new
2871 pointer, extra_comma.
2873 2008-05-01 Bud Davis <bdavis9659@sbcglobal.net>
2876 * simplify.c (gfc_simplify_index): Check for direction argument
2879 2008-05-01 Janus Weil <jaydub66@gmail.com>
2881 * gfortran.h (struct gfc_symbol): Moving "interface" member to
2882 gfc_typespec (plus fixing a small docu error).
2883 * interface.c (gfc_procedure_use): Ditto.
2884 * decl.c (match_procedure_decl): Ditto.
2885 * resolve.c (resolve_specific_f0,
2886 resolve_specific_f0, resolve_symbol): Ditto.
2888 2008-04-30 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2890 * intrinsic.c (add_functions): Add SELECTED_CHAR_KIND intrinsic.
2891 * intrinsic.h (gfc_check_selected_char_kind,
2892 gfc_simplify_selected_char_kind): New prototypes.
2893 * gfortran.h (gfc_isym_id): Add GFC_ISYM_SC_KIND.
2894 * trans.h (gfor_fndecl_sc_kind): New function decl.
2895 * trans-decl.c (gfor_fndecl_sc_kind): Build new decl.
2896 * arith.c (gfc_compare_with_Cstring): New function.
2897 * arith.h (gfc_compare_with_Cstring): New prototype.
2898 * check.c (gfc_check_selected_char_kind): New function.
2899 * primary.c (match_string_constant, match_kind_param): Mark
2900 symbols used as literal constant kind param as referenced.
2901 * trans-intrinsic.c (gfc_conv_intrinsic_sc_kind): New function.
2902 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_sc_kind.
2903 * intrinsic.texi (SELECTED_CHAR_KIND): Document new intrinsic.
2904 * simplify.c (gfc_simplify_selected_char_kind): New function.
2906 2008-04-28 Paul Thomas <pault@gcc.gnu.org>
2909 * module.c (find_symbol): Do not return a result for a symbol
2910 that has been renamed in another module.
2912 2008-04-26 George Helffrich <george@gcc.gnu.org>
2916 * trans-common.c (create_common): Add decl to function
2917 chain (if inside one) to preserve identifier scope in debug output.
2919 2008-04-25 Jan Hubicka <jh@suse.cz>
2921 * trans-decl.c (trans_function_start): Update.
2923 2008-04-25 Tobias Burnus <burnus@net-b.de>
2924 Daniel Franke <franke.daniel@gmail.com>
2927 * gfortranspec.c (lang_specific_driver): Deprecate
2928 -M option; fix ICE when "-M" is last argument and
2929 make "-M<dir>" work.
2930 * options.c (gfc_handle_module_path_options):
2931 Use -J instead of -M in error messages.
2932 * invoke.texi: Mark -M as depecated.
2934 2008-04-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2935 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2938 * trans-instrinsic.c (gfc_conv_intrinsic_minmaxloc): Correctly adjust
2939 loop counter offset.
2941 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
2943 * trans-expr.c (gfc_conv_structure): Don't set TREE_INVARIANT.
2944 * trans-array.c (gfc_build_null_descriptor): Don't set TREE_INVARIANT.
2945 (gfc_trans_array_constructor_value): Don't set TREE_INVARIANT.
2946 (gfc_build_constant_array_constructor): Don't set TREE_INVARIANT.
2947 (gfc_conv_array_initializer): Don't set TREE_INVARIANT.
2948 * trans-common.c (get_init_field): Don't set TREE_INVARIANT.
2949 (create_common): Don't set TREE_INVARIANT.
2950 * trans-stmt.c (gfc_trans_character_select): Don't set TREE_INVARIANT.
2951 * trans-decl.c (gfc_generate_function_code): Don't set TREE_INVARIANT.
2953 2008-04-21 Steve Ellcey <sje@cup.hp.com>
2955 * f95-lang.c (gfc_init_decl_processing): use ptr_mode instead of Pmode.
2957 2008-04-21 Daniel Franke <franke.daniel@gmail.com>
2960 * gfortranspec.c (lookup_option): Properly handle separated arguments
2961 in -J option, print missing argument message when necessary.
2963 2008-04-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2966 * scanner.c (skip_fixed_comments): Update continue_line when comment is
2967 detected. (gfc_next_char_literal): Likewise.
2969 2008-04-19 Paul Thomas <pault@gcc.gnu.org>
2974 * trans_array.c (gfc_trans_array_constructor): Temporarily
2975 realign loop, if loop->from is not zero, before creating
2976 the temporary array and provide an offset.
2979 * trans-decl.c (gfc_init_default_dt): Add gfc_ prefix to name
2980 and allow for NULL body. Change all references from
2981 init_default_dt to gfc_init_default_dt.
2982 * trans.h : Add prototype for gfc_init_default_dt.
2983 * trans-array.c (gfc_trans_deferred_vars): After nullification
2984 call gfc_init_default_dt for derived types with allocatable
2987 2008-04-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2990 * trans-common.c (create_common): Revert patch causing regression.
2992 2008-04-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2995 * iresolve.c (gfc_resolve_eoshift): Check for NULL symtree in test for
2996 optional argument attribute.
2998 2008-04-16 Paul Thomas <pault@gcc.gnu.org>
3001 * trans-intrinsic.c (gfc_conv_intrinsic_char): Even though KIND
3002 is not used, the argument must be converted.
3004 2008-04-16 Jakub Jelinek <jakub@redhat.com>
3007 * f95-lang.c (gfc_init_builtin_functions): Make sure
3008 BUILT_IN_SINCOS{,F,L} types aren't varargs.
3010 2008-04-15 Paul Thomas <pault@gcc.gnu.org>
3013 * expr.c (scalarize_intrinsic_call): Reorder identification of
3014 array argument so that if one is not found a segfault does not
3015 occur. Return FAILURE if all scalar arguments.
3017 2008-04-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3018 Tobias Burnus <burnus@net-b.de>
3021 * options.c (gfc_init_options): Set the default maximum continuation
3022 lines to 255 for both free and fixed form source for warnings.
3023 (gfc_handle_option): Set -std=f95 fixed form max continuations to 19 and
3024 the -std=f95 free form max continuations to 39 for warnings.
3025 * scanner.c (gfc_next_char_literal): Adjust the current_line number only
3026 if it is less than the current locus.
3028 2008-04-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3030 PR fortran/25829 28655
3031 * io.c (io_tag): Add new tags for decimal, encoding, asynchronous,
3032 round, sign, and id. (match_open_element): Match new tags.
3033 (gfc_resolve_open): Resolve new tags. (gfc_match_open): Enable encoding
3034 for DEFAULT only. Update error messages. (match_dt_element): Fix match
3035 tag for asynchronous. Update error messages. (gfc_free_inquire): Free
3036 new expressions. (match_inquire_element): Match new tags.
3037 (gfc_match_inquire): Add constraint for ID and PENDING.
3038 (gfc_resolve_inquire): Resolve new tags.
3039 * trans-io.c (gfc_trans_inquire): Clean up whitespace and fix setting of
3040 mask for ID parameter.
3041 * ioparm.def: Fix order of parameters for pending, round, and sign.
3042 NOTE: These must line up with the definitions in libgfortran/io/io.h. or
3045 2008-04-06 Paul Thomas <pault@gcc.gnu.org>
3048 * expr.c (scalarize_intrinsic_call): Identify which argument is
3049 an array and use that as the template.
3050 (check_init_expr): Remove tests that first argument is an array
3051 in the call to scalarize_intrinsic_call.
3053 2008-04-06 Tobias Schlüter <tobi@gcc.gnu.org>
3056 * io.c (io_tag): Add field 'value'. Split 'spec' field in
3058 (match_etag, match_vtag, match_ltag): Split parsing in two steps
3059 to give better error messages.
3061 2008-04-06 Tobias Burnus <burnus@net-b.de>
3063 * io.c (check_io_constraints): Add constrains. ID= requires
3064 asynchronous= and asynchronous= must be init expression.
3066 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3068 * f95-lang.c: Set LANG_HOOKS_NAME to "GNU Fortran".
3070 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3072 * dump-parse-tree.c: Use fprintf, fputs and fputc instead of
3073 gfc_status and gfc_status_char. Remove gfc_ prefix of the gfc_show_*
3074 functions and make them static. Add new gfc_dump_parse_tree
3076 * gfortran.h (gfc_option_t): Rename verbose into dump_parse_tree.
3077 (gfc_status, gfc_status_char): Delete prototypes.
3078 * error.c (gfc_status, gfc_status_char): Remove functions.
3079 * scanner.c (gfc_new_file): Use printf instead of gfc_status.
3080 * options.c (gfc_init_options): Rename verbose into dump_parse_tree.
3081 (gfc_handle_module_path_options): Use gfc_fatal_error instead of
3082 gfc_status and exit.
3083 (gfc_handle_option): Rename verbose into dump_parse_tree.
3084 * parse.c (gfc_parse_file): Use gfc_dump_parse_tree.
3086 2008-04-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3087 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3089 PR fortran/25829 28655
3090 * dump-parse-tree.c (gfc_show_code_node): Show new I/O parameters.
3091 * gfortran.h (gfc_statement): Add ST_WAIT enumerator.
3092 (gfc_open): Add pointers for decimal, encoding, round, sign,
3093 asynchronous. (gfc_inquire): Add pointers for asynchronous, decimal,
3094 encoding, pending, round, sign, size, id.
3095 (gfc_wait): New typedef struct. (gfc_dt): Add pointers for id, pos,
3096 asynchronous, blank, decimal, delim, pad, round, sign.
3097 (gfc_exec_op): Add EXEC_WAIT enumerator. (gfc_code): Add pointer for
3098 wait. (gfc_free_wait), (gfc_resolve_wait): New function prototypes.
3099 * trans-stmt.h (gfc_trans_wait): New function prototype.
3100 * trans.c (gfc_trans_code): Add case for EXEC_WAIT.
3101 * io.c (io_tag): Add new tags for DECIMAL, ENCODING, ROUND, SIGN,
3102 ASYCHRONOUS, ID. (match_open_element): Add matchers for new tags.
3103 (gfc_free_open): Free new pointers. (gfc_resolve_open): Resolve new
3104 tags. (gfc_resolve_open): Remove comment around check for allowed
3105 values and ASYNCHRONOUS, update it. Likewise for DECIMAL, ENCODING,
3106 ROUND, and SIGN. (match_dt_element): Add matching for new tags.
3107 (gfc_free_wait): New function. (gfc_resolve_wait): New function.
3108 (match_wait_element): New function. (gfc_match_wait): New function.
3109 * resolve.c (gfc_resolve_blocks): Add case for EXEC_WAIT.
3110 (resolve_code): Add case for EXEC_WAIT.
3111 * st.c (gfc_free_statement): Add case for EXEC_WAIT.
3112 * trans-io.c (ioparam_type): Add IOPARM_ptype_wait. (gfc_st_parameter):
3113 Add "wait" entry. (iocall): Add IOCALL_WAIT enumerator.
3114 (gfc_build_io_library_fndecls): Add function declaration for st_wait.
3115 (gfc_trans_open): Add mask bits for new I/O tags.
3116 (gfc_trans_inquire): Add mask bits for new I/O tags.
3117 (gfc_trans_wait): New translation function.
3118 (build_dt): Add mask bits for new I/O tags.
3119 * match.c (gfc_match_if) Add matcher for "wait".
3120 * match.h (gfc_match_wait): Prototype for new function.
3121 * ioparm.def: Add new I/O parameter definitions.
3122 * parse.c (decode_statement): Add match for "wait" statement.
3123 (next_statement): Add case for ST_WAIT. (gfc_ascii_statement): Same.
3125 2008-04-03 Jakub Jelinek <jakub@redhat.com>
3128 * openmp.c (resolve_omp_clauses): Diagnose if a clause symbol
3131 2008-04-03 Tom Tromey <tromey@redhat.com>
3133 * Make-lang.in (fortran_OBJS): New variable.
3135 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
3137 * f95-lang.c (insert_block): Kill.
3139 2008-04-01 George Helffrich <george@gcc.gnu.org>
3141 PR fortran/35154, fortran/23057
3142 * trans-common.c (create_common): Add decl to function
3143 chain to preserve identifier scope in debug output.
3145 2008-04-01 Joseph Myers <joseph@codesourcery.com>
3147 * gfortran.texi: Include gpl_v3.texi instead of gpl.texi
3148 * Make-lang.in (GFORTRAN_TEXI): Include gpl_v3.texi instead of
3151 2008-03-30 Paul Thomas <pault@gcc.gnu.org>
3154 * resolve.c (resolve_function, resolve_call): If the procedure
3155 is elemental do not look for noncopying intrinsics.
3157 2008-03-29 Paul Thomas <pault@gcc.gnu.org>
3160 * trans-array.c (gfc_array_init_size): Set 'size' zero if
3161 negative in one dimension.
3164 * trans-expr.c (gfc_trans_string_copy): Only assign a char
3165 directly if the lhs and rhs types are the same.
3167 2008-03-28 Daniel Franke <franke.daniel@gmail.com>
3168 Paul Richard Thomas <paul.richard.thomas@gmail.com>
3171 * primary.c (match_variable): Improved matching of function
3173 * resolve.c (resolve_allocate_deallocate): Removed checks if
3174 the actual argument for STAT is a variable.
3176 2008-03-28 Tobias Burnus <burnus@net-b.de>
3178 * symbol.c (gfc_get_default_type): Fix error message; option
3179 -fallow_leading_underscore should be -fallow-leading-underscore
3181 2008-03-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3184 * iresolve.c (gfc_resolve_cshift): Check for NULL symtree in test for
3185 optional argument attribute.
3187 2008-03-27 Tom Tromey <tromey@redhat.com>
3189 * Make-lang.in: Revert automatic dependency patch.
3191 2008-03-25 Tom Tromey <tromey@redhat.com>
3193 * Make-lang.in: Remove .o targets.
3194 (fortran_OBJS): New variable.
3195 (fortran/gfortranspec.o): Move to fortran/. Reduce to variable
3197 (GFORTRAN_D_OBJS): Update.
3198 (GFORTRAN_TRANS_DEPS): Remove.
3200 2008-03-24 Paul Thomas <pault@gcc.gnu.org>
3203 * resolve.c (resolve_structure_cons): It is an error to assign
3204 NULL to anything other than a pointer or allocatable component.
3207 * resolve.c (resolve_symbol): If the symbol is a derived type,
3208 resolve the derived type. If the symbol is a derived type
3209 function, ensure that the derived type is visible in the same
3210 namespace as the function.
3212 2008-03-23 Tobias Schlüter <tobi@gcc.gnu.org>
3214 * trans.h: Use fold_build in build1_v, build2_v and build3_v
3216 * trans-openmp.c (gfc_trans_omp_critical, gfc_trans_omp_single):
3217 Don't use build2_v macro.
3219 2008-03-19 Daniel Franke <franke.daniel@gmail.com>
3222 * interface.c (gfc_procedure_use): Check for keyworded arguments in
3223 procedures without explicit interfaces.
3225 2008-03-16 Paul Thomas <pault@gcc.gnu.org>
3228 * resolve.c (check_assumed_size_reference): Only visit the
3229 first reference and look directly at the highest dimension.
3231 2008-03-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3234 * trans-array.c (gfc_conv_array_index_offset): Remove unnecessary
3237 2008-03-15 Daniel Franke <franke.daniel@gmail.com>
3240 * resolve.c (resolve_branch): Less strict and pessimistic warning
3243 2008-03-11 Paolo Bonzini <bonzini@gnu.org>
3245 * f95-lang.c (LANG_HOOKS_CLEAR_BINDING_STACK): Delete.
3246 (gfc_be_parse_file): Call clear_binding_stack from here.
3247 (gfc_clear_binding_stack): Rename to clear_binding_stack.
3249 2008-03-09 Paul Thomas <pault@gcc.gnu.org>
3252 * module.c (mio_symtree_ref): After providing a symbol for a
3253 missing equivalence member, resolve and NULL the fixups.
3255 2008-03-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3257 * invoke.texi (Error and Warning Options): Document
3260 2008-03-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3263 * trans-array.c (gfc_conv_ss_startstride): Fix the logic to avoid
3264 checking bounds of absent optional arguments.
3266 2008-03-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3269 * intrinsic.c (add_functions): Add simplification routines for
3270 ERF, DERF, ERFC and DERFC.
3271 * decl.c (gfc_match_suffix, gfc_match_subroutine): Change GNU
3272 extensions into Fortran 2008 features.
3273 * intrinsic.h (gfc_simplify_erf, gfc_simplify_erfc): New
3275 * simplify.c (gfc_simplify_erf, gfc_simplify_erfc): New functions.
3277 2008-03-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3280 * intrinsic.c (add_functions): Modify intrinsics ACOSH, ASINH,
3281 ATANH, ERF, ERFC and GAMMA. Add intrinsics BESSEL_{J,Y}{0,1,N},
3282 ERFC_SCALED, LOG_GAMMA and HYPOT.
3283 * intrinsic.h (gfc_check_hypot, gfc_simplify_hypot,
3284 gfc_resolve_hypot): New prototypes.
3285 * mathbuiltins.def: Add HYPOT builtin. Make complex versions of
3286 ACOSH, ASINH and ATANH available.
3287 * gfortran.h (GFC_ISYM_ERFC_SCALED, GFC_ISYM_HYPOT): New values.
3288 * lang.opt: Add -std=f2008 option.
3289 * libgfortran.h: Define GFC_STD_F2008.
3290 * lang-specs.h: Add .f08 and .F08 file suffixes.
3291 * iresolve.c (gfc_resolve_hypot): New function.
3292 * parse.c (parse_contained): Allow empty CONTAINS for Fortran 2008.
3293 * check.c (gfc_check_hypot): New function.
3294 * trans-intrinsic.c (gfc_intrinsic_map): Define ERFC_SCALE builtin.
3295 * options.c (set_default_std_flags): Allow Fortran 2008 by default.
3296 (form_from_filename): Add .f08 suffix.
3297 (gfc_handle_option): Handle -std=f2008 option.
3298 * simplify.c (gfc_simplify_hypot): New function.
3299 * gfortran.texi: Document Fortran 2008 status and file extensions.
3300 * intrinsic.texi: Document new BESSEL_{J,Y}{0,1,N} intrinsics,
3301 as well as HYPOT and ERFC_SCALED. Update documentation of ERF,
3302 ERFC, GAMMA, LGAMMA, ASINH, ACOSH and ATANH.
3303 * invoke.texi: Document the new -std=f2008 option.
3305 2008-03-02 Jakub Jelinek <jakub@redhat.com>
3307 * gfortranspec.c (lang_specific_driver): Update copyright notice
3310 2008-02-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3313 * expr.c (find_array_element): Modify traversing the constructor to
3314 avoid trying to access NULL memory pointed to by next for the
3315 last element. (find_array_section): Exit while loop if cons->next is
3317 * trans-expr.c (gfc_conv_scalar_char_value): Initialize gfc_typespec.
3318 (gfc_conv_function_call): Same.
3319 * decl.c (gfc_match_implicit): Same.
3320 * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Same.
3322 2008-02-28 Daniel Franke <franke.daniel@gmail.com>
3327 * lang.opt: Added -Wreturn-type.
3328 * options.c (gfc_handle_option): Recognize -Wreturn-type.
3329 * trans-decl.c (gfc_trans_deferred_vars): Emit warnings for funtions
3330 where the result value is not set.
3331 (gfc_generate_function_code): Likewise.
3332 (generate_local_decl): Emit warnings for funtions whose RESULT
3333 variable is not set.
3335 2008-02-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3338 * trans-expr.c (gfc_conv_variable): Don't build indirect
3339 references when explicit interface is mandated.
3340 * resolve.c (resolve_formal_arglist): Set attr.always_explicit
3341 on the result symbol as well as the procedure symbol.
3343 2008-02-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3346 * trans.h: Remove prototypes for gfor_fndecl_math_exponent4,
3347 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
3348 gfor_fndecl_math_exponent16.
3349 * f95-lang.c (build_builtin_fntypes): Add new function types.
3350 (gfc_init_builtin_functions): Add new builtins for nextafter,
3351 frexp, ldexp, fabs, scalbn and inf.
3352 * iresolve.c (gfc_resolve_rrspacing): Don't add hidden arguments.
3353 (gfc_resolve_scale): Don't convert type of second argument.
3354 (gfc_resolve_set_exponent): Likewise.
3355 (gfc_resolve_size): Don't add hidden arguments.
3356 * trans-decl.c: Remove gfor_fndecl_math_exponent4,
3357 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
3358 gfor_fndecl_math_exponent16.
3359 * trans-intrinsic.c (gfc_intrinsic_map): Remove intrinsics
3360 for scalbn, fraction, nearest, rrspacing, set_exponent and
3362 (gfc_conv_intrinsic_exponent): Directly call frexp.
3363 (gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_nearest,
3364 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
3365 gfc_conv_intrinsic_scale, gfc_conv_intrinsic_set_exponent): New
3367 (gfc_conv_intrinsic_function): Use the new functions above.
3369 2008-02-26 Tobias Burnus <burnus@net-b.de>
3372 * interface.c (check_operator_interface): Show better line for error
3373 messages; fix constrains for user-defined assignment operators.
3374 (gfc_extend_assign): Fix constrains for user-defined assignment
3377 2008-02-26 Tom Tromey <tromey@redhat.com>
3379 * trans-io.c (set_error_locus): Remove old location code.
3380 * trans-decl.c (gfc_set_decl_location): Remove old location code.
3381 * f95-lang.c (gfc_init): Remove test of USE_MAPPED_LOCATION.
3382 * scanner.c (gfc_gobble_whitespace): Remove old location code.
3383 (get_file): Likewise.
3384 (preprocessor_line): Likewise.
3385 (load_file): Likewise.
3386 (gfc_new_file): Likewise.
3387 * trans.c (gfc_trans_runtime_check): Remove old location code.
3388 (gfc_get_backend_locus): Likewise.
3389 (gfc_set_backend_locus): Likewise.
3390 * data.c (gfc_assign_data_value): Remove old location code.
3391 * error.c (show_locus): Remove old location code.
3392 * gfortran.h (gfc_linebuf): Remove old location code.
3393 (gfc_linebuf_linenum): Remove old-location variant.
3395 2008-02-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3398 * trans-const.c (gfc_build_string_const): Don't call gettext.
3399 (gfc_build_localized_string_const): New function.
3400 * trans-const.h (gfc_build_localized_string_const): New prototype.
3401 * trans.c (gfc_trans_runtime_check): Use
3402 gfc_build_localized_string_const instead of gfc_build_string_const.
3403 (gfc_call_malloc): Likewise.
3404 (gfc_allocate_with_status): Likewise.
3405 (gfc_allocate_array_with_status): Likewise.
3406 (gfc_deallocate_with_status): Likewise.
3407 (gfc_call_realloc): Likewise.
3408 * trans-io.c (gfc_trans_io_runtime_check): Likewise.
3410 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
3412 * arith.c: Update copyright years.
3413 * arith.h: Likewise.
3414 * array.c: Likewise.
3416 * check.c: Likewise.
3420 * dependency.c: Likewise.
3421 * dependency.h: Likewise.
3422 * dump-parse-tree.c: Likewise.
3423 * error.c: Likewise.
3425 * gfc-internals.texi: Likewise.
3426 * gfortran.h: Likewise.
3427 * gfortran.texi: Likewise.
3428 * gfortranspec.c: Likewise.
3429 * interface.c: Likewise.
3430 * intrinsic.c: Likewise.
3431 * intrinsic.h: Likewise.
3432 * intrinsic.texi: Likewise.
3433 * invoke.texi: Likewise.
3435 * iresolve.c: Likewise.
3436 * iso-c-binding.def: Likewise.
3437 * iso-fortran-env.def: Likewise.
3438 * lang-specs.h: Likewise.
3439 * lang.opt: Likewise.
3440 * libgfortran.h: Likewise.
3441 * match.c: Likewise.
3442 * match.h: Likewise.
3443 * matchexp.c: Likewise.
3445 * module.c: Likewise.
3446 * openmp.c: Likewise.
3447 * options.c: Likewise.
3448 * parse.c: Likewise.
3449 * parse.h: Likewise.
3450 * primary.c: Likewise.
3451 * resolve.c: Likewise.
3452 * scanner.c: Likewise.
3453 * simplify.c: Likewise.
3455 * symbol.c: Likewise.
3456 * target-memory.c: Likewise.
3457 * target-memory.h: Likewise.
3458 * trans-array.h: Likewise.
3459 * trans-const.h: Likewise.
3460 * trans-stmt.h: Likewise.
3461 * trans-types.c: Likewise.
3462 * trans-types.h: Likewise.
3463 * types.def: Likewise.
3465 2008-02-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3468 * simplify.c (gfc_simplify_ibclr), (gfc_simplify_ibits),
3469 (gfc_simplify_ibset): Remove call to range_check.
3470 (simplify_cmplx), (gfc_simplify_dble), (gfc_simplify_float)
3471 (gfc_simplify_real): Add call gfc_clear_ts to initialize the
3472 temporary gfc_typspec variable.
3474 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
3476 * trans-array.c (gfc_conv_descriptor_data_get,
3477 gfc_conv_descriptor_data_set_internal,
3478 gfc_conv_descriptor_data_addr, gfc_conv_descriptor_offset,
3479 gfc_conv_descriptor_dtype, gfc_conv_descriptor_dimension,
3480 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
3481 gfc_conv_descriptor_ubound, gfc_trans_create_temp_array,
3482 gfc_conv_array_transpose, gfc_grow_array,
3483 gfc_trans_array_constructor_subarray,
3484 gfc_trans_array_constructor_value, gfc_trans_scalarized_loop_end,
3485 gfc_array_init_size, gfc_array_allocate, gfc_array_deallocate,
3486 gfc_conv_array_initializer, gfc_trans_array_bounds,
3487 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
3488 gfc_get_dataptr_offset, gfc_conv_array_parameter,
3489 gfc_trans_dealloc_allocated, get_full_array_size,
3490 gfc_duplicate_allocatable, structure_alloc_comps): Use fold_buildN
3492 * trans-expr.c (gfc_conv_expr_present, gfc_conv_missing_dummy,
3493 gfc_conv_component_ref, gfc_conv_cst_int_power,
3494 gfc_conv_function_call, gfc_trans_structur_assign): Likewise.
3495 * trans-common.c (create_common): Likewise.
3496 * trans-openmp.c (gfc_trans_omp_atomic, gfc_trans_omp_do):
3498 * trans-const.c (gfc_conv_constant_to_tree): Likewise.
3499 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_do,
3500 gfc_trans_integer_select, gfc_trans_character_select,
3501 gfc_trans_forall_loop, compute_overall_iter_number,
3502 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_allocate,
3503 gfc_trans_deallocate): Likewise.
3504 * trans.c (gfc_build_addr_expr, gfc_trans_runtime_check,
3505 gfc_allocate_with_status, gfc_allocate_array_with_status,
3506 gfc_deallocate_with_status): Likewise.
3507 * f95-lang.c (gfc_truthvalue_conversion): Likewise.
3508 * trans-io.c (set_parameter_const, set_parameter_value,
3509 set_parameter_ref, set_string, set_internal_unit, io_result,
3510 set_error_locus, nml_get_addr_expr, transfer_expr): Likewise.
3511 * trans-decl.c (gfc_build_qualified_array, build_entry_thunks,
3512 gfc_get_fake_result_decl, gfc_trans_auto_character_variable,
3513 gfc_generate_function_code): Likewise.
3514 * convert.c (convert): Likewise.
3515 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
3516 build_fixbound_expr, build_fix_expr, gfc_conv_intrinsic_aint,
3517 gfc_conv_intrinsic_int, gfc_conv_intrinsic_imagpart,
3518 gfc_conv_intrinsic_conjg, gfc_conv_intrinsic_abs,
3519 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
3520 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_dprod,
3521 gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
3522 gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax,
3523 gfc_conv_intrinsic_minmax_char, gfc_conv_intrinsic_count,
3524 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_dot_product,
3525 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
3526 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_not,
3527 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
3528 gfc_conv_intrinsic_ichar, gfc_conv_intrinsic_size,
3529 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
3530 gfc_conv_allocated, gfc_conv_associated, gfc_conv_intrinsic_trim,
3531 gfc_conv_intrinsic_repeat): Likewise.
3533 2008-02-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3536 * trans-expr.c (gfc_conv_power_op): Use BUILT_IN_CPOW{F,,L}.
3537 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_CPOW{F,,L}.
3538 * trans.h (gfor_fndecl_math_cpow, gfor_fndecl_math_cpowf,
3539 gfor_fndecl_math_cpowl10, gfor_fndecl_math_cpowl16): Remove.
3540 * trans-decl.c: Likewise.
3542 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3545 * expr.c (find_array_element): Modify traversing the constructor to
3546 avoid trying to access NULL memory pointed to by next for the
3547 last element. (find_array_section): Exit while loop if cons->next is
3550 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3553 * iresolve.c (resolve_mask_arg): Add gfc_clear_ts to initialize
3555 (gfc_resolve_aint): Likewise.
3556 (gfc_resolve_anint): Likewise.
3557 (gfc_resolve_besn): Likewise.
3558 (gfc_resolve_cshift): Likewise.
3559 (gfc_resolve_ctime): Likewise.
3560 (gfc_resolve_eoshift): Likewise.
3561 (gfc_resolve_index_func): Likewise.
3562 (gfc_resolve_isatty): Likewise.
3563 (gfc_resolve_malloc): Likewise.
3564 (gfc_resolve_rrspacing): Likewise.
3565 (gfc_resolve_scale): Likewise.
3566 (gfc_resolve_set_exponent): Likewise.
3567 (gfc_resolve_spacing): Likewise.
3568 (gfc_resolve_spacing): Likewise.
3569 (gfc_resolve_fgetc): Likewise.
3570 (gfc_resolve_fputc): Likewise.
3571 (gfc_resolve_ftell): Likewise.
3572 (gfc_resolve_ttynam): Likewise.
3573 (gfc_resolve_alarm_sub): Likewise.
3574 (gfc_resolve_mvbits): Likewise.
3575 (gfc_resolve_getarg): Likewise.
3576 (gfc_resolve_signal_sub): Likewise.
3577 (gfc_resolve_exit): Likewise.
3578 (gfc_resolve_flush): Likewise.
3579 (gfc_resolve_free): Likewise.
3580 (gfc_resolve_ctime_sub): Likewise.
3581 (gfc_resolve_fgetc_sub): Likewise.
3582 (gfc_resolve_fputc_sub): Likewise.
3583 (gfc_resolve_fseek_sub): Likewise.
3584 (gfc_resolve_ftell_sub): Likewise.
3585 (gfc_resolve_ttynam_sub): Likewise.
3587 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3589 * gfc-internals.texi: Fix typos and markup nits.
3590 * gfortran.texi: Likewise.
3591 * intrinsic.texi: Likewise.
3593 2008-02-21 Richard Guenther <rguenther@suse.de>
3595 * trans-expr.c (gfc_conv_expr_op): Expand INTRINSIC_PARENTHESES
3596 as unary PAREN_EXPR for real and complex typed expressions.
3597 (gfc_conv_unary_op): Fold the built tree.
3599 2008-02-20 Tobias Burnus <burnus@net-b.de>
3602 * match.c (gfc_match_name): Improve error message for '$'.
3604 2008-02-19 Daniel Franke <franke.daniel@gmail.com>
3607 * expr.c (gfc_check_pointer_assign): Add type and kind information
3608 to type-mismatch message.
3609 (gfc_check_assign): Unify error messages.
3611 2008-02-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3614 * gfortran.texi: Create new section for unimplemented extensions.
3615 Add "STRUCTURE and RECORD" and "ENCODE and DECODE statements".
3616 Remove "smaller projects" list. Fix a few typos.
3618 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3620 * intrinsic.texi: Rename INDEX node to avoid clashing with
3621 index.html on case-insensitive systems.
3623 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3626 * trans-expr.c (gfc_conv_function_call): Force evaluation of
3629 2008-02-10 Daniel Franke <franke.daniel@gmail.com>
3632 * lang.opt: Allow '-J<dir>' next to '-J <dir>',
3633 likewise '-I <dir>' and '-I<dir>'.
3635 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3638 * Make-lang.in (f951): Add $(GMPLIBS).
3640 2008-02-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3643 * trans-common.c (build_field): Mark fields as volatile when needed.
3645 2008-02-05 Tobias Burnus <burnus@net-b.de>
3648 * data.c (gfc_assign_data_value): Only free "size" if
3649 it has not already been freed.
3651 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
3654 * array.c (match_array_element_spec): Remove check for negative
3656 (gfc_resolve_array_spec): Add check for negative size.
3658 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
3661 * data.c (gfc_assign_data_value): Add bounds check for array
3664 2008-02-04 Daniel Franke <franke.daniel@gmail.com>
3666 * resolve.c (resolve_where): Fix typo.
3667 (gfc_resolve_where_code_in_forall): Likewise.
3669 2008-02-03 Paul Thomas <pault@gcc.gnu.org>
3672 * resolve.c (resolve_allocate_deallocate): New function.
3673 (resolve_code): Call it for allocate and deallocate.
3674 * match.c (gfc_match_allocate, gfc_match_deallocate) : Remove
3675 the checking of the STAT tag and put in above new function.
3676 * primary,c (match_variable): Do not fix flavor of host
3677 associated symbols yet if the type is not known.
3679 2008-01-31 Paul Thomas <pault@gcc.gnu.org>
3682 * expr.c (gfc_check_assign): It is an error to assign
3683 to a sibling procedure.
3685 2008-01-30 Paul Thomas <pault@gcc.gnu.org>
3688 * symbol.c (gfc_delete_symtree, gfc_undo_symbols): Rename
3689 delete_symtree to gfc_delete_symtree.
3690 * gfortran.h : Add prototype for gfc_delete_symtree.
3691 * module.c (load_generic_interfaces): Transfer symbol to a
3692 unique symtree and delete old symtree, instead of renaming.
3693 (read_module): The rsym and the found symbol are the same, so
3694 the found symtree can be deleted.
3697 * decl.c (match_char_spec): Remove the constraint on deferred
3698 matching of functions and free the length expression.
3699 delete_symtree to gfc_delete_symtree.
3700 (gfc_match_type_spec): Whitespace.
3701 (gfc_match_function_decl): Defer characteristic association for
3702 all types except BT_UNKNOWN.
3703 * parse.c (decode_specification_statement): Only derived type
3704 function matching is delayed to the end of specification.
3706 2008-01-28 Tobias Burnus <burnus@net-b.de>
3709 * simplify.c (gfc_simplify_shape): Simplify rank zero arrays.
3711 2008-01-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3714 * array.c (gfc_check_constructor_type): Revert clearing the expression.
3716 2008-01-26 Tobias Burnus <burnus@net-b.de>
3719 * trans-expr.c (gfc_conv_function_call): Don't call
3720 gfc_add_interface_mapping if the expression is NULL.
3722 2008-01-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3725 * trans-array.c (gfc_trans_create_temp_array): Remove call to
3726 gcc_assert (integer_zerop (loop->from[n])).
3728 2008-01-25 Daniel Franke <franke.daniel@gmail.com>
3731 * resolve.c (resolve_where): Added check if user-defined assignment
3732 operator is an elemental subroutine.
3733 (gfc_resolve_where_code_in_forall): Likewise.
3735 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
3739 * gfortran.h: Revert changes from 2008-01-17.
3740 * match.c: Likewise.
3741 * symbol.c: Likewise.
3742 (gfc_undo_symbols): Undo namespace changes related to common blocks.
3744 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
3747 * data.c (formalize_structure_cons): Skip formalization on
3750 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
3752 * gfortran.texi (OpenMP): Extended existing documentation.
3753 (contributors): Added major contributors of 2008 that were
3755 (proposed extensions): Removed implemented items.
3757 2008-01-24 Paul Thomas <pault@gcc.gnu.org>
3760 * parse.c (next_statement) : If ST_GET_FCN_CHARACTERISTICS is
3761 seen, check for a statement label and, if present, delete it
3762 and set the locus to the start of the statement.
3764 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
3767 * trans-io.c (gfc_trans_transfer): If the array reference in a
3768 read has a vector subscript, use gfc_conv_subref_array_arg to
3769 copy back the temporary.
3771 2008-01-22 Tobias Burnus <burnus@net-b.de>
3774 * interface.c (compare_actual_formal): Fix adding type
3775 to missing_arg_type for absent optional arguments.
3777 2008-01-22 Tobias Burnus <burnus@net-b.de>
3780 * parse.c (parse_spec): Change = into ==.
3782 2008-01-22 Daniel Franke <franke.daniel@gmail.com>
3785 * expr.c (check_elemental): Fix check for valid data types.
3787 2008-01-22 Tobias Burnus <burnus@net-b.de>
3790 * scanner.c (load_line): Support <tab><digit> continuation lines.
3791 * invoke.texi (-Wtabs): Document this.
3793 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
3796 * module.c (read_module): Set use_rename attribute.
3798 2007-01-21 Tobias Burnus <burnus@net-b.de>
3801 * interface.c (compare_parameter): Improved error message
3802 for arguments of same type and mismatched kinds.
3804 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
3807 * resolve.c (resolve_entries): Do not do an array bounds check
3808 if the result symbols are the same.
3811 * module.c (read_module) : Hide the symtree of the previous
3812 version of the symbol if this symbol is renamed.
3814 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
3817 * array.c (gfc_check_constructor_type): Clear the expression ts
3818 so that the checking starts from the deepest level of array
3820 * primary.c (match_varspec): If an unknown type is changed to
3821 default character and the attempt to match a substring fails,
3822 change it back to unknown.
3825 * trans-array.c (gfc_add_loop_ss_code) : If ss->string_length is
3826 NULL for an array constructor, use the cl.length expression to
3828 (gfc_conv_array_parameter): Change call to gfc_evaluate_now to
3831 2008-01-19 Thomas Koenig <tkoenig@gcc.gnu.org>
3835 * iresolve.c (gfc_resolve_all): Remove conversion of mask
3836 argument to kind=1 by removing call to resolve_mask_arg().
3837 (gfc_resolve_any): Likewise.
3839 2008-01-19 Tobias Burnus <burnus@net-b.de>
3842 * primary.c (match_variable): Handle FL_UNKNOWN without
3843 uneducated guessing.
3844 (match_variable): Improve error message.
3846 2008-01-18 Tobias Burnus <burnus@net-b.de>
3849 * interface.c (get_expr_storage_size): Return storage size
3850 for array element designators.
3851 (compare_actual_formal): Reject unequal string sizes for
3852 assumed-shape dummy arguments. And fix error message for
3853 array-sections with vector subscripts.
3855 2008-01-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3858 * simplify.c (is_constant_array_expr): New static function that returns
3859 true if the given expression is an array and is constant.
3860 (gfc_simplify_reshape): Use new function.
3862 2008-01-17 H.J. Lu <hongjiu.lu@intel.com>
3865 * symbol.c (free_common_tree): Renamed to ...
3866 (gfc_free_common_tree): This. Remove static.
3867 (gfc_free_namespace): Updated.
3869 * gfortran.h (gfc_free_common_tree): New.
3871 * match.c (gfc_match_common): Call gfc_free_common_tree () with
3872 gfc_current_ns->common_root and set gfc_current_ns->common_root
3873 to NULL on syntax error.
3875 2008-01-18 Richard Sandiford <rsandifo@nildram.co.uk>
3878 * trans-expr.c (gfc_conv_function_call): Use proper
3879 type for returned character pointers.
3881 2008-01-17 Paul Thomas <pault@gcc.gnu.org>
3886 * decl.c : Remove gfc_function_kind_locus and
3887 gfc_function_type_locus. Add gfc_matching_function.
3888 (match_char_length): If matching a function and the length
3889 does not match, return MATCH_YES and try again later.
3890 (gfc_match_kind_spec): The same.
3891 (match_char_kind): The same.
3892 (gfc_match_type_spec): The same for numeric and derived types.
3893 (match_prefix): Rename as gfc_match_prefix.
3894 (gfc_match_function_decl): Except for function valued character
3895 lengths, defer applying kind, type and charlen info until the
3896 end of specification block.
3897 gfortran.h (gfc_statement): Add ST_GET_FCN_CHARACTERISTICS.
3898 parse.c (decode_specification_statement): New function.
3899 (decode_statement): Call it when a function has kind = -1. Set
3900 and reset gfc_matching function, as function statement is being
3902 (match_deferred_characteristics): Simplify with a single call
3903 to gfc_match_prefix. Do appropriate error handling. In any
3904 case, make sure that kind = -1 is reset or corrected.
3905 (parse_spec): Call above on seeing ST_GET_FCN_CHARACTERISTICS.
3906 Throw an error if kind = -1 after last specification statement.
3907 parse.h : Prototype for gfc_match_prefix.
3909 2008-01-16 Tobias Burnus <burnus@net-b.de>
3912 * interface.c (compare_parameter): Allow AS_DEFERRED array
3913 elements and reject attr.pointer array elemenents.
3914 (get_expr_storage_size): Return storage size of elements of
3915 assumed-shape and pointer arrays.
3917 2008-01-15 Sebastian Pop <sebastian.pop@amd.com>
3919 * f95-lang.c (gfc_init_builtin_functions): Initialize GOMP builtins
3920 for flag_tree_parallelize_loops.
3922 2008-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
3925 * iresolve.c (gfc_resolve_all): Call resolve_mask_arg.
3926 (gfc_resolve_any): Likewise.
3927 (gfc_resolve_count): Likewise. Don't append kind of
3928 argument to function name.
3930 2008-01-13 Tobias Burnus <burnus@net-b.de>
3933 * resolve.c (resolve_actual_arglist): For expressions,
3934 also check for assume-sized arrays.
3935 * interface.c (compare_parameter): Move F2003 character checks
3936 here, print error messages here, reject elements of
3937 assumed-shape array as argument to dummy arrays.
3938 (compare_actual_formal): Update for the changes above.
3940 2008-01-13 Tobias Burnus <burnus@net-b.de>
3943 * decl.c (contained_procedure): Only check directly preceeding state.
3945 2008-01-13 Tobias Burnus <burnus@net-b.de>
3948 * check.c (gfc_check_shape): Accept array ranges of
3949 assumed-size arrays.
3951 2008-01-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3954 * match.c (gfc_match_name): Don't error if leading character is a '(',
3955 just return MATCH_NO.
3957 2008-01-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3960 * trans-io.c (create_dummy_iostat): Commit the symbol.
3962 2008-01-11 Paul Thomas <pault@gcc.gnu.org>
3965 * simplify.c (gfc_simplify_transfer): Return NULL if the size
3966 of the element is unavailable and only assign character length
3967 to the result, if 'mold' is constant.
3969 2008-01-10 Paul Thomas <pault@gcc.gnu.org>
3972 * trans-array.c (gfc_trans_array_ctor_element): Use gfc_trans_string_copy
3973 to assign strings and perform bounds checks on the string length.
3974 (get_array_ctor_strlen): Remove bounds checking.
3975 (gfc_trans_array_constructor): Initialize string length checking.
3976 * trans-array.h : Add prototype for gfc_trans_string_copy.
3978 2008-01-08 Richard Guenther <rguenther@suse.de>
3981 PR tree-optimization/34683
3982 * trans-types.c (gfc_get_array_type_bounds): Use an array type
3983 with known size for accesses if that is known.
3985 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
3988 * expr.c (find_array_element): Check that the array bounds are
3989 constant before using them. Use lower, as well as upper bound.
3990 (check_restricted): Allow implied index variable.
3992 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
3995 * trans_array.c (gfc_trans_deferred_array): Do not null the
3996 data pointer on entering scope, nor deallocate it on leaving
3997 scope, if the symbol has the 'save' attribute.
4000 * trans_decl.c (gfc_finish_var_decl): Derived types with
4001 allocatable components and an initializer must be TREE_STATIC.
4003 2008-01-07 Paul Thomas <pault@gcc.gnu.org>
4006 * module.c (write_generic): Rewrite completely.
4007 (write_module): Change call to write_generic.
4009 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4012 * scanner.c (load_line): Do not count ' ' as printable when checking for
4015 2008-01-06 Paul Thomas <pault@gcc.gnu.org>
4018 * module.c (load_needed): If the namespace has no proc_name
4019 give it the module symbol.
4021 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4024 * trans-expr.c (gfc_conv_missing_dummy): Use a temporary to type convert
4025 the dummy variable expression, test for NULL, and pass the variable
4026 address to the called function.
4028 2007-01-06 Tobias Burnus <burnus@net-b.de>
4031 * match.c (gfc_match_common): Remove blank common in
4033 * resolve.c (resolve_common_vars): New function.
4034 (resolve_common_blocks): Move checks to resolve_common_vars
4035 and invoke that function.
4036 (resolve_types): Call resolve_common_vars for blank commons.
4038 2008-01-06 Tobias Burnus <burnus@net-b.de>
4041 * resolve.c (resolve_equivalence_derived): Reject derived types with
4042 default initialization if equivalenced with COMMON variable.
4044 2008-01-06 Tobias Burnus <burnus@net-b.de>
4047 * io.c (check_io_constraints): Disallow unformatted I/O for
4050 2008-01-06 Tobias Burnus <burnus@net-b.de>
4053 * resolve.c (resolve_formal_arglist): Reject dummy procedure in
4054 ELEMENTAL functions.
4056 2008-01-06 Tobias Burnus <burnus@net-b.de>
4059 * interface.c (compare_actual_formal): Reject parameter
4060 actual to intent(out) dummy.
4062 2008-01-04 Tobias Burnus <burnus@net-b.de>
4065 * primary.c (match_varspec): Gobble whitespace before