1 2008-11-24 Paul Thomas <pault@gcc.gnu.org>
4 * trans-expr.c (gfc_conv_function_call): Remove all code to
5 deallocate intent out derived types with allocatable
7 (gfc_trans_assignment_1): An assignment from a scalar to an
8 array of derived types with allocatable components, requires
9 a deep copy to each array element and deallocation of the
10 converted rhs expression afterwards.
11 * trans-array.c : Minor whitespace.
12 * trans-decl.c (init_intent_out_dt): Add code to deallocate
13 allocatable components of derived types with intent out.
14 (generate_local_decl): If these types are unused, set them
15 referenced anyway but allow the uninitialized warning.
18 * trans-expr.c (gfc_trans_subcomponent_assign): If a conversion
19 expression has a null data pointer argument, nullify the
20 allocatable component.
23 * trans-expr.c (gfc_trans_subcomponent_assign): Only nullify
24 the data pointer if the source is not a variable.
26 2008-11-23 Paul Thomas <pault@gcc.gnu.org>
29 * trans-array.c (structure_alloc_comps): Do not duplicate the
30 descriptor if this is a descriptorless array!
32 2008-11-12 Tobias Burnus <burnus@net-b.de>
35 * trans-types.c (gfc_validate_c_kind): Remove function.
36 * decl.c (gfc_match_kind_spec): Add C kind parameter check.
37 (verify_bind_c_derived_type): Remove gfc_validate_c_kind call.
38 (verify_c_interop_param): Update call.
39 * gfortran.h (verify_bind_c_derived_type): Update prototype.
40 (gfc_validate_c_kind): Remove.
41 * symbol.c (verify_bind_c_derived_type): Update verify_c_interop call.
42 * resolve.c (gfc_iso_c_func_interface): Ditto.
44 2008-11-22 Jakub Jelinek <jakub@redhat.com>
47 * trans-io.c (gfc_build_io_library_fndecls): Decrease pad size back
48 to 16 pointers plus 32 integers. Don't use max integer kind
49 alignment, only gfc_intio_kind's alignment.
50 (gfc_trans_inquire): Only set flags2 if mask2 is non-zero.
51 * ioparm.def: Fix order, bitmasks and types of inquire round, sign
52 and pending fields. Move u in dt before id.
53 * io.c (gfc_free_inquire): Free decimal and size exprs.
54 (match_inquire_element): Match size instead of matching blank twice.
55 (gfc_resolve_inquire): Resolve size.
57 2008-11-20 Jakub Jelinek <jakub@redhat.com>
60 * trans-array.c (trans_array_constructor_value,
61 gfc_build_constant_array_constructor): Fill in TREE_PURPOSE.
63 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use
65 (gfc_conv_intrinsic_size): Use gfc_index_{zero,one}_node.
68 * trans-intrinsic.c (gfc_conv_intrinsic_size): Inline 2 argument
69 size if the second argument is not optional and one argument size
72 2008-11-19 Paul Thomas <pault@gcc.gnu.org>
75 * module.c (load_equiv): Regression fix; check that equivalence
76 members come from the same module only.
78 2008-11-16 Mikael Morin <mikael.morin@tele2.fr>
81 * dependency.c (gfc_check_argument_var_dependency): Add
82 elemental check flag. Issue a warning if we find a dependency
83 but don't generate a temporary. Add the case of an elemental
84 function call as actual argument to an elemental procedure.
85 Add the case of an operator expression as actual argument
86 to an elemental procedure.
87 (gfc_check_argument_dependency): Add elemental check flag.
88 Update calls to gfc_check_argument_var_dependency.
89 (gfc_check_fncall_dependency): Add elemental check flag.
90 Update call to gfc_check_argument_dependency.
91 * trans-stmt.c (gfc_trans_call): Make call to
92 gfc_conv_elemental_dependency unconditional, but with a flag
93 whether we should check dependencies between variables.
94 (gfc_conv_elemental_dependency): Add elemental check flag.
95 Update call to gfc_check_fncall_dependency.
96 * trans-expr.c (gfc_trans_arrayfunc_assign): Update call to
97 gfc_check_fncall_dependency.
98 * resolve.c (find_noncopying_intrinsics): Update call to
99 gfc_check_fncall_dependency.
100 * dependency.h (enum gfc_dep_check): New enum.
101 (gfc_check_fncall_dependency): Update prototype.
103 2008-11-16 Mikael Morin <mikael.morin@tele2.fr>
106 * gfortran.h (gfc_namespace): Added member old_cl_list,
108 (gfc_free_charlen): Added prototype.
109 * symbol.c (gfc_free_charlen): New function.
110 (gfc_free_namespace): Use gfc_free_charlen.
111 * parse.c (next_statement): Backup gfc_current_ns->cl_list.
112 (reject_statement): Restore gfc_current_ns->cl_list.
113 Free cl_list's elements before dropping them.
115 2008-11-16 Tobias Burnus <burnus@net-b.de>
118 * trans-expr.c (gfc_map_intrinsic_function): Fix pointer access.
120 2008-11-16 Paul Thomas <pault@gcc.gnu.org>
123 * trans-array.c (gfc_trans_create_temp_array): Set the
124 loop->from to zero and the renormalisation of loop->to for all
127 2008-11-16 Paul Thomas <pault@gcc.gnu.org>
130 * trans-expr.c (gfc_free_interface_mapping): Null sym->formal
131 (gfc_add_interface_mapping): Copy the pointer to the formal
132 arglist, rather than using copy_formal_args - fixes regression.
134 2008-11-15 Paul Thomas <pault@gcc.gnu.org>
137 * trans-expr.c (gfc_add_interface_mapping): Transfer the formal
138 arglist and the always_explicit attribute if the dummy arg is a
141 2008-11-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
144 * io.c (enum format_token): For readability replace FMT_POS with FMT_T,
145 FMT_TL, and FMT_TR. (format_lex): Use new enumerators. (check_format):
146 Add check for missing positive integer.
148 2008-10-14 Paul Thomas <pault@gcc.gnu.org>
151 * trans-array.c (gfc_trans_create_temp_array): Stabilize the
153 (gfc_conv_loop_setup): Use the end expression for the loop 'to'
156 2008-11-12 Jakub Jelinek <jakub@redhat.com>
160 * trans-const.c (gfc_conv_constant_to_tree): Warn when
161 converting an integer outside of LOGICAL's range to
163 * trans-intrinsic.c (gfc_conv_intrinsic_function,
164 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer):
165 Use INTEGER_TYPE instead of BOOLEAN_TYPE for TRANSFER as
166 argument of another TRANSFER.
168 2008-11-12 Tobias Burnus <burnus@net-b.de>
171 * resolve.c (resolve_fntype): Fix private derived type checking.
173 2008-11-09 Paul Thomas <pault@gcc.gnu.org>
176 * intrinsic.c (add_functions): Reference gfc_simplify._minval
177 and gfc_simplify_maxval.
178 * intrinsic.h : Add prototypes for gfc_simplify._minval and
180 * simplify.c (min_max_choose): New function extracted from
182 (simplify_min_max): Call it.
183 (simplify_minval_maxval, gfc_simplify_minval,
184 gfc_simplify_maxval): New functions.
186 2008-11-04 Paul Thomas <pault@gcc.gnu.org>
189 * parse.c (gfc_fixup_sibling_symbols ): Fixup contained, even
190 when symbol not found.
192 2008-11-03 Tobias Burnus <burnus@net-b.de>
195 * cpp.c (gfc_cpp_add_include_path): Use BRACKET.
196 * scanner.c (add_path_to_list): Argument to add at head.
197 (gfc_add_include_path): Add new argument.
198 (gfc_add_intrinsic_modules_path) Update call.
199 (load_file): Print filename/line in the error message.
200 * gfortran.h (gfc_add_include_path): Update prototype.
201 * options.c (gfc_post_options,gfc_handle_module_path_options,
202 gfc_handle_option): Update call.
203 * lang-spec.h (F951_OPTIONS): Don't insert include path twice.
205 * arith.c (arith_error): Add -fno-range-error to the message.
207 2008-11-03 Paul Thomas <pault@gcc.gnu.org>
210 * resolve.c (resolve_actual_arglist ): Correct comparison of
211 FL_VARIABLE with e->expr_type.
212 (resolve_call): Check that host association is correct.
213 (resolve_actual_arglist ): Remove return is old_sym is use
214 associated. Only reparse expression if old and new symbols
215 have different types.
218 * resolve.c (gfc_resolve_assign_in_forall): Change error to a
221 2008-11-01 Janus Weil <janus@gcc.gnu.org>
224 * expr.c (replace_symbol): Replace all symbols which lie in the
225 formal namespace of the interface and copy their attributes.
226 * resolve.c (resolve_symbol): Add charlen to namespace.
228 2008-11-01 Steven G. Kargl <kargls@comcast.net>
231 * trans-array.c (gfc_trans_array_constructor_value): Fix comment.
232 (gfc_conv_array_initializer): Convert internal_error() to gfc_error_now.
233 * array.c: Remove GFC_MAX_AC_EXPAND macro.
234 (gfc_expand_constructor): Use gfc_option.flag_max_array_constructor.
235 * gfortran.h (gfc_option): Add flag_max_array_constructor member.
236 * lang.opt: Add -fmax-array-constructor option.
237 * expr.c (gfc_match_init_expr): Fix error message to mention new option.
238 * invoke.texi: Document new option.
239 * options.c (gfc_init_options): Set default value for new option.
240 (gfc_handle_option): Deal with commandline.
242 2008-11-01 Daniel Kraft <d@domob.eu>
245 * gfortran.h (struct gfc_code): New field `resolved_isym'.
246 * trans.h (gfc_build_memcpy_call): Made public.
247 * trans-array.h (gfc_trans_create_temp_array): New argument `initial'.
248 * intrinsic.c (gfc_intrinsic_sub_interface): Set resolved_isym.
249 * iresolve.c (create_formal_for_intents): New helper method.
250 (gfc_resolve_mvbits): Put dummy formal arglist on resolved_sym.
251 * resolve.c (resolve_call): Initialize resolved_isym to NULL.
252 * trans-array.c (gfc_trans_allocate_array_storage): New argument
253 `initial' to allow initializing the allocated storage to some initial
254 value copied from another array.
255 (gfc_trans_create_temp_array): Allow initialization of the temporary
256 with a copy of some other array by using the new extension.
257 (gfc_trans_array_constructor): Pass NULL_TREE for initial argument.
258 (gfc_conv_loop_setup): Ditto.
259 * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Ditto.
260 * trans-expr.c (gfc_conv_function_call): Ditto.
261 (gfc_build_memcpy_call): Made public.
262 * trans-stmt.c (gfc_conv_elemental_dependencies): Initialize created
263 temporary for INTENT(INOUT) arguments to the value of the mirrored
264 array and clean up the temporary as very last intructions in the created
266 * trans.c (gfc_trans_code): For EXEC_CALL, see if we have a MVBITS call
267 and enable elemental dependency checking if we have.
269 2008-11-01 Janus Weil <janus@gcc.gnu.org>
273 * gfortran.h: New function gfc_expr_replace_symbols.
274 * decl.c (match_procedure_decl): Increase reference count for interface.
275 * expr.c: New functions replace_symbol and gfc_expr_replace_symbols.
276 * resolve.c (resolve_symbol): Correctly copy array spec and char len
277 of PROCEDURE declarations from their interface.
278 * symbol.c (gfc_get_default_type): Enhanced error message.
279 (copy_formal_args): Call copy_formal_args recursively for arguments.
280 * trans-expr.c (gfc_conv_function_call): Bugfix.
282 2008-11-01 Dennis Wassel <dennis.wassel@gmail.com>
285 * fortran/check.c (gfc_check_random_seed): Check PUT size
288 2008-10-31 Mikael Morin <mikael.morin@tele2.fr>
291 * expr.c (gfc_reduce_init_expr): New function, containing checking code
292 from gfc_match_init_expr, so that checking can be deferred.
293 (gfc_match_init_expr): Use gfc_reduce_init_expr.
294 * io.c (check_io_constraints): Use gfc_reduce_init_expr instead of
295 checking that the expression is a constant.
296 * match.h (gfc_reduce_init_expr): Prototype added.
298 2008-10-31 Mikael Morin <mikael.morin@tele2.fr>
301 * resolve.c (gfc_count_forall_iterators): New function.
302 (gfc_resolve_forall): Use gfc_count_forall_iterators to evaluate
303 the needed memory amount to allocate. Don't forget to free allocated
304 memory. Add an assertion to check for memory leaks.
306 2008-10-30 Steven G. Kargl <kargls@comcast.net>
309 * fortran/arith.c (gfc_mpfr_to_mpz): Test for NaN and Inf values.
310 Remove stale comment and kludge code for MPFR 2.0.1 and older.
311 (gfc_real2int): Error on conversion of NaN or Inf.
312 (gfc_complex2int): Ditto.
313 * fortran/arith.h: Update mpfr_to_mpz prototype.
314 * fortran/simplify.c (gfc_simplify_ceiling, gfc_simplify_floor,
315 gfc_simplify_ifix, gfc_simplify_idint, simplify_nint): Update function
316 calls to include locus.
318 2008-10-30 Mikael Morin <mikael.morin@tele2.fr>
321 * trans-array.c (gfc_trans_create_temp_array): If n is less
322 than the temporary dimension, assert that loop->from is
323 zero (reverts to earlier versions). If there is at least one
324 null loop->to[n], it is a callee allocated array so set the
325 size to NULL and break.
326 (gfc_trans_constant_array_constructor): Set the offset to zero.
327 (gfc_trans_array_constructor): Remove loop shifting around the
329 (gfc_conv_loop_setup): Prefer zero-based descriptors if
330 possible. Calculate the translation from loop variables to
331 array indices if an array constructor.
333 2008-10-30 Mikael Morin <mikael.morin@tele2.fr>
336 * trans-array.c (gfc_trans_create_temp_array): If size is NULL
337 use the array bounds for loop->to.
339 2008-10-28 Tobias Burnus <burnus@net-b.de>
341 * intrinsic.texi: Update OpenMP section for OMPv3.
343 2008-10-24 Jakub Jelinek <jakub@redhat.com>
345 * Make-lang.in (check-f95-subtargets, check-fortran-subtargets): New
346 aliases for check-gfortran-subtargets.
347 (lang_checks_parallelized): Add check-gfortran.
348 (check_gfortran_parallelize): New variable.
350 2008-10-19 Paul Thomas <pault@gcc.gnu.org>
353 * dependency.c (gfc_dep_resolver ): If we find equal array
354 element references, go on to the next reference.
356 2008-10-16 Daniel Kraft <d@domob.eu>
358 * resolve.c (resolve_elemental_actual): Handle calls to intrinsic
359 subroutines correctly.
361 2008-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
363 * simplify.c: Remove MPFR_VERSION_NUM(2,3,0) conditionals.
365 2008-10-12 Daniel Kraft <d@domob.eu>
368 * expr.c (gfc_expr_check_typed): Extend permission of untyped
369 expressions to both top-level variable and basic arithmetic expressions.
371 2008-10-12 Paul Thomas <pault@gcc.gnu.org>
374 * dependency.c (gfc_are_equivalenced_arrays): Look in symbol
375 namespace rather than current namespace, if it is available.
377 2008-10-12 Steven G. Kargl <kargls@comcast.net>
380 * fortran/resolve.c (resolve_fl_variable): Simplify the
381 initializer if there is one.
383 2008-10-11 Paul Thomas <pault@gcc.gnu.org>
386 * module.c (check_for_ambiguous): Remove redundant code.
388 2008-10-09 Daniel Kraft <d@domob.eu>
391 * gfortran.h (gfc_suppress_error): Removed from header.
392 (gfc_push_suppress_errors), (gfc_pop_suppress_errors): New methods.
393 * array.c (gfc_array_size): Use new gfc_push/pop_suppress_errors
394 instead of directly changing gfc_suppress_error.
395 * intrinsic.c (gfc_intrinsic_func_interface): Ditto.
396 (gfc_intrinsic_sub_interface): Ditto.
397 * error.c (suppress_errors): Made static from `gfc_suppress_error'.
398 (gfc_push_suppress_errors), (gfc_pop_suppress_errors): New methods.
399 (gfc_notify_std), (gfc_error): Use new static name of global.
400 * expr.c (check_arglist), (check_references): New methods.
401 (check_restricted): Check arglists and references of EXPR_FUNCTIONs
402 and EXPR_VARAIBALEs, respectively. Allow PARAMETER symbols.
404 2008-10-07 Jakub Jelinek <jakub@redhat.com>
406 * f95-lang.c (poplevel): Don't clear BLOCK_VARS if functionbody.
407 * trans-decl.c (gfc_build_qualified_array): Build accurate debug type
409 (build_entry_thunks, gfc_generate_function_code,
410 gfc_generate_constructors): Ensure DECL_SAVED_TREE is a BIND_EXPR
411 with DECL_INITIAL as its BLOCK.
413 2008-10-05 Paul Thomas <pault@gcc.gnu.org>
416 * gfortran.h : Add 'error' bit field to gfc_expr structure.
417 * expr.c (check_inquiry): When checking a restricted expression
418 check that arguments are either variables or restricted.
419 (check_restricted): Do not emit error if the expression has
420 'error' set. Clean up detection of host-associated variable.
422 2008-10-05 Daniel Kraft <d@domob.eu>
425 * gfortran.h (struct gfc_typebound_proc): New flag `error'.
426 * resolve.c (update_arglist_pass): Added assertion.
427 (update_compcall_arglist): Fail early for erraneous procedures to avoid
429 (resolve_typebound_generic_call): Ignore erraneous specific targets
430 and added assertions.
431 (resolve_typebound_procedure): Set new `error' flag.
433 2008-10-04 Paul Thomas <pault@gcc.gnu.org>
436 * module.c (load_equiv): Check the module before negating the
439 2008-10-02 Steven Bosscher <steven@gcc.gnu.org>
442 * intrinsic.c (add_functions): Add LEADZ and TRAILZ as generics.
443 * intrinsic.h (gfc_simplify_leadz, gfc_simplify_trailz): New protos.
444 * gfortran.h <enum gfc_isym_id>: (GFC_ISYM_LEADZ, GFC_ISYM_TRAILZ): New.
445 * f95-lang (gfc_init_builtin_functions): Add BUILT_IN_CLZ,
446 BUILT_IN_CLZL, BUILT_IN_CLZLL, BUILT_IN_CTZ, BUILT_IN_CTZL, and
448 * trans-intrinsic.c (gfc_conv_intrinsic_leadz,
449 gfc_conv_intrinsic_trails): New code-generation functions for LEADZ
450 and TRAILZ intrinsics.
451 (gfc_conv_intrinsic_function): Use them
452 * intrinsic.texi: Add documentation for LEADZ and TRAILZ.
453 * simplify.c (gfc_simplify_leadz, gfc_simplify_trailz): New functions.
455 2008-09-30 Janus Weil <janus@gcc.gnu.org>
458 * symbol.c (check_conflict): If a symbol in a COMMON block is a
459 procedure, it must be a procedure pointer.
460 (gfc_add_in_common): Symbols in COMMON blocks may be variables or
462 * trans-types.c (gfc_sym_type): Make procedure pointers in COMMON
465 2008-09-25 Jerry DeLisle <jvdelisle@gcc.gnu.org
468 * trans-io.c (build_dt): Revert previous patch..
469 * ioparm.def: Delete IOPARM_dt_f2003.
471 2008-09-25 Tobias Burnus <burnus@net-b.de>
474 * expr.c (gfc_check_pointer_assign): Allow assignment of
476 * match.c (gfc_match_assignment,gfc_match_pointer_assignment):
477 Remove unreachable code.
479 2008-09-24 Tobias Burnus <burnus@net-b.de>
481 * options.c (set_default_std_flags,gfc_init_options):
482 Add comment: keep in sync with libgfortran.
484 2008-09-24 Tobias Burnus <burnus@net-b.de>
487 * trans-array.c (gfc_trans_deferred_array): Don't auto-deallocate
490 2008-09-23 Daniel Kraft <d@domob.eu>
493 * gfortran.h (gfc_compare_actual_formal): Removed, made private.
494 (gfc_arglist_matches_symbol): New method.
495 * interface.c (compare_actual_formal): Made static.
496 (gfc_procedure_use): Use new name of compare_actual_formal.
497 (gfc_arglist_matches_symbol): New method.
498 (gfc_search_interface): Moved code partially to new
499 gfc_arglist_matches_symbol.
500 * resolve.c (resolve_typebound_generic_call): Resolve actual arglist
501 before checking against formal and use new gfc_arglist_matches_symbol
503 (resolve_compcall): Set type-spec of generated expression.
505 2008-09-23 Tobias Burnus <burnus@net-b.de>
508 * expr.c (gfc_check_pointer_assign): Add checks for pointer
511 2008-09-22 Jerry DeLisle <jvdelisle@gcc.gnu.org
514 * trans-io.c (gfc_build_io_library_fndecls): Bump pad size.
515 (build_dt): Set mask bit for IOPARM_dt_f2003.
516 * ioparm.def: Add IOPARM_dt_f2003.
518 2008-09-22 Janus Weil <janus@gcc.gnu.org>
521 * gfortran.h (gfc_option_t): New members flag_align_commons and
523 * lang.opt: New options falign-commons and Walign-commons.
524 * invoke.texi: Documentation for new options.
525 * options.c (gfc_init_options): Initialize new options.
526 (gfc_handle_options): Handle new options.
527 * trans-common.c (translate_common): Implement new options.
528 (gfc_trans_common): Set correct locus.
530 2008-09-21 Paul Thomas <pault@gcc.gnu.org>
533 * decl.c (scalarize_intrinsic_call): Both subroutines and
534 functions can give a true for get_proc_mame's last argument so
535 remove the &&gfc_current_ns->proc_name->attr.function.
536 resolve.c (resolve_actual_arglist): Add check for recursion by
537 reference to procedure as actual argument.
539 2008-09-21 Daniel Kraft <d@domob.eu>
542 * trans.h (gfc_conv_string_length): New argument `expr'.
543 * trans-expr.c (flatten_array_ctors_without_strlen): New method.
544 (gfc_conv_string_length): New argument `expr' that is used in a new
545 special case handling if cl->length is NULL.
546 (gfc_conv_subref_array_arg): Pass expr to gfc_conv_string_length.
547 * trans-array.c (gfc_conv_expr_descriptor): Ditto.
548 (gfc_trans_auto_array_allocation): Pass NULL as new expr.
549 (gfc_trans_g77_array), (gfc_trans_dummy_array_bias): Ditto.
550 (gfc_trans_deferred_array): Ditto.
551 (gfc_trans_array_constructor): Save and restore old values of globals
552 used for bounds checking.
553 * trans-decl.c (gfc_trans_dummy_character): Ditto.
554 (gfc_trans_auto_character_variable): Ditto.
556 2008-09-21 Daniel Kraft <d@domob.eu>
558 * decl.c (match_procedure_in_type): Changed misleading error message
559 for not yet implemented PROCEDURE(interface) syntax.
561 2008-09-18 Paul Thomas <pault@gcc.gnu.org>
564 * resolve.c (resolve_fl_variable_derived): Remove derived type
565 comparison for use associated derived types. Host association
566 of a derived type will not arise if there is a local derived type
567 whose use name is the same.
570 * match.c (gfc_match_call): Use the existing symbol even if
573 2008-09-18 Daniel Kraft <d@domob.eu>
576 * trans.h (gfc_trans_runtime_error): New method.
577 (gfc_trans_runtime_error_vararg): New method.
578 (gfc_allocate_array_with_status): New argument `expr' for locus/varname.
579 (gfc_deallocate_array_with_status): Ditto.
580 * trans-array.h (gfc_array_deallocate): Ditto.
581 * trans.c (gfc_trans_runtime_error): New method.
582 (gfc_trans_runtime_error_vararg): New method, moved parts of the code
583 from gfc_trans_runtime_check here.
584 (gfc_trans_runtime_error_check): Moved code partly to new method.
585 (gfc_call_malloc): Fix tab-indentation.
586 (gfc_allocate_array_with_status): New argument `expr' and call
587 gfc_trans_runtime_error for error reporting to include locus.
588 (gfc_deallocate_with_status): Ditto.
589 * trans-stmt.c (gfc_trans_deallocate): Pass expr as new argument.
590 * trans-array.c (gfc_array_allocate): Ditto.
591 (gfc_array_deallocate): New argument `expr', passed on.
592 (gfc_trans_dealloc_allocated): Pass NULL for expr.
593 * trans-openmp.c (gfc_omp_clause_default): Ditto.
595 2008-09-18 Paul Thomas <pault@gcc.gnu.org>
599 * module.c (check_for_ambiguous): New function to test loaded
600 symbol for ambiguity with fixup symbol.
601 (read_module): Call check_for_ambiguous.
602 (write_symtree): Do not write the symtree for symbols coming
603 from an interface body.
606 * resolve.c (count_specific_procs ): New function to count the
607 number of specific procedures with the same name as the generic
608 and emit appropriate errors for and actual argument reference.
609 (resolve_assumed_size_actual): Add new argument no_formal_args.
610 Correct logic around passing generic procedures as arguments.
611 Call count_specific_procs from two locations.
612 (resolve_function): Evaluate and pass no_formal_args.
613 (resolve call): The same and clean up a bit by using csym more
617 * symbol.c (gfc_add_access): Access can be updated if use
618 associated and not private.
620 2008-09-17 Jakub Jelinek <jakub@redhat.com>
623 * trans-stmt.c (gfc_trans_do): Optimize integer type non-simple
624 do loop initialization.
626 2008-09-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
627 Tobias Burnus <burnus@net.b.de>
630 * io.c (match_vtag): Add tag name to error message.
631 (match_out_tag): Cleanup whitespace.
632 (gfc_resolve_dt): Resolve id and async tags.
634 2008-09-13 Daniel Kraft <d@domob.eu>
637 * primary.c (gfc_match_varspec): Added missing type-spec clearing
638 after wrong implicit character typing.
640 2008-09-12 Richard Guenther <rguenther@suse.de>
642 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Use
643 build_fold_addr_expr to properly mark the argument
646 2008-09-11 Daniel Kraft <d@domob.eu>
649 * simplify.c (simplify_cmplx): Added linebreak to long line.
650 * target-memory.c (gfc_convert_boz): Fix indentation.
651 (gfc_interpret_float): Set mpfr precision to right value before
654 2008-09-10 H.J. Lu <hongjiu.lu@intel.com>
656 * expr.c (find_array_element): Reformat comment.
658 2008-09-10 H.J. Lu <hongjiu.lu@intel.com>
660 * expr.c (find_array_element): Reformat.
662 2008-09-10 Tobias Burnus <burnus@net-b.de>
665 * trans-decl.c (get_proc_pointer_decl): Fix -Wunused-variable.
667 2008-09-09 Daniel Kraft <d@domob.eu>
670 * resolve.c (expression_rank): Added assertion to guard against
671 EXPR_COMPCALL expressions.
672 (resolve_compcall): Set expression's rank from the target procedure's.
674 2008-09-09 Daniel Kraft <d@domob.eu>
677 * trans-array.c (gfc_conv_array_parameter): Added assertion that the
678 symbol has an array spec.
680 2008-09-08 Daniel Kraft <d@domob.eu>
683 * trans-expr.c (gfc_add_interface_mapping): Set new_sym->as.
684 (gfc_map_intrinsic_function): Added checks against NULL bounds in
687 2008-09-08 Tobias Burnus <burnus@net.b.de>
690 * symbol.c (gfc_set_default_type): Copy char len.
692 2008-09-06 Steven G. Kargl <kargls@comcast.net>
695 * fortran/resolve.c (resolve_function): Shortcircuit for SIZE and
696 UBOUND if 2nd argument is KIND.
698 2008-09-06 Steven G. Kargl <kargls@comcast.net>
701 * resolve.c (resolve_function): An intrinsic subroutine should not be
702 called as a function.
704 2008-09-05 Daniel Kraft <d@domob.eu>
707 * resolve.c (resolve_types): Restore gfc_current_ns on exit.
708 * symbol.c (gfc_save_all): Removed blank line.
710 2008-09-05 Daniel Kraft <d@domob.eu>
713 * primary.c (gfc_match_rvalue): Removed logic to handle implicit
714 typing to a derived-type if a component reference is found.
715 (gfc_match_varspec): Moved it here.
717 2008-09-04 Richard Guenther <rguenther@suse.de>
719 * trans-array.c (gfc_conv_array_parameter): Use correct types
720 in building COND_EXPRs.
721 * trans-expr.c (gfc_conv_missing_dummy): Likewise.
722 * trans-intrinsics.c (gfc_conv_intrinsic_merge): Likewise.
724 2008-09-04 Daniel Kraft <d@domob.eu>
727 * expr.c (simplify_const_ref): Update expression's character length
728 when pulling out a substring reference.
730 2008-09-04 Ian Lance Taylor <iant@google.com>
732 * symbol.c (generate_isocbinding_symbol): Compare
733 gfc_notification_std with ERROR rather than FAILURE.
734 * resolve.c (check_assumed_size_reference): Compare array type
735 with AR_FULL rather than DIMEN_ELEMENT.
736 (resolve_actual_arglist): Compare with EXPR_VARIABLE rather than
739 2008-09-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
742 * io.c (check_format): Allow specifying precision with g0 format.
744 2008-09-02 Daniel Kraft <d@domob.eu>
746 * gfortran.h (struct gfc_namespace): New member `implicit_loc'.
747 (gfc_add_abstract): New method.
748 * decl.c (gfc_get_type_attr_spec): Match ABSTRACT attribute.
749 (gfc_match_derived_decl): Copy abstract attribute in derived symbol.
750 * dump-parse-tree.c (show_attr): Show ABSTRACT attribute as `ABSTRACT'
751 only to allow for ABSTRACT types.
752 * parse.c (parse_interface): Use new gfc_add_abstract.
753 * primary.c (gfc_match_structure_constructor): Check that no ABSTRACT
755 * resolve.c (resolve_typespec_used): New method.
756 (resolve_fl_derived): Check type in respect to ABSTRACT attribute and
757 check that no component is of an ABSTRACT type.
758 (resolve_symbol): Check that no symbol is of an ABSTRACT type.
759 (resolve_types): Check IMPLICIT declarations for ABSTRACT types.
760 * symbol.c (gfc_merge_new_implicit): Remember loci of IMPLICIT's.
761 (gfc_add_abstract): New method.
763 2008-09-01 Daniel Kraft <d@domob.eu>
766 * module.c (read_module): Initialize use_only flag on used symbols.
768 2008-09-01 Daniel Kraft <d@domob.eu>
770 * gfc-internals.texi (F2003 OOP), (Type-bound Procedures): New chapter
771 and section to document the internals of type-bound procedures.
772 (gfc_expr): Document EXPR_COMPCALL.
773 * gfortran.h (struct gfc_expr): Remove unused `derived' from compcall.
774 * dump-parse-tree.c (show_compcall): New method.
775 (show_expr): Call it for EXPR_COMPCALL.
776 (show_typebound), (show_f2k_derived): New methods.
777 (show_symbol): Call show_f2k_derived.
778 (show_code_node): Handle EXEC_COMPCALL.
779 * primary.c (gfc_match_varspec): Don't initialize removed `derived' in
780 primary->value.compcall.
782 2008-08-31 Richard Guenther <rguenther@suse.de>
784 * trans-expr.c (gfc_trans_string_copy): Use the correct types
785 to compute slen and dlen.
787 2008-08-31 Daniel Kraft <d@domob.eu>
789 * gfortran.h (enum gfc_statement): New entry `ST_GENERIC'.
790 (struct gfc_tbp_generic): New type.
791 (struct gfc_typebound_proc): Removed `target' and added union with
792 `specific' and `generic' members; new members `overridden',
793 `subroutine', `function' and `is_generic'.
794 (struct gfc_expr): New members `derived' and `name' in compcall union
795 member and changed type of `tbp' to gfc_typebound_proc.
796 (gfc_compare_interfaces), (gfc_compare_actual_formal): Made public.
797 * match.h (gfc_typebound_default_access): New global.
798 (gfc_match_generic): New method.
799 * decl.c (gfc_match_generic): New method.
800 (match_binding_attributes): New argument `generic' and handle it.
801 (match_procedure_in_type): Mark matched binding as non-generic.
802 * interface.c (gfc_compare_interfaces): Made public.
803 (gfc_compare_actual_formal): Ditto.
804 (check_interface_1), (compare_parameter): Use new public names.
805 (gfc_procedure_use), (gfc_search_interface): Ditto.
806 * match.c (match_typebound_call): Set base-symbol referenced.
807 * module.c (binding_generic): New global array.
808 (current_f2k_derived): New global.
809 (mio_typebound_proc): Handle IO of GENERIC bindings.
810 (mio_f2k_derived): Record current f2k-namespace in current_f2k_derived.
811 * parse.c (decode_statement): Handle GENERIC statement.
812 (gfc_ascii_statement): Ditto.
813 (typebound_default_access), (set_typebound_default_access): Removed.
814 (gfc_typebound_default_access): New global.
815 (parse_derived_contains): New default-access implementation and handle
816 GENERIC statements encountered.
817 * primary.c (gfc_match_varspec): Adapted to new gfc_typebound_proc
818 structure and removed check for SUBROUTINE/FUNCTION from here.
819 * resolve.c (extract_compcall_passed_object): New method.
820 (update_compcall_arglist): Use it.
821 (resolve_typebound_static): Adapted to new gfc_typebound_proc structure.
822 (resolve_typebound_generic_call): New method.
823 (resolve_typebound_call): Check target is a SUBROUTINE and handle calls
825 (resolve_compcall): Ditto (check for target being FUNCTION).
826 (check_typebound_override): Handle GENERIC bindings.
827 (check_generic_tbp_ambiguity), (resolve_typebound_generic): New methods.
828 (resolve_typebound_procedure): Handle GENERIC bindings and set new
829 attributes subroutine, function and overridden in gfc_typebound_proc.
830 (resolve_fl_derived): Ensure extended type is resolved before the
832 * st.c (gfc_free_statement): Fix bug with free'ing EXEC_COMPCALL's.
833 * symbol.c (gfc_find_typebound_proc): Adapt for GENERIC changes.
835 2008-08-29 Jan Hubicka <jh@suse.cz>
837 * parse.c (parse_interface): Silence uninitialized var warning.
839 2008-08-29 Jakub Jelinek <jakub@redhat.com>
841 * trans.h (struct lang_type): Add span.
842 (GFC_TYPE_ARRAY_SPAN): Define.
843 * trans-decl.c (gfc_get_symbol_decl): For subref array pointers,
844 copy TREE_STATIC from decl to span instead of setting it
845 unconditionally, set DECL_ARTIFICIAL, fix type of initializer
846 and set GFC_TYPE_ARRAY_SPAN on decl's type.
847 * trans-types.c (gfc_get_array_descr_info): If
848 GFC_TYPE_ARRAY_SPAN is non-NULL, use it as element size.
850 * trans-decl.c (check_constant_initializer,
851 gfc_emit_parameter_debug_info): New functions.
852 (gfc_generate_module_vars, gfc_generate_function_code): Emit
853 PARAMETERs and unreferenced variables with initializers into
856 * gfortran.h (gfc_use_list): Add where field.
857 * module.c (use_locus): New static variable.
858 (gfc_match_use): Set it.
859 (gfc_use_module): Copy it to gfc_use_list's where field.
860 * trans-decl.c (gfc_generate_module_vars): Call gfc_trans_use_stmts.
861 (gfc_trans_use_stmts): Set backend locus before calling the debug
862 hook. Allow non-VAR_DECLs to be created even for non-external
863 module. Don't emit anything so far for renames from different
867 * trans-decl.c (create_function_arglist): Set DECL_BY_REFERENCE on
868 PARM_DECLs with pointer or reference type.
870 * trans-decl.c (gfc_build_qualified_array): Build non-flat
871 array type for debug info purposes.
875 * f95-lang.c (gfc_init_ts): New function.
876 (LANG_HOOKS_INIT_TS): Define.
877 * gfortran.h (gfc_use_rename): New type, moved from module.c.
878 (gfc_get_use_rename): New macro, moved from module.c.
879 (gfc_use_list): New type.
880 (gfc_get_use_list): New macro.
881 (gfc_namespace): Add use_stmts field.
882 (gfc_free_use_stmts): New prototype.
883 * Make-lang.in (fortran/trans-decl.o): Depend on debug.h.
884 * module.c (gfc_use_rename, gfc_get_use_rename): Moved to
886 (gfc_use_module): Chain the USE statement info to
888 (gfc_free_use_stmts): New function.
889 * symbol.c (gfc_free_namespace): Call gfc_free_use_stmts.
890 * trans.h (struct module_htab_entry): New type.
891 (gfc_find_module, gfc_module_add_decl): New functions.
892 * trans.c (gfc_generate_module_code): Create NAMESPACE_DECL for
893 the module, adjust DECL_CONTEXTs of module procedures and
894 call gfc_module_add_decl for them.
895 * trans-common.c (build_common_decl): Set DECL_IGNORED_P
896 on the common variable.
897 (create_common): Set DECL_IGNORED_P for use associated vars.
898 * trans-decl.c: Include debug.h.
899 (gfc_get_symbol_decl): Set DECL_IGNORED_P on use_assoc vars from
901 (build_function_decl): Allow current_function_decl's context
902 to be a NAMESPACE_DECL.
903 (module_htab, cur_module): New variables.
904 (module_htab_do_hash, module_htab_eq, module_htab_decls_hash,
905 module_htab_decls_eq, gfc_find_module, gfc_module_add_decl): New
907 (gfc_create_module_variable): Adjust DECL_CONTEXTs of module
908 variables and types and call gfc_module_add_decl for them.
909 (gfc_generate_module_vars): Temporarily set cur_module.
910 (gfc_trans_use_stmts): New function.
911 (gfc_generate_function_code): Call it.
912 (gfc_generate_block_data): Set DECL_IGNORED_P on decl.
913 * trans-types.c (gfc_get_derived_type): Adjust DECL_CONTEXT
914 and TYPE_CONTEXT of module derived types.
916 2008-08-28 Daniel Kraft <d@domob.eu>
918 * gfortran.h (enum expr_t): New value `EXPR_COMPCALL'.
919 (gfc_get_typebound_proc): New macro.
920 (struct gfc_expr): New union-member `compcall' for EXPR_COMPCALL.
921 (enum gfc_exec_op): New value `EXEC_COMPCALL'.
922 (gfc_find_typebound_proc): New argument.
923 (gfc_copy_ref), (gfc_match_varspec): Made public.
924 * decl.c (match_procedure_in_type): Use gfc_get_typebound_proc.
925 * expr.c (free_expr0), (gfc_copy_expr): Handle EXPR_COMPCALL.
926 (gfc_copy_ref): Made public and use new name.
927 (simplify_const_ref): Use new name of gfc_copy_ref.
928 (simplify_parameter_variable): Ditto.
929 (gfc_simplify_expr): gcc_unreachable for EXPR_COMPCALL.
930 * match.c (match_typebound_call): New method.
931 (gfc_match_call): Allow for CALL's to typebound procedures.
932 * module.c (binding_passing), (binding_overriding): New variables.
933 (expr_types): Add EXPR_COMPCALL.
934 (mio_expr): gcc_unreachable for EXPR_COMPCALL.
935 (mio_typebound_proc), (mio_typebound_symtree): New methods.
936 (mio_f2k_derived): Handle type-bound procedures.
937 * primary.c (gfc_match_varspec): Made public and parse trailing
938 references to type-bound procedures; new argument `sub_flag'.
939 (gfc_match_rvalue): New name and argument of gfc_match_varspec.
940 (match_variable): Ditto.
941 * resolve.c (update_arglist_pass): New method.
942 (update_compcall_arglist), (resolve_typebound_static): New methods.
943 (resolve_typebound_call), (resolve_compcall): New methods.
944 (gfc_resolve_expr): Handle EXPR_COMPCALL.
945 (resolve_code): Handle EXEC_COMPCALL.
946 (resolve_fl_derived): New argument to gfc_find_typebound_proc.
947 (resolve_typebound_procedure): Ditto and removed not-implemented error.
948 * st.c (gfc_free_statement): Handle EXEC_COMPCALL.
949 * symbol.c (gfc_find_typebound_proc): New argument `noaccess' and
950 implement access-checking.
951 * trans-expr.c (gfc_apply_interface_mapping_to_expr): gcc_unreachable
953 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Add missing break.
954 * trans-openmp.c (gfc_trans_omp_array_reduction): Add missing
955 intialization of ref->type.
957 2008-08-28 Janus Weil <janus@gcc.gnu.org>
960 * module.c (ab_attribute,attr_bits,mio_symbol_attribute): Take care of
961 saving attr.procedure and attr.proc_ptr to the module file.
963 2008-08-25 Daniel Kraft <d@domob.eu>
965 * gfortran.h (gfc_find_component): Add new arguments.
966 * parse.c (parse_derived_contains): Check if the derived-type containing
967 the CONTAINS section is SEQUENCE/BIND(C).
968 * resolve.c (resolve_typebound_procedure): Check for name collision with
970 (resolve_fl_derived): Check for name collision with inherited
971 type-bound procedures.
972 * symbol.c (gfc_find_component): New arguments `noaccess' and `silent'.
973 (gfc_add_component): Adapt for new arguments.
974 * primary.c (match_varspec), (gfc_match_structure_constructor): Ditto.
976 2008-08-24 Tobias Burnus <burnus@net-b.de>
979 * decl.c (verify_bind_c_sym): Reject array/string returning
982 2008-08-24 Tobias Burnus <burnus@net-b.de>
985 * trans-expr.c (gfc_conv_function_call): Add string_length
986 for character-returning bind(C) functions.
988 2008-08-24 Daniel Kraft <d@domob.eu>
990 * gfortran.h (gfc_typebound_proc): New struct.
991 (gfc_symtree): New member typebound.
992 (gfc_find_typebound_proc): Prototype for new method.
993 (gfc_get_derived_super_type): Prototype for new method.
994 * parse.h (gfc_compile_state): New state COMP_DERIVED_CONTAINS.
995 * decl.c (gfc_match_procedure): Handle PROCEDURE inside derived-type
997 (gfc_match_end): Handle new context COMP_DERIVED_CONTAINS.
998 (gfc_match_private): Ditto.
999 (match_binding_attributes), (match_procedure_in_type): New methods.
1000 (gfc_match_final_decl): Rewrote to make use of new
1001 COMP_DERIVED_CONTAINS parser state.
1002 * parse.c (typebound_default_access): New global helper variable.
1003 (set_typebound_default_access): New callback method.
1004 (parse_derived_contains): New method.
1005 (parse_derived): Extracted handling of CONTAINS to new parser state
1006 and parse_derived_contains.
1007 * resolve.c (resolve_bindings_derived), (resolve_bindings_result): New.
1008 (check_typebound_override), (resolve_typebound_procedure): New methods.
1009 (resolve_typebound_procedures): New method.
1010 (resolve_fl_derived): Call new resolving method for typebound procs.
1011 * symbol.c (gfc_new_symtree): Initialize new member typebound to NULL.
1012 (gfc_find_typebound_proc): New method.
1013 (gfc_get_derived_super_type): New method.
1015 2008-08-23 Janus Weil <janus@gcc.gnu.org>
1017 * gfortran.h (gfc_component): Add field "symbol_attribute attr", remove
1018 fields "pointer", "allocatable", "dimension", "access".
1019 Remove functions "gfc_set_component_attr" and "gfc_get_component_attr".
1020 * interface.c (gfc_compare_derived_types): Ditto.
1021 * trans-array.c (gfc_array_allocate,structure_alloc_comps): Ditto.
1022 * trans-expr.c (gfc_conv_component_ref,gfc_trans_subcomponent_assign,
1023 gfc_conv_structure): Ditto.
1024 * symbol.c (gfc_find_component,free_components,gfc_set_component_attr,
1025 gfc_get_component_attr,verify_bind_c_derived_type,
1026 generate_isocbinding_symbol): Ditto.
1027 * decl.c (build_struct): Ditto.
1028 * dump-parse-tree.c (show_components): Ditto.
1029 * trans-stmt.c (gfc_trans_deallocate): Ditto.
1030 * expr.c (gfc_check_assign,gfc_check_pointer_assign,
1031 gfc_default_initializer): Ditto.
1032 * module.c (mio_component): Ditto.
1033 * trans-types.c (copy_dt_decls_ifequal,gfc_get_derived_type): Ditto.
1034 * resolve.c (has_default_initializer,resolve_structure_cons,
1035 gfc_iso_c_func_interface,find_array_spec,resolve_ref,
1036 resolve_deallocate_expr,resolve_allocate_expr,resolve_fl_derived,
1037 resolve_equivalence_derived): Ditto.
1038 * trans-io.c (transfer_expr): Ditto.
1039 * parse.c (parse_derived): Ditto.
1040 * dependency.c (gfc_check_dependency): Ditto.
1041 * primary.c (gfc_variable_attr): Ditto.
1043 2008-08-23 Tobias Burnus <burnus@net-b.de>
1046 * arith.c (gfc_arith_concat): Fix concat of kind=4 strings.
1048 2008-08-23 Tobias Burnus <burnus@net-b.de>
1051 * target-memory.c (gfc_interpret_character): Support
1054 2008-08-22 Daniel Kraft <d@domob.eu>
1057 * symbol.c (gfc_add_type): Warn on -Wsurprising if a function-result
1058 type is re-declared but neither -pedantic nor -std=f* is given and so
1060 * invoke.texi (-Wsurprising): Document this new behaviour.
1062 2008-08-22 Daniel Kraft <d@domob.eu>
1064 * gfortran.h (in_prefix): Removed from this header.
1065 * match.h (gfc_matching_prefix): Moved and renamed from `in_prefix'.
1066 * decl.c (in_prefix): Removed from here.
1067 (gfc_match_prefix): Use new name of `gfc_matching_prefix'.
1068 * symbol.c (gfc_check_symbol_typed): Ditto.
1069 * expr.c (check_typed_ns): New helper variable.
1070 (expr_check_typed_help): New helper method.
1071 (gfc_expr_check_typed): Rewrote to use gfc_traverse_expr to do the
1072 work, fixing a minor problem.
1073 * match.c (gfc_matching_prefix): New variable.
1075 2008-08-22 Daniel Kraft <d@domob.eu>
1079 * gfortran.h (in_prefix): New global.
1080 (gfc_check_symbol_typed), (gfc_check_expr_typed): New methods.
1081 * array.c (match_array_element_spec): Check that bounds-expressions
1082 don't have symbols not-yet-typed in them.
1083 * decl.c (var_element): Check that variable used is already typed.
1084 (char_len_param_value): Check that expression does not contain
1085 not-yet-typed symbols.
1086 (in_prefix): New global.
1087 (gfc_match_prefix): Record using `in_prefix' if we're at the moment
1088 parsing a prefix or not.
1089 * expr.c (gfc_expr_check_typed): New method.
1090 * parse.c (verify_st_order): New argument to disable error output.
1091 (check_function_result_typed): New helper method.
1092 (parse_spec): Check that the function-result declaration, if given in
1093 a prefix, contains no not-yet-typed symbols when the IMPLICIT rules are
1095 * symbol.c (gfc_check_symbol_typed): Check that a symbol already has
1096 a type associated to it, otherwise use the IMPLICIT rules or signal
1099 2008-08-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1101 * f95-lang.c: Update all calls to pedwarn.
1103 2008-08-18 Daniel Franke <franke.daniel@gmail.com>
1106 * gfortran.texi: Document decision on include file handling in
1109 2008-08-16 Tobias Burnus <burnus@net-b.de>
1112 * libgfortran.h: Reduce GFC_MAX_DIMENSIONS to 7.
1114 2008-08-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1117 * io.c (gfc_match_open): Enable UTF-8 in checks.
1118 * simplify.c (gfc_simplify_selected_char_kind): Enable iso_10646.
1120 2008-08-14 Janus Weil <janus@gcc.gnu.org>
1123 * symbol.c (check_conflict): Move conflict checks for (procedure,save)
1124 and (procedure,intent) to resolve_fl_procedure.
1125 * resolve.c (resolve_fl_procedure): Ditto.
1127 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1130 * f95-lang.c (gfc_mark_addressable): Use "pedwarn (0," instead of
1133 2008-08-09 Paul Thomas <pault@gcc.gnu.org>
1136 * symbol.c (gfc_add_extension): New function.
1137 * decl.c (gfc_get_type_attr_spec): Call it.
1138 (gfc_match_derived_decl): Set symbol extension attribute from
1140 * gfortran.h : Add prototype for gfc_add_extension.
1142 2008-08-08 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1145 * options.c (set_Wall): Replace set_Wunused by warn_unused.
1147 2008-08-08 Daniel Kraft <d@domob.eu>
1149 * gfortran.h (gfc_finalizer): Replaced member `procedure' by two
1150 new members `proc_sym' and `proc_tree' to store the symtree after
1152 (gfc_find_sym_in_symtree): Made public.
1153 * decl.c (gfc_match_final_decl): Adapted for new member name.
1154 * interface.c (gfc_find_sym_in_symtree): Made public.
1155 (gfc_extend_expr), (gfc_extend_assign): Changed call accordingly.
1156 * module.c (mio_finalizer), (mio_f2k_derived), (mio_full_f2k_derived):
1157 New methods for module-file IO of f2k_derived.
1158 (mio_symbol): Do IO of f2k_derived namespace.
1159 * resolve.c (gfc_resolve_finalizers): Adapted for new member name and
1160 finding the symtree for the symbol here.
1161 * symbol.c (gfc_free_finalizer): Adapted for new members.
1163 2008-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1165 * gfc-internals.texi: Update to GFDL 1.2. Do not list GPL as
1167 * gfortran.texi: Likewise.
1168 * intrinsic.texi: Do not list GPL as Invariant Section.
1169 * invoke.texi: Likewise. Update copyright years.
1171 2008-07-29 Paul Thomas <pault@gcc.gnu.org>
1173 * trans-expr.c (conv_parent_component_references): New function
1174 to build missing parent references.
1175 (gfc_conv_variable): Call it
1176 * symbol.c (gfc_add_component): Check that component name in a
1177 derived type extension does not appear in parent.
1178 (gfc_find_component): For a derived type extension, check if
1179 the component appears in the parent derived type by calling
1180 self. Separate errors for private components and private types.
1181 * decl.c (match_data_constant): Add extra arg to call to
1182 gfc_match_structure_constructor.
1183 (check_extended_derived_type): New function to check that a
1184 parent derived type exists and that it is OK for exension.
1185 (gfc_get_type_attr_spec): Add extra argument 'name' and return
1186 it if extends is specified.
1187 (gfc_match_derived_decl): Match derived type extension and
1188 build a first component of the parent derived type if OK. Add
1189 the f2k namespace if not present.
1190 * gfortran.h : Add the extension attribute.
1191 * module.c : Handle attribute 'extension'.
1192 * match.h : Modify prototypes for gfc_get_type_attr_spec and
1193 gfc_match_structure_constructor.
1194 * primary.c (build_actual_constructor): New function extracted
1195 from gfc_match_structure_constructor and modified to call self
1196 iteratively to build derived type extensions, when f2k named
1197 components are used.
1198 (gfc_match_structure_constructor): Do not throw error for too
1199 many components if a parent type is being handled. Use
1200 gfc_find_component to generate errors for non-existent or
1201 private components. Iteratively call self for derived type
1202 extensions so that parent constructor is built. If extension
1203 and components left over, throw error.
1204 (gfc_match_rvalue): Add extra arg to call to
1205 gfc_match_structure_constructor.
1207 * trans-array.c (gfc_conv_resolve_dependencies): If lhs and rhs
1208 are the same symbol, aliassing does not matter.
1210 2008-07-29 Jan Hubicka <jh@suse.cz>
1212 * options.c (gfc_post_options): Do not set flag_no_inline.
1214 2008-07-29 Daniel Kraft <d@domob.eu>
1217 * trans-intrinsic.c (conv_generic_with_optional_char_arg): New method
1218 to append a string-length even if the string argument is missing, e.g.
1220 (gfc_conv_intrinsic_function): Call the new method for EOSHIFT, PACK
1223 2008-07-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1225 * gfortran.h (try): Remove macro. Replace try with gfc_try
1227 * array.c: Likewise.
1228 * check.c: Likewise.
1234 * error.c: Likewise.
1236 * interface.c: Likewise.
1237 * intrinsic.c: Likewise.
1238 * intrinsic.h: Likewise.
1240 * match.h: Likewise.
1241 * parse.c: Likewise.
1242 * parse.h: Likewise.
1243 * resolve.c: Likewise.
1244 * scanner.c: Likewise.
1245 * simplify.c: Likewise.
1246 * symbol.c: Likewise.
1247 * trans-openmp.c: Likewise.
1248 * trans-types.c: Likewise.
1250 2008-07-28 Tobias Burnus <burnus@net-b.de>
1252 * Make-lang.in: Remove -Wno-* from fortran-warn.
1254 2008-07-28 Richard Guenther <rguenther@suse.de>
1256 Merge from gimple-tuples-branch.
1258 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
1260 * trans-expr.c: Include gimple.h instead of tree-gimple.h.
1261 * trans-array.c: Same.
1262 * trans-openmp.c: Same.
1263 * trans-stmt.c: Same.
1266 * trans-decl.c: Same.
1267 * trans-intrinsic.c: Same.
1268 * trans.c: Same. Include tree-iterator.h.
1269 * Make-lang.in (trans.o): Depend on tree-iterator.h
1271 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
1273 * trans-array.h (gfc_conv_descriptor_data_set_internal):
1274 Rename to gfc_conv_descriptor_data_set.
1275 (gfc_conv_descriptor_data_set_tuples): Remove.
1276 * trans-array.c (gfc_conv_descriptor_data_get): Rename
1277 from gfc_conv_descriptor_data_set_internal.
1278 Remove last argument to gfc_add_modify.
1279 (gfc_trans_allocate_array_storage): Rename gfc_add_modify_expr to
1281 (gfc_trans_create_temp_array): Same.
1282 (gfc_conv_array_transpose): Same.
1283 (gfc_grow_array): Same.
1284 (gfc_put_offset_into_var): Same.
1285 (gfc_trans_array_ctor_element): Same.
1286 (gfc_trans_array_constructor_subarray): Same.
1287 (gfc_trans_array_constructor_value): Same.
1288 (gfc_trans_scalarized_loop_end): Same.
1289 (gfc_array_init_size): Same.
1290 (gfc_array_allocate): Same.
1291 (gfc_trans_array_bounds): Same.
1292 (gfc_trans_auto_array_allocation): Same.
1293 (gfc_trans_g77_array): Same.
1294 (gfc_trans_dummy_array_bias): Same.
1295 (gfc_conv_expr_descriptor): Same.
1296 (structure_alloc_comps): Same.
1297 * trans-expr.c: Same.
1298 * trans-openmp.c (gfc_omp_clause_default_ctor): Same.
1299 Rename gfc_conv_descriptor_data_set_tuples to
1300 gfc_conv_descriptor_data_set.
1301 (gfc_omp_clause_copy_ctor): Change build_gimple_modify_stmt to
1303 (gfc_omp_clause_assign_op): Same.
1304 (gfc_trans_omp_array_reduction): Rename gfc_add_modify_expr to
1306 (gfc_trans_omp_atomic): Same.
1307 (gfc_trans_omp_do): Same. Change GIMPLE_MODIFY_STMT to MODIFY_EXPR.
1308 Rename gfc_add_modify_stmt to gfc_add_modify.
1309 * trans-stmt.c: Rename gfc_add_modify_expr to
1311 * trans.c: Rename gfc_add_modify_expr to
1313 (gfc_add_modify): Remove last argument.
1314 Rename GIMPLE_MODIFY_STMT to MODIFY_EXPR.
1315 * trans.h: Remove gfc_add_modify_expr, gfc_add_modify_stmt.
1316 Add prototype for gfc_add_modify.
1317 * f95-lang.c (union lang_tree_node): Rename GENERIC_NEXT to TREE_CHAIN.
1318 * trans-decl.c: Rename gfc_add_modify_stmt to gfc_add_modify.
1320 * trans-intrinsic.c: Same.
1322 2008-02-25 Aldy Hernandez <aldyh@redhat.com>
1324 * Make-lang.in (fortran-warn): Add -Wno-format.
1326 2008-02-19 Diego Novillo <dnovillo@google.com>
1328 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
1330 * fortran/Make-lang.in (fortran-warn): Remove.
1332 2007-11-22 Aldy Hernandez <aldyh@redhat.com>
1334 * trans-expr.c (gfc_trans_string_copy): Use "void *" when building a
1337 2007-11-10 Aldy Hernandez <aldyh@redhat.com>
1339 * Make-lang.in (fortran-warn): Set to -Wno-format.
1340 * trans.c (gfc_trans_code): Update comment to say GENERIC.
1341 Call tree_annotate_all_with_locus instead of annotate_all_with_locus.
1343 2008-07-27 Tobias Burnus <burnus@net-b.de>
1348 * trans.c (gfc_trans_runtime_check): Allow run-time warning besides
1350 * trans.h (gfc_trans_runtime_check): Update declaration.
1351 * trans-array.c (gfc_trans_array_ctor_element,gfc_trans_array_bound_check,
1352 gfc_conv_array_ref,gfc_conv_ss_startstride,gfc_trans_dummy_array_bias):
1353 Updated gfc_trans_runtime_check calls.
1354 (gfc_conv_array_parameter): Implement flag_check_array_temporaries,
1355 fix packing/unpacking for nonpresent optional actuals to optional
1357 * trans-array.h (gfc_conv_array_parameter): Update declaration.
1358 * trans-expr.c (gfc_conv_substring,gfc_trans_arrayfunc_assign,
1359 gfc_conv_function_call): Updated gfc_trans_runtime_check calls.
1360 (gfc_conv_function_call): Update gfc_conv_array_parameter calls.
1361 * trans-expr.c (gfc_trans_goto): Updated gfc_trans_runtime_check
1363 * trans-io.c (set_string,gfc_conv_intrinsic_repeat): Ditto.
1364 (gfc_conv_intrinsic_transfer,gfc_conv_intrinsic_loc): Same for
1365 gfc_conv_array_parameter.
1366 * trans-intrinsics.c (gfc_conv_intrinsic_bound): Ditto.
1367 * trans-decl.c (gfc_build_builtin_function_decls): Add
1368 gfor_fndecl_runtime_warning_at.
1369 * lang.opt: New option fcheck-array-temporaries.
1370 * gfortran.h (gfc_options): New flag_check_array_temporaries.
1371 * options.c (gfc_init_options, gfc_handle_option): Handle flag.
1372 * invoke.texi: New option fcheck-array-temporaries.
1374 2008-07-24 Jan Hubicka <jh@suse.cz>
1376 * fortran/options.c (gfc_post_options): Remove flag_unline_trees code.
1378 2008-07-24 Daniel Kraft <d@domob.eu>
1381 * lang.opt (Wnonstd-intrinsics): Removed option.
1382 (Wintrinsics-std), (Wintrinsic-shadow): New options.
1383 * invoke.texi (Option Summary): Removed -Wnonstd-intrinsics
1384 from the list and added -Wintrinsics-std and -Wintrinsic-shadow.
1385 (Error and Warning Options): Documented the new options and removed
1386 the documentation for -Wnonstd-intrinsics.
1387 * gfortran.h (gfc_option_t): New members warn_intrinsic_shadow and
1388 warn_intrinsics_std, removed warn_nonstd_intrinsics.
1389 (gfc_is_intrinsic): Renamed from gfc_intrinsic_name.
1390 (gfc_warn_intrinsic_shadow), (gfc_check_intrinsic_standard): New.
1391 * decl.c (match_procedure_decl): Replaced gfc_intrinsic_name by
1392 the new name gfc_is_intrinsic.
1393 (warn_intrinsic_shadow): New helper method.
1394 (gfc_match_function_decl), (gfc_match_subroutine): Call the new method
1395 warn_intrinsic_shadow to check the just-parsed procedure.
1396 * expr.c (check_init_expr): Call new gfc_is_intrinsic to check whether
1397 the function called is really an intrinsic in the selected standard.
1398 * intrinsic.c (gfc_is_intrinsic): Renamed from gfc_intrinsic_name and
1399 extended to take into account the selected standard settings when trying
1400 to find out whether a symbol is an intrinsic or not.
1401 (gfc_check_intrinsic_standard): Made public and extended.
1402 (gfc_intrinsic_func_interface), (gfc_intrinsic_sub_interface): Removed
1403 the calls to check_intrinsic_standard, this check now happens inside
1405 (gfc_warn_intrinsic_shadow): New method defined.
1406 * options.c (gfc_init_options): Initialize new warning flags to false
1407 and removed intialization of Wnonstd-intrinsics flag.
1408 (gfc_post_options): Removed logic for Wnonstd-intrinsics flag.
1409 (set_Wall): Set new warning flags and removed Wnonstd-intrinsics flag.
1410 (gfc_handle_option): Handle the new flags and removed handling of the
1411 old Wnonstd-intrinsics flag.
1412 * primary.c (gfc_match_rvalue): Replaced call to gfc_intrinsic_name by
1413 the new name gfc_is_intrinsic.
1414 * resolve.c (resolve_actual_arglist): Ditto.
1415 (resolve_generic_f), (resolve_unknown_f): Ditto.
1416 (is_external_proc): Ditto.
1417 (resolve_generic_s), (resolve_unknown_s): Ditto.
1418 (resolve_symbol): Ditto and ensure for symbols declared INTRINSIC that
1419 they are really available in the selected standard setting.
1421 2008-07-24 Daniel Kraft <d@domob.eu>
1423 * match.c (gfc_match): Add assertion to catch wrong calls trying to
1424 match upper-case characters.
1426 2008-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1429 * gfortran.h: Add "warn_array_temp" to gfc_option_t.
1430 * lang.opt: Add -Warray-temporaries.
1431 * invoke.texi: Document -Warray-temporaries
1432 * trans-array.h (gfc_trans_create_temp_array): Add argument of
1434 (gfc_conv_loop_setup): Likewise.
1435 * trans-array.c (gfc_trans_create_temp_array): If
1436 -Warray-temporaries is given and locus is present, warn about
1437 creation of array temporaries.
1438 (gfc_trans_array_constructor_subarray): Add locus to call
1439 of gfc_conv_loop_setup.
1440 (gfc_trans_array_constructor): Add where argument. Pass where
1441 argument to call of gfc_trans_create_temp_array.
1442 (gfc_add_loop_ss_code): Add where argument. Pass where argument
1443 to recursive call of gfc_add_loop_ss_code and to call of
1444 gfc_trans_array_constructor.
1445 (gfc_conv_loop_setup): Add where argument. Pass where argument
1446 to calls to gfc_add_loop_ss_code and to gfc_trans_create_temp_array.
1447 (gfc_conv_expr_descriptor): Pass location to call of
1448 gfc_conv_loop_setup.
1449 (gfc_conv_array_parameter): If -Warray-temporaries is given,
1450 warn about creation of temporary arrays.
1451 * trans-expr.c (gfc_conv_subref_array_arg): Add where argument
1452 to call to gfc_conv_loop_setup.
1453 (gfc_conv_function_call): Add where argument to call to
1454 gfc_trans_creat_temp_array.
1455 (gfc_trans_subarray_assign): Likewise.
1456 (gfc_trans_assignment_1): Add where argument to call to
1457 gfc_conv_loop_setup.
1458 * trans-stmt.c (gfc_conv_elemental_dependencies): Add where
1459 argument to call to gfc_trans_create_temp_array.
1460 (gfc_trans_call): Add where argument to call to gfc_conv_loop_setup.
1461 (generate_loop_for_temp_to_lhs): Likewise.
1462 (generate_loop_for_rhs_to_temp): Likewise.
1463 (compute_inner_temp_size): Likewise.
1464 (gfc_trans-pointer_assign_need_temp): Likewise.
1465 (gfc_evaluate_where_mask): Likewise.
1466 (gfc_trans_where_assign): Likewise.
1467 (gfc_trans_where_3): Likewise.
1468 * trans-io.c (transfer_srray_component): Add where argument
1469 to function. Add where argument to call to gfc_conv_loop_setup.
1470 (transfer_expr): Add where argument to call to
1471 transfer_array_component.
1472 (gfc_trans_transfer): Add where expression to call to
1473 gfc_conv_loop_setup.
1474 * trans-intrinsic.c (gfc_conv_intrinsic_anyall): Add
1475 where argument to call to gfc_conv_loop_setup.
1476 (gfc_conv_intrinsic_count): Likewise.
1477 (gfc_conv_intrinsic_arith): Likewise.
1478 (gfc_conv_intrinsic_dot_product): Likewise.
1479 (gfc_conv_intrinsic_minmaxloc): Likewise.
1480 (gfc_conv_intrinsic_minmaxval): Likewise.
1481 (gfc_conv_intrinsic_array_transfer): Warn about
1482 creation of temporary array.
1483 Add where argument to call to gfc_trans_create_temp_array.
1484 * options.c (gfc_init_options): Initialize gfc_option.warn_array_temp.
1485 (gfc_handle_option): Set gfc_option.warn_array_temp.
1487 2008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1490 * f95-lang.c (gfc_mark_addressable): All calls to pedwarn changed.
1492 2008-07-22 Daniel Kraft <d@domob.eu>
1495 * io.c (error_element), (format_locus): New static globals.
1496 (unexpected_element): Spelled out this message fully.
1497 (next_char): Keep track of locus when not MODE_STRING.
1498 (next_char_not_space): Remember last parsed element in error_element.
1499 (format_lex): Fix two indentation errors.
1500 (check_format): Use format_locus and possibly error_element for a
1501 slightly better error message on invalid format.
1502 (check_format_string): Set format_locus to start of the string
1503 expression used as format.
1505 2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1507 * expr.c (gfc_check_pointer_assign): Fix typo in string.
1508 * io.c (check_format): Fix typo in string. Fix comment typos.
1509 * parse.c (gfc_global_used): Likewise.
1510 * resolve.c (resolve_allocate_expr): Likewise.
1511 * symbol.c (gfc_set_default_type): Likewise.
1512 * arith.c: Fix typos in comments.
1513 * array.c: Likewise.
1516 * dependency.c: Likewise.
1517 * f95-lang.c: Likewise.
1518 * gfortran.h: Likewise.
1519 * matchexp.c: Likewise.
1520 * module.c: Likewise.
1521 * primary.c: Likewise.
1522 * scanner.c: Likewise.
1523 * trans-array.c: Likewise.
1524 * trans-common.c: Likewise.
1525 * trans-decl.c: Likewise.
1526 * trans-expr.c: Likewise.
1527 * trans-intrinsic.c: Likewise.
1528 * trans-types.c: Likewise.
1529 * trans.c: Likewise.
1530 * trans.h: Likewise.
1532 2008-07-19 Tobias Burnus <burnus@net-b.de>
1535 * matchexp.c (gfc_get_parentheses): Remove obsolete workaround,
1536 which caused the generation of wrong code.
1538 2008-07-19 Tobias Burnus <burnus@net-b.de>
1541 * scanner.c (load_file): Add argument to destinguish between
1542 true filename and displayed filename.
1543 (include_line,gfc_new_file): Adapt accordingly.
1545 2008-07-19 Tobias Burnus <burnus@net-b.de>
1547 * check.c (gfc_check_cshift,gfc_check_eoshift,gfc_check_unpack): Add rank
1548 checks for cshift's shift and eoshift's shift and boundary args.
1549 (gfc_check_unpack): Add rank and shape tests for unpack.
1551 2008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1553 * gfortran.h (new): Remove macro.
1554 * array.c (gfc_append_constructor, match_array_list,
1555 gfc_match_array_constructor): Likewise.
1556 * bbt.c (insert, gfc_insert_bbt): Likewise.
1557 * decl.c (var_element, top_var_list, top_val_list, gfc_match_data,
1558 get_proc_name): Likewise.
1559 * expr.c (gfc_copy_actual_arglist): Likewise.
1560 * interface.c (compare_actual_formal, check_new_interface,
1561 gfc_add_interface): Likewise.
1562 * intrinsic.c gfc_convert_type_warn, gfc_convert_chartype):
1564 * io.c (match_io_iterator, match_io_list): Likewise.
1565 * match.c (match_forall_header): Likewise.
1566 * matchexp.c (build_node): Likewise.
1567 * module.c (gfc_match_use): Likewise.
1568 * scanner.c (load_file): Likewise.
1569 * st.c (gfc_append_code): Likewise.
1570 * symbol.c (save_symbol_data, gfc_get_sym_tree, gfc_undo_symbols,
1571 gfc_commit_symbols): Likewise.
1572 * trans-common.c (build_field): Likewise.
1573 * trans-decl.c (gfc_finish_var_decl): Likewise.
1574 * trans-expr.c (gfc_free_interface_mapping,
1575 gfc_get_interface_mapping_charlen, gfc_add_interface_mapping,
1576 gfc_finish_interface_mapping,
1577 gfc_apply_interface_mapping_to_expr): Likewise.
1578 * trans.h (gfc_interface_sym_mapping): Likewise.
1580 2008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1582 * gfortran.h (operator): Remove macro.
1583 (gfc_namespace, gfc_expr): Avoid C++ keywords.
1584 * arith.c (eval_intrinsic, eval_intrinsic_f2, eval_intrinsic_f3):
1586 * decl.c (access_attr_decl): Likewise.
1587 * dependency.c (gfc_dep_compare_expr): Likewise.
1588 * dump-parse-tree.c (show_expr, show_uop, show_namespace):
1590 * expr.c (gfc_copy_expr, gfc_type_convert_binary,
1591 simplify_intrinsic_op, check_intrinsic_op): Likewise.
1592 * interface.c (fold_unary, gfc_match_generic_spec,
1593 gfc_match_interface, gfc_match_end_interface,
1594 check_operator_interface, check_uop_interfaces,
1595 gfc_check_interfaces, gfc_extend_expr, gfc_extend_assign,
1596 gfc_add_interface, gfc_current_interface_head,
1597 gfc_set_current_interface_head): Likewise.
1598 * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
1600 * matchexp.c (gfc_get_parentheses, build_node): Likewise.
1601 * module.c (gfc_use_rename, gfc_match_use, find_use_name_n,
1602 number_use_names, mio_expr, load_operator_interfaces, read_module,
1603 write_operator, write_module): Likewise.
1604 * openmp.c (resolve_omp_atomic): Likewise.
1605 * resolve.c (resolve_operator, gfc_resolve_character_operator,
1606 gfc_resolve_uops): Likewise.
1607 * symbol.c (free_uop_tree, gfc_free_namespace): Likewise.
1608 * trans-expr.c (gfc_conv_expr_op): Likewise.
1609 * trans-openmp.c (gfc_trans_omp_atomic): Likewise.
1611 2008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1613 * gfortran.h (protected): Remove macro.
1614 * dump-parse-tree.c (show_attr): Avoid C++ keywords.
1615 * expr.c (gfc_check_pointer_assign): Likewise.
1616 * interface.c (compare_parameter_protected): Likewise.
1617 * intrinsic.c (enum class, add_sym, add_sym_0, add_sym_1,
1618 add_sym_1s, add_sym_1m, add_sym_2, add_sym_2s, add_sym_3,
1619 add_sym_3ml, add_sym_3red, add_sym_3s, add_sym_4, add_sym_4s,
1620 add_sym_5s): Likewise.
1621 * match.c (gfc_match_assignment, gfc_match_pointer_assignment):
1623 * module.c (mio_symbol_attribute): Likewise.
1624 * primary.c (match_variable): Likewise.
1625 * resolve.c (resolve_equivalence): Likewise.
1626 * symbol.c (check_conflict, gfc_add_protected, gfc_copy_attr):
1628 * trans-types.c (gfc_get_array_type_bounds): Likewise.
1630 2008-07-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1632 * arith.c (eval_type_intrinsic0): Avoid C++ keywords.
1633 * gfortran.h (try, protected, operator, new): Likewise.
1635 2008-07-17 Tobias Burnus <burnus@net-b.de>
1639 * array.c (gfc_match_array_spec): Fix array-rank check.
1640 * resolve.c (resolve_fl_derived): Fix constentness check
1641 for the array dimensions.
1643 2008-07-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1645 * Make-lang.in (gfortranspec.o): Fix dependencies.
1647 2008-07-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1650 * io.c: Add error check for g0 edit descriptor followed by '.'.
1652 2008-07-12 Daniel Kraft <d@domob.eu>
1654 * resolve.c (resolve_fl_derived): Allow pointer components to empty
1655 derived types fixing a missing part of PR fortran/33221.
1657 2008-07-10 Daniel Kraft <d@domob.eu>
1659 * gfc-internals.texi (section gfc_expr): Created documentation about
1660 the gfc_expr internal data structure.
1662 2008-07-07 Thomas Koenig <tkoenig@gcc.gnu.org>
1665 * iresolve.c (gfc_resolve_product): Set shape of return
1667 (gfc_resolve_sum): Likewise.
1669 2008-07-07 Jakub Jelinek <jakub@redhat.com>
1672 * f95-lang.c (poplevel): Don't ever add subblocks to
1673 global_binding_level.
1675 2008-07-02 Janus Weil <janus@gcc.gnu.org>
1676 Tobias Burnus <burnus@net-b.de>
1677 Paul Thomas <pault@gcc.gnu.org>
1680 * gfortran.h (struct gfc_symbol): New member "proc_pointer".
1681 * check.c (gfc_check_associated,gfc_check_null): Implement
1683 * decl.c (match_procedure_decl): Ditto.
1684 * expr.c (gfc_check_pointer_assign,gfc_check_assign_symbol): Ditto.
1685 * interface.c (compare_actual_formal): Ditto.
1687 * match.c (gfc_match_pointer_assignment): Ditto.
1688 * parse.c (parse_interface): Ditto.
1689 * primary.c (gfc_match_rvalue,match_variable): Ditto.
1690 * resolve.c (resolve_fl_procedure): Ditto.
1691 * symbol.c (check_conflict,gfc_add_external,gfc_add_pointer,
1692 gfc_copy_attr,gen_fptr_param,build_formal_args): Ditto.
1693 * trans-decl.c (get_proc_pointer_decl,gfc_get_extern_function_decl,
1694 create_function_arglist): Ditto.
1695 * trans-expr.c (gfc_conv_variable,gfc_conv_function_val,
1696 gfc_conv_function_call,gfc_trans_pointer_assignment): Ditto.
1698 2008-07-02 Thomas Koenig <tkoenig@gcc.gnu.org>
1702 * iresolve.c (resolve_mask_arg): Don't convert mask to
1703 kind=1 logical if it is of that type already.
1705 2008-06-29 Thomas Koenig <tkoenig@gcc.gnu.org>
1708 * iresolve.c (gfc_resolve_matmul): Copy shapes
1711 2008-06-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1713 * invoke.texi: Add documentation for runtime behavior of
1716 2008-06-28 Daniel Kraft <d@domob.eu>
1718 * gfc-internals.texi (section gfc_code): Extended documentation about
1719 gfc_code in the internal datastructures chapter including details about
1720 how IF, DO and SELECT blocks look like and an example for how the
1721 block-chaining works.
1723 2008-06-25 Paul Thomas <pault@gcc.gnu.org>
1726 * interface.c (check_intents): Correct error where the actual
1727 arg was checked for a pointer argument, rather than the formal.
1729 2008-06-24 Paul Thomas <pault@gcc.gnu.org>
1732 * expr.c (gfc_check_assign): Change message and locus for
1733 error when conform == 0.
1735 2008-06-23 Jakub Jelinek <jakub@redhat.com>
1738 * cpp.c (cpp_define_builtins): Change _OPENMP value to 200805.
1740 2008-06-20 Laurynas Biveinis <laurynas.biveinis@gmail.com>
1741 Tobias Burnus <burnus@net-b.de>
1745 * scanner.c (preprocessor_line): do not call gfc_free for
1746 current_file->filename if it differs from filename.
1748 2008-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1750 * arith.c (hollerith2representation): Fix for -Wc++-compat.
1751 * array.c (gfc_get_constructor): Likewise.
1752 * decl.c (gfc_get_data_variable, gfc_get_data_value, gfc_get_data,
1753 create_enum_history, gfc_match_final_decl): Likewise.
1754 * error.c (error_char): Likewise.
1755 * expr.c (gfc_get_expr, gfc_copy_expr): Likewise.
1756 * gfortran.h (gfc_get_charlen, gfc_get_array_spec,
1757 gfc_get_component, gfc_get_formal_arglist, gfc_get_actual_arglist,
1758 gfc_get_namelist, gfc_get_omp_clauses, gfc_get_interface,
1759 gfc_get_common_head, gfc_get_dt_list, gfc_get_array_ref,
1760 gfc_get_ref, gfc_get_equiv, gfc_get_case, gfc_get_iterator,
1761 gfc_get_alloc, gfc_get_wide_string): Likewise.
1762 * interface.c (count_types_test): Likewise.
1763 * intrinsic.c (add_char_conversions, gfc_intrinsic_init_1):
1765 * io.c (gfc_match_open, gfc_match_close, match_filepos, match_io,
1766 gfc_match_inquire, gfc_match_wait): Likewise.
1767 * match.c (gfc_match, match_forall_iterator): Likewise.
1768 * module.c (gfc_get_pointer_info, gfc_get_use_rename, add_fixup,
1769 add_true_name, parse_string, write_atom, quote_string,
1770 mio_symtree_ref, mio_gmp_real, write_common_0): Likewise.
1771 * options.c (gfc_post_options): Likewise.
1772 * primary.c (match_integer_constant, match_hollerith_constant,
1773 match_boz_constant, match_real_constant,
1774 gfc_get_structure_ctor_component, gfc_match_structure_constructor): Likewise.
1775 * scanner.c (gfc_widechar_to_char, add_path_to_list,
1776 add_file_change, load_line, get_file, preprocessor_line,
1777 load_file, unescape_filename, gfc_read_orig_filename): Likewise.
1778 * simplify.c (gfc_simplify_ibits, gfc_simplify_ishft,
1779 gfc_simplify_ishftc): Likewise.
1780 * symbol.c (gfc_get_st_label, gfc_get_namespace, gfc_new_symtree,
1781 gfc_get_uop, gfc_new_symbol, save_symbol_data, gfc_get_gsymbol):
1783 * target-memory.c (gfc_target_interpret_expr): Likewise.
1784 * trans-const.c (gfc_build_wide_string_const): Likewise.
1785 * trans-expr.c (gfc_add_interface_mapping): Likewise.
1786 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
1787 gfc_conv_intrinsic_int, gfc_conv_intrinsic_lib_function,
1788 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_ctime,
1789 gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam,
1790 gfc_conv_intrinsic_minmax, gfc_conv_intrinsic_minmax_char,
1791 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_index_scan_verify,
1792 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_trim): Likewise.
1793 * trans.c (gfc_get_backend_locus): Likewise.
1794 * trans.h (gfc_get_ss): Likewise.
1796 2008-06-18 Daniel Kraft <d@domob.eu>
1798 PR fortran/36517, fortran/36492
1799 * array.c (gfc_resolve_character_array_constructor): Call
1800 gfc_set_constant_character_len with changed length-chec argument.
1801 * decl.c (gfc_set_constant_character_len): Changed array argument to
1802 be a generic length-checking argument that can be used for correct
1803 checking with typespec and in special cases where the should-be length
1804 is different from the target length.
1805 (build_struct): Call gfc_set_constant_character_len with changed length
1806 checking argument and introduced additional checks for exceptional
1807 conditions on invalid code.
1808 (add_init_expr_to_sym), (do_parm): Call gfc_set_constant_character_len
1809 with changed argument.
1810 * match.h (gfc_set_constant_character_len): Changed third argument to
1811 int for the should-be length rather than bool.
1813 2008-06-17 Daniel Kraft <d@domob.eu>
1816 * array.c (gfc_resolve_character_array_constructor): Check that all
1817 elements with constant character length have the same one rather than
1818 fixing it if no typespec is given, emit an error if they don't. Changed
1819 return type to "try" and return FAILURE for the case above.
1820 (gfc_resolve_array_constructor): Removed unneeded call to
1821 gfc_resolve_character_array_constructor in this function.
1822 * gfortran.h (gfc_resolve_character_array_constructor): Returns try.
1823 * trans-array.c (get_array_ctor_strlen): Return length of first element
1824 rather than last element.
1825 * resolve.c (gfc_resolve_expr): Handle FAILURE return from
1826 gfc_resolve_character_array_constructor.
1828 2008-06-17 Paul Thomas <pault@gcc.gnu.org>
1831 * resolve.c (add_dt_to_dt_list): New function.
1832 (resolve_fl_derived): Call new function for pointer components
1833 and when derived type resolved.
1835 2008-06-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1838 * trans-decl.c (gfc_generate_function_code): Add range_check to options
1841 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1843 * gfc-internals.texi: Expand TABs, drop indentation outside examples.
1844 * gfortran.texi: Likewise.
1845 * intrinsic.texi: Likewise.
1846 * invoke.texi: Likewise.
1848 2008-06-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1851 * trans-io.c (gfc_build_io_library_fndecls): Build declaration for
1852 transfer_character_wide which includes passing in the character kind to
1853 support wide character IO. (transfer_expr): If the kind == 4, create the
1854 argument and build the call.
1855 * gfortran.texi: Fix typo.
1857 2008-06-13 Tobias Burnus <burnus@net-b.de>
1860 * decl.c (do_parm): Handle init expression for len=*.
1862 2008-06-12 Tobias Burnus <burnus@net-b.de>
1865 * trans-intrinsic.c (gfc_conv_intrinsic_index_scan_verify):
1866 Fix passing of the BACK= argument.
1868 2008-06-10 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1870 * cpp.c: Add copyright notice.
1871 * cpp.h: Add copyright notice.
1873 2008-06-08 Janus Weil <janus@gcc.gnu.org>
1876 * decl.c (match_procedure_decl): Correctly recognize if the interface
1877 is an intrinsic procedure.
1879 2008-06-08 Tobias Burnus <burnus@net-b.de>
1882 * resolve.c (resolve_symbol): Copy more attributes for
1883 PROCEDUREs with interfaces.
1885 2008-06-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1889 * io.c (check_format): Add new error message for zero width.
1890 Use new error message for FMT_A and with READ, FMT_G. Allow
1891 FMT_G with WRITE except when -std=F95 and -std=F2003.
1893 2008-06-07 Tobias Burnus <burnus@net-b.de>
1896 * intrinsic.c (add_functions): Implement c_sizeof.
1897 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Do not
1898 create unneeded variable in the scalar case.
1899 * intrinsic.texi: Add C_SIZEOF documentation.
1901 2008-06-06 Tobias Burnus <burnus@net-b.de>
1903 * intrinsic.texi (BESSEL_J1): Fix BES(S)EL_J1 typo.
1905 2008-06-06 Jakub Jelinek <jakub@redhat.com>
1907 * scanner.c (skip_free_comments, skip_fixed_comments): Handle tabs.
1908 * parse.c (next_free): Allow tab after !$omp.
1909 (decode_omp_directive): Handle !$omp task, !$omp taskwait
1911 (case_executable): Add ST_OMP_TASKWAIT.
1912 (case_exec_markers): Add ST_OMP_TASK.
1913 (gfc_ascii_statement): Handle ST_OMP_TASK, ST_OMP_END_TASK and
1915 (parse_omp_structured_block, parse_executable): Handle ST_OMP_TASK.
1916 * gfortran.h (gfc_find_sym_in_expr): New prototype.
1917 (gfc_statement): Add ST_OMP_TASK, ST_OMP_END_TASK and ST_OMP_TASKWAIT.
1918 (gfc_omp_clauses): Add OMP_SCHED_AUTO to sched_kind,
1919 OMP_DEFAULT_FIRSTPRIVATE to default_sharing. Add collapse and
1921 (gfc_exec_op): Add EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
1922 * f95-lang.c (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1923 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP, LANG_HOOKS_OMP_CLAUSE_DTOR,
1924 LANG_HOOKS_OMP_PRIVATE_OUTER_REF): Define.
1925 * trans.h (gfc_omp_clause_default_ctor): Add another argument.
1926 (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
1927 gfc_omp_clause_dtor, gfc_omp_private_outer_ref): New prototypes.
1928 * types.def (BT_ULONGLONG, BT_PTR_ULONGLONG,
1929 BT_FN_BOOL_ULONGLONGPTR_ULONGLONGPTR,
1930 BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULLPTR_ULLPTR,
1931 BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULL_ULLPTR_ULLPTR,
1932 BT_FN_VOID_PTR_PTR, BT_PTR_FN_VOID_PTR_PTR,
1933 BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): New.
1934 (BT_BOOL): Use integer type with BOOL_TYPE_SIZE rather
1935 than boolean_type_node.
1936 * dump-parse-tree.c (gfc_show_omp_node): Handle EXEC_OMP_TASK,
1937 EXEC_OMP_TASKWAIT, OMP_SCHED_AUTO, OMP_DEFAULT_FIRSTPRIVATE,
1938 untied and collapse clauses.
1939 (gfc_show_code_node): Handle EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
1940 * trans.c (gfc_trans_code): Handle EXEC_OMP_TASK and
1942 * st.c (gfc_free_statement): Likewise.
1943 * resolve.c (gfc_resolve_blocks, resolve_code): Likewise.
1944 (find_sym_in_expr): Rename to...
1945 (gfc_find_sym_in_expr): ... this. No longer static.
1946 (resolve_allocate_expr, resolve_ordinary_assign): Adjust caller.
1947 * match.h (gfc_match_omp_task, gfc_match_omp_taskwait): New
1949 * openmp.c (resolve_omp_clauses): Allow allocatable arrays in
1950 firstprivate, lastprivate, reduction, copyprivate and copyin
1952 (omp_current_do_code): Made static.
1953 (omp_current_do_collapse): New variable.
1954 (gfc_resolve_omp_do_blocks): Compute omp_current_do_collapse,
1955 clear omp_current_do_code and omp_current_do_collapse on return.
1956 (gfc_resolve_do_iterator): Handle collapsed do loops.
1957 (resolve_omp_do): Likewise, diagnose errorneous collapsed do loops.
1958 (OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED): Define.
1959 (gfc_match_omp_clauses): Handle default (firstprivate),
1960 schedule (auto), untied and collapse (n) clauses.
1961 (OMP_DO_CLAUSES): Add OMP_CLAUSE_COLLAPSE.
1962 (OMP_TASK_CLAUSES): Define.
1963 (gfc_match_omp_task, gfc_match_omp_taskwait): New functions.
1964 * trans-openmp.c (gfc_omp_private_outer_ref): New function.
1965 (gfc_omp_clause_default_ctor): Add outer argument. For allocatable
1966 arrays allocate them with the bounds of the outer var if outer
1968 (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
1969 gfc_omp_clause_dtor): New functions.
1970 (gfc_trans_omp_array_reduction): If decl is allocatable array,
1971 allocate it with outer var's bounds in OMP_CLAUSE_REDUCTION_INIT
1972 and deallocate it in OMP_CLAUSE_REDUCTION_MERGE.
1973 (gfc_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
1974 for assumed-size arrays.
1975 (gfc_trans_omp_do): Add par_clauses argument. If dovar is
1976 present in lastprivate clause and do loop isn't simple,
1977 set OMP_CLAUSE_LASTPRIVATE_STMT. If dovar is present in
1978 parallel's lastprivate clause, change it to shared and add
1979 lastprivate clause to OMP_FOR_CLAUSES. Handle collapsed do loops.
1980 (gfc_trans_omp_directive): Adjust gfc_trans_omp_do callers.
1981 (gfc_trans_omp_parallel_do): Likewise. Move collapse clause to
1982 OMP_FOR from OMP_PARALLEL.
1983 (gfc_trans_omp_clauses): Handle OMP_SCHED_AUTO,
1984 OMP_DEFAULT_FIRSTPRIVATE, untied and collapse clauses.
1985 (gfc_trans_omp_task, gfc_trans_omp_taskwait): New functions.
1986 (gfc_trans_omp_directive): Handle EXEC_OMP_TASK and
1989 2008-06-04 Janus Weil <janus@gcc.gnu.org>
1993 * resolve.c (resolve_symbol): Correctly copy the interface for a
1994 PROCEDURE declaration.
1996 2008-06-02 Janus Weil <janus@gcc.gnu.org>
1999 * symbol.c (gfc_add_allocatable,gfc_add_dimension,
2000 gfc_add_explicit_interface): Added checks.
2001 * decl.c (attr_decl1): Added missing "var_locus".
2002 * parse.c (parse_interface): Checking for errors.
2004 2008-06-02 Daniel Kraft <d@domob.eu>
2006 * gfortran.h: New statement-type ST_FINAL for FINAL declarations.
2007 (struct gfc_symbol): New member f2k_derived.
2008 (struct gfc_namespace): New member finalizers, for use in the above
2009 mentioned f2k_derived namespace.
2010 (struct gfc_finalizer): New type defined for finalizers linked list.
2011 * match.h (gfc_match_final_decl): New function header.
2012 * decl.c (gfc_match_derived_decl): Create f2k_derived namespace on
2013 constructed symbol node.
2014 (gfc_match_final_decl): New function to match a FINAL declaration line.
2015 * parse.c (decode_statement): match-call for keyword FINAL.
2016 (parse_derived): Parse CONTAINS section and accept FINAL statements.
2017 * resolve.c (gfc_resolve_finalizers): New function to resolve (that is
2018 in this case, check) a list of finalizer procedures.
2019 (resolve_fl_derived): Call gfc_resolve_finalizers here.
2020 * symbol.c (gfc_get_namespace): Initialize new finalizers to NULL.
2021 (gfc_free_namespace): Free finalizers list.
2022 (gfc_new_symbol): Initialize new f2k_derived to NULL.
2023 (gfc_free_symbol): Free f2k_derived namespace.
2024 (gfc_free_finalizer): New function to free a single gfc_finalizer node.
2025 (gfc_free_finalizer_list): New function to free a linked list of
2026 gfc_finalizer nodes.
2028 2008-06-02 Daniel Franke <franke.daniel@gmail.com>
2032 * cpp.c (gfc_cpp_init): Do not initialize builtins if
2033 processing already preprocessed input.
2034 (gfc_cpp_preprocess): Finalize output with newline.
2036 2008-05-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2038 * intrinsic.texi: Revert wrong commit.
2040 2008-05-31 Steven G. Kargl <kargls@comcast.net>
2042 * arith.c (gfc_arith_init_1): Remove now unused r and c variables.
2043 Cleanup numerical inquiry function initialization.
2044 (gfc_arith_done_1): Replace multiple mpfr_clear() invocations with
2045 a single mpfr_clears().
2046 (gfc_check_real_range): Re-arrange logic to eliminate multiple
2047 unnecessary branching and assignments.
2048 (gfc_arith_times): Use mpfr_clears() in preference to multiple
2050 (gfc_arith_divide): Ditto.
2051 (complex_reciprocal): Eliminate now unused variables a, re, im.
2052 Cleanup the mpfr abuse. Use mpfr_clears() in preference to
2053 multiple mpfr_clear().
2054 (complex_pow): Fix comment whitespace. Use mpfr_clears() in
2055 preference to multiple mpfr_clear().
2056 * simplify.c (gfc_simplify_and): Remove blank line.
2057 (gfc_simplify_atan2): Move error checking earlier to eliminate
2058 a now unnecessay gfc_free_expr().
2059 (gfc_simplify_bessel_j0): Remove unnecessary gfc_set_model_kind().
2060 (gfc_simplify_bessel_j1): Ditto.
2061 (gfc_simplify_bessel_jn): Ditto.
2062 (gfc_simplify_bessel_y0): Ditto.
2063 (gfc_simplify_bessel_y1): Ditto.
2064 (gfc_simplify_bessel_yn): Ditto.
2065 (only_convert_cmplx_boz): Eliminate unnecessary duplicate code, and
2066 combine nested if statement rational expressions.
2067 (gfc_simplify_cos): Use mpfr_clears() in preference to multiple
2069 (gfc_simplify_exp): Ditto.
2070 (gfc_simplify_fraction): Move gfc_set_model_kind() to after the
2071 special case of 0. Use mpfr_clears() in preference to multiple
2073 (gfc_simplify_gamma): Eliminate unnecessary gfc_set_model_kind().
2074 (gfc_simplify_lgamma): Ditto.
2075 (gfc_simplify_log10): Ditto.
2076 (gfc_simplify_log): Move gfc_set_model_kind () inside switch
2077 statement. Use mpfr_clears() in preference to multiple mpfr_clear().
2078 (gfc_simplify_mod): Eliminate now unused variables quot, iquot,
2079 and term. Simplify the mpfr magic.
2080 (gfc_simplify_modulo): Ditto.
2081 (gfc_simplify_nearest): Eliminate unnecessary gfc_set_model_kind().
2082 (gfc_simplify_scale): Use mpfr_clears() in preference to multiple
2084 (gfc_simplify_sin): Ditto
2085 (gfc_simplify_sqrt): Ditto
2086 (gfc_simplify_set_exponent): Move gfc_set_model_kind() to after the
2087 special case of 0. Use mpfr_clears() in preference to multiple
2090 2008-05-29 Daniel Franke <franke.daniel@gmail.com>
2093 * Make-lang.in (F95_OBJS): Added dependency on FORTRAN_TARGET_OBJS.
2095 2008-05-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2097 * scanner.c (load_line): Add first_char argument. Don't call ungetc.
2098 (gfc_read_orig_filename): Adjust call to load_line. Don't call
2100 (load_file): Adjust call to load_line.
2102 2008-05-28 Janus Weil <janus@gcc.gnu.org>
2106 * interface.c (gfc_procedure_use): Enable argument checking for
2107 external procedures with explicit interface.
2108 * symbol.c (check_conflict): Fix conflict checking for externals.
2109 (copy_formal_args): Fix handling of arrays.
2110 * resolve.c (resolve_specific_f0, resolve_specific_s0): Fix handling
2112 * parse.c (parse_interface): Non-abstract INTERFACE statement implies
2115 2008-05-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2118 * intrinsic.c (gfc_convert_chartype): Don't mark conversion
2120 * trans-array.c (gfc_trans_array_ctor_element): Divide element
2121 size by the size of one character to obtain length.
2122 * iresolve.c (gfc_resolve_cshift): Call the _char4 variant when
2124 (gfc_resolve_eoshift): Likewise.
2125 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Minor beautification.
2126 (gfc_conv_intrinsic_fdate): Minor beautification.
2127 (gfc_conv_intrinsic_ttynam): Minor beautification.
2128 (gfc_conv_intrinsic_minmax_char): Allow all character kinds.
2129 (size_of_string_in_bytes): New function.
2130 (gfc_conv_intrinsic_size): Call size_of_string_in_bytes for
2131 character expressions.
2132 (gfc_conv_intrinsic_sizeof): Likewise.
2133 (gfc_conv_intrinsic_array_transfer): Likewise.
2134 (gfc_conv_intrinsic_trim): Allow all character kinds. Minor
2136 (gfc_conv_intrinsic_repeat): Fix comment typo.
2137 * simplify.c (gfc_convert_char_constant): Take care of conversion
2138 of array constructors.
2140 2008-05-27 Tobias Burnus <burnus@net-b.de>
2143 * trans-array.c (gfc_set_loop_bounds_from_array_spec):
2144 Add missing fold_convert.
2146 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
2148 * fortran/cpp.c (cpp_define_builtins): Remove usage of TARGET_* macros,
2149 added FIXME instead.
2151 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
2154 * lang.opt (A, C, CC, D, E, H, P, U, cpp, d, fworking-directory,
2155 imultilib, iprefix, iquote, isysroot, isystem, nocpp, nostdinc,
2156 o, undef, v): New options.
2157 * options.c (gfc_init_options): Also initialize preprocessor
2159 (gfc_post_options): Also handle post-initialization of preprocessor
2161 (gfc_handle_option): Check if option is a preprocessor option.
2162 If yes, let gfc_cpp_handle_option() handle the option.
2163 * lang-specs.h: Reorganized to handle new options.
2164 * scanner.c (gfc_new_file): Read temporary file instead of
2165 input source if preprocessing is enabled.
2166 * f95-lang.c (gfc_init): Initialize preprocessor.
2167 (gfc_finish): Clean up preprocessor.
2170 * Make-lang.in: Added new objects and dependencies.
2171 * gfortran.texi: Updated section "Preprocessing and
2172 conditional compilation".
2173 * invoke.texi: Added new section "Preprocessing Options",
2174 listed and documented the preprocessing options handled
2177 2008-05-25 Tobias Burnus <burnus@net-b.de>
2180 * trans-expr.c (gfc_conv_function_call): Remove library
2181 call for c_f_pointer with scalar Fortran pointers and for
2184 2008-05-21 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2187 * iresolve.c (check_charlen_present): Don't force the rank to 1.
2189 2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2192 * trans-expr.c (gfc_conv_string_tmp): Pick the correct type for
2193 the temporary variable.
2195 2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2197 * simplify.c (gfc_simplify_dble, gfc_simplify_real): Initialize
2198 result variable to avoid warnings.
2200 2008-05-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2202 * intrinsic.c (char_conversions, ncharconv): New static variables.
2203 (find_char_conv): New function.
2204 (add_functions): Add simplification functions for ADJUSTL and
2205 ADJUSTR. Don't check the kind of their argument. Add checking for
2206 LGE, LLE, LGT and LLT.
2207 (add_subroutines): Fix argument type for SLEEP. Fix argument name
2209 (add_char_conversions): New function.
2210 (gfc_intrinsic_init_1): Call add_char_conversions.
2211 (gfc_intrinsic_done_1): Free char_conversions.
2212 (check_arglist): Use kind == 0 as a signal that we don't want
2213 the kind value to be checked.
2214 (do_simplify): Also simplify character functions.
2215 (gfc_convert_chartype): New function
2216 * trans-array.c (gfc_trans_array_ctor_element): Don't force the
2217 use of default character type.
2218 (gfc_trans_array_constructor_value): Likewise.
2219 (get_array_ctor_var_strlen): Use integer kind to build an integer
2220 instead of a character kind!
2221 (gfc_build_constant_array_constructor): Don't force the use of
2222 default character type.
2223 (gfc_conv_loop_setup): Likewise.
2224 * trans-expr.c (gfc_conv_string_tmp): Don't force the use of
2225 default character type. Allocate enough memory for wide strings.
2226 (gfc_conv_concat_op): Make sure operand kind are the same.
2227 (string_to_single_character): Remove gfc_ prefix. Reindent.
2228 Don't force the use of default character type.
2229 (gfc_conv_scalar_char_value): Likewise.
2230 (gfc_build_compare_string): Call string_to_single_character.
2231 (fill_with_spaces): New function
2232 (gfc_trans_string_copy): Add kind arguments. Use them to deal
2233 with wide character kinds.
2234 (gfc_conv_statement_function): Whitespace fix. Call
2235 gfc_trans_string_copy with new kind arguments.
2236 (gfc_conv_substring_expr): Call gfc_build_wide_string_const
2237 instead of using gfc_widechar_to_char.
2238 (gfc_conv_string_parameter): Don't force the use of default
2240 (gfc_trans_scalar_assign): Pass kind args to gfc_trans_string_copy.
2241 * intrinsic.h (gfc_check_lge_lgt_lle_llt, gfc_convert_char_constant,
2242 gfc_resolve_adjustl, gfc_resolve_adjustr): New prototypes.
2243 * decl.c (gfc_set_constant_character_len): Don't assert the
2244 existence of a single character kind.
2245 * trans-array.h (gfc_trans_string_copy): New prototype.
2246 * gfortran.h (gfc_check_character_range, gfc_convert_chartype):
2248 * error.c (print_wide_char_into_buffer): New function lifting
2249 code from gfc_print_wide_char. Fix order to output '\x??' instead
2251 (gfc_print_wide_char): Call print_wide_char_into_buffer.
2252 (show_locus): Call print_wide_char_into_buffer with buffer local
2254 * trans-const.c (gfc_build_wide_string_const): New function.
2255 (gfc_conv_string_init): Deal with wide characters strings
2257 (gfc_conv_constant_to_tree): Call gfc_build_wide_string_const.
2258 * trans-stmt.c (gfc_trans_label_assign): Likewise.
2259 (gfc_trans_character_select): Deal with wide strings.
2260 * expr.c (gfc_check_assign): Allow conversion between character
2261 kinds on assignment.
2262 * trans-const.h (gfc_build_wide_string_const): New prototype.
2263 * trans-types.c (gfc_get_character_type_len_for_eltype,
2264 gfc_get_character_type_len): Create too variants of the old
2265 gfc_get_character_type_len, one getting kind argument and the
2266 other one directly taking a type tree.
2267 * trans.h (gfor_fndecl_select_string_char4,
2268 gfor_fndecl_convert_char1_to_char4,
2269 gfor_fndecl_convert_char4_to_char1): New prototypes.
2270 * trans-types.h (gfc_get_character_type_len_for_eltype): New
2272 * resolve.c (resolve_operator): Exit early when kind mismatches
2273 are detected, because that makes us issue an error message later.
2274 (validate_case_label_expr): Fix wording of error message.
2275 * iresolve.c (gfc_resolve_adjustl, gfc_resolve_adjustr): New
2277 (gfc_resolve_pack): Call _char4 variants of library function
2278 when dealing with wide characters.
2279 (gfc_resolve_reshape): Likewise.
2280 (gfc_resolve_spread): Likewise.
2281 (gfc_resolve_transpose): Likewise.
2282 (gfc_resolve_unpack): Likewise.
2283 * target-memory.c (size_character): Take character kind bit size
2284 correctly into account (not that it changes anything for now, but
2286 (gfc_encode_character): Added gfc_ prefix. Encoding each
2287 character of a string by calling native_encode_expr for the
2288 corresponding unsigned integer.
2289 (gfc_target_encode_expr): Add gfc_ prefix to encode_character.
2290 * trans-decl.c (gfc_build_intrinsic_function_decls): Build
2291 gfor_fndecl_select_string_char4, gfor_fndecl_convert_char1_to_char4
2292 and gfor_fndecl_convert_char4_to_char1.
2293 * target-memory.h (gfc_encode_character): New prototype.
2294 * arith.c (gfc_check_character_range): New function.
2295 (eval_intrinsic): Allow non-default character kinds.
2296 * check.c (gfc_check_access_func): Only allow default
2297 character kind arguments.
2298 (gfc_check_chdir): Likewise.
2299 (gfc_check_chdir_sub): Likewise.
2300 (gfc_check_chmod): Likewise.
2301 (gfc_check_chmod_sub): Likewise.
2302 (gfc_check_lge_lgt_lle_llt): New function.
2303 (gfc_check_link): Likewise.
2304 (gfc_check_link_sub): Likewise.
2305 (gfc_check_symlnk): Likewise.
2306 (gfc_check_symlnk_sub): Likewise.
2307 (gfc_check_rename): Likewise.
2308 (gfc_check_rename_sub): Likewise.
2309 (gfc_check_fgetputc_sub): Likewise.
2310 (gfc_check_fgetput_sub): Likewise.
2311 (gfc_check_stat): Likewise.
2312 (gfc_check_stat_sub): Likewise.
2313 (gfc_check_date_and_time): Likewise.
2314 (gfc_check_ctime_sub): Likewise.
2315 (gfc_check_fdate_sub): Likewise.
2316 (gfc_check_gerror): Likewise.
2317 (gfc_check_getcwd_sub): Likewise.
2318 (gfc_check_getarg): Likewise.
2319 (gfc_check_getlog): Likewise.
2320 (gfc_check_hostnm): Likewise.
2321 (gfc_check_hostnm_sub): Likewise.
2322 (gfc_check_ttynam_sub): Likewise.
2323 (gfc_check_perror): Likewise.
2324 (gfc_check_unlink): Likewise.
2325 (gfc_check_unlink_sub): Likewise.
2326 (gfc_check_system_sub): Likewise.
2327 * primary.c (got_delim): Perform correct character range checking
2329 * trans-intrinsic.c (gfc_conv_intrinsic_conversion): Generate
2330 calls to library functions convert_char4_to_char1 and
2331 convert_char1_to_char4 for character conversions.
2332 (gfc_conv_intrinsic_char): Allow all character kings.
2333 (gfc_conv_intrinsic_strcmp): Fix whitespace.
2334 (gfc_conv_intrinsic_repeat): Take care of all character kinds.
2335 * intrinsic.texi: For all GNU intrinsics accepting character
2336 arguments, mention that they're restricted to the default kind.
2337 * simplify.c (simplify_achar_char): New function.
2338 (gfc_simplify_achar, gfc_simplify_char): Call simplify_achar_char.
2339 gfc_simplify_ichar): Don't error out for wide characters.
2340 (gfc_convert_char_constant): New function.
2342 2008-05-18 Steven G. Kargl <kargls@comcast.net>
2345 * symbol.c (check_conflict): Issue errors for abuse of PUBLIC, PRIVATE,
2347 * resolve.c (gfc_verify_binding_labels): Fix NULL pointer dereference.
2349 2008-05-17 Tobias Burnus <burnus@net-b.de>
2351 * intrinsic.texi: Correct description of GET_COMMAND_ARGUMENT
2352 and GET_ENVIRONMENT_VARIABLE; fix keyword= name for GETENV,
2353 GETLOG, GMTIME, HOSTNM, IRAND, ITIME, KILL.
2354 Move LOG_GAMMA after LOG10.
2356 2008-05-17 Tobias Burnus <burnus@net-b.de>
2358 * intrinsic.c (add_functions): Change FLUSH(C) to FLUSH(UNIT).
2359 * intrinsic.texi: Change INTEGER(*) to INTEGER; fix keyword= name for
2360 ABS, ADJUSTL, AINT, ALLOCATED, ANINT, ASSOCIATED, C_ASSOCIATED,
2361 CEILING, DBLE, DFLOAT, DOT_PRODUCT, DREAL, FLOAT, FLOOR, GET_COMMAND.
2363 2008-05-16 Paul Thomas <pault@gcc.gnu.org>
2367 * trans-stmt.c (gfc_trans_where): Tighten up the dependency
2368 check for calling gfc_trans_where_3.
2371 * trans-stmt.c (gfc_trans_where_2): Set the mask size to zero
2372 if it is calculated to be negative.
2375 * trans-stmt.c (gfc_trans_where_3, gfc_trans_where_assign): Set
2376 ss->where for scalar right hand sides.
2377 * trans-array.c (gfc_add_loop_ss_code): If ss->where is set do
2378 not evaluate scalars outside the loop. Clean up whitespace.
2379 * trans.h : Add a bitfield 'where' to gfc_ss.
2381 2008-05-16 Tobias Burnus <burnus@net-b.de>
2383 * libgfortran.h: Increase GFC_MAX_DIMENSIONS to 15.
2384 * array.c (gfc_match_array_spec): Error with -std=f2003 if rank > 7.
2386 2008-04-16 Daniel Kraft <d@domob.eu>
2389 * gfortran.h: Added field "length_from_typespec" to gfc_charlength.
2390 * aray.c (gfc_match_array_constructor): Added code to parse typespec.
2391 (check_element_type, check_constructor_type, gfc_check_constructor_type):
2392 Extended to support explicit typespec on constructor.
2393 (gfc_resolve_character_array_constructor): Pad strings correctly for
2394 explicit, constant character length.
2395 * trans-array.c: New static global variable "typespec_chararray_ctor"
2396 (gfc_trans_array_constructor): New code to support explicit but dynamic
2399 2008-05-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2402 * decl.c (match_attr_spec): Check for matching pairs of parenthesis.
2403 * expr.c (gfc_specification_expr): Supplement the error message with the
2404 type that was found.
2405 * resolve.c (gfc_resolve_index): Likewise.
2406 * match.c (gfc_match_parens): Clarify error message with "at or before".
2407 (gfc_match_do): Check for matching pairs of parenthesis.
2409 2008-05-16 Tobias Burnus <burnus@net-b.de
2411 * intrinsic.texi: Write Fortran 77/90/95 instead of F77/90/95;
2412 add missing KIND argument to ACHAR and NINT; and state that
2413 the KIND argument is a F2003 extension for ACHAR, COUNT, IACHAR,
2414 ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND, VERIFY.
2416 2008-05-16 Daniel Kraft <d@domob.eu>
2418 * primary.c: New private structure "gfc_structure_ctor_component".
2419 (gfc_free_structure_ctor_component): New helper function.
2420 (gfc_match_structure_constructor): Extended largely to support named
2421 arguments and default initialization for structure constructors.
2423 2008-05-15 Steven G. Kargl <kargls@comcast.net>
2425 * simplify.c (gfc_simplify_dble, gfc_simplify_float,
2426 simplify_bound, gfc_simplify_nearest, gfc_simplify_real): Plug
2427 possible memory leaks.
2428 (gfc_simplify_reshape): Plug possible memory leaks and dereferencing
2431 2008-05-15 Steven G. Kargl <kargls@comcast.net>
2434 * simplify.c (gfc_simplify_int, gfc_simplify_intconv): Replaced hand
2435 rolled integer conversion with gfc_int2int, gfc_real2int, and
2437 (gfc_simplify_intconv): Renamed to simplify_intconv.
2439 2008-05-15 Steven G. Kargl, <kargl@comcast.net>
2440 * gfortran.dg/and_or_xor.f90: New test
2442 * fortran/simplify.c (gfc_simplify_and, gfc_simplify_or,
2443 gfc_simplify_xor): Don't range check logical results.
2445 2008-05-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2447 * trans-expr.c (gfc_conv_concat_op): Take care of nondefault
2449 (gfc_build_compare_string): Add kind argument and use it.
2450 (gfc_conv_statement_function): Fix indentation.
2451 * gfortran.h (gfc_character_info): New structure.
2452 (gfc_character_kinds): New array.
2453 * trans-types.c (gfc_character_kinds, gfc_character_types,
2454 gfc_pcharacter_types): New array.
2455 (gfc_init_kinds): Fill character kinds array.
2456 (validate_character): Take care of nondefault character kinds.
2457 (gfc_build_uint_type): New function.
2458 (gfc_init_types): Take care of nondefault character kinds.
2459 (gfc_get_char_type, gfc_get_pchar_type): New functions.
2460 (gfc_get_character_type_len): Use gfc_get_char_type.
2461 * trans.h (gfc_build_compare_string): Adjust prototype.
2462 (gfor_fndecl_compare_string_char4, gfor_fndecl_concat_string_char4,
2463 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
2464 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
2465 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
2466 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4): New
2468 * trans-types.h (gfc_get_char_type, gfc_get_pchar_type): New
2470 * trans-decl.c (gfor_fndecl_compare_string_char4,
2471 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
2472 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
2473 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
2474 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4,
2475 gfor_fndecl_concat_string_char4): New function decls.
2476 (gfc_build_intrinsic_function_decls): Define new *_char4 function
2478 * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char,
2479 gfc_conv_intrinsic_len_trim, gfc_conv_intrinsic_ichar,
2480 gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_trim,
2481 gfc_conv_intrinsic_function): Deal with nondefault character kinds.
2483 2008-05-15 Sa Liu <saliu@de.ibm.com>
2485 * iso-c-binding.def: Add standard parameter to macro NAMED_INTCST.
2486 All existing NAMED_INTCST definitions has standard GFC_STD_F2003,
2487 c_int128_t, c_int_least128_t and c_int_fast128_t are added as
2489 * iso-fortran-evn.def: Add standard parameter GFC_STD_F2003
2490 to macro NAMED_INTCST.
2491 * symbol.c (std_for_isocbinding_symbol): New helper function to
2492 return the standard that supports this isocbinding symbol.
2493 (generate_isocbinding_symbol): Do not generate GNU extension symbols
2494 if std=f2003. Add new parameter to NAMED_INTCST.
2495 * module.c (use_iso_fortran_env_module): Add new parameter to
2496 NAMED_INTCST and new field standard to struct intmod_sym.
2497 * gfortran.h: Add new parameter to NAMED_INTCST.
2498 * trans-types.c (init_c_interop_kinds): Add new parameter to
2500 * intrinsic.texi: Documented new types C_INT128_T, C_INT_LEASE128_T
2501 and C_INT_FAST128_T.
2503 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2506 * trans-decl.c (gfc_build_dummy_array_decl): Don't repack
2507 arrays that have the TARGET attribute.
2509 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2512 * simplify.c (only_convert_cmplx_boz): New function.
2513 (gfc_simplify_cmplx, gfc_simplify_complex, gfc_simplify_dcmplx):
2514 Call only_convert_cmplx_boz.
2516 2008-05-14 Paul Thomas <pault@gcc.gnu.org>
2519 * interface.c (compare_actual_formal): Do not check sizes if the
2520 actual is BT_PROCEDURE.
2522 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2525 * trans-array.c (gfc_conv_ss_startstride): Any negative size is
2526 the same as zero size.
2527 (gfc_conv_loop_setup): Fix size calculation.
2529 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2532 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Correctly
2533 handle zero-size sections.
2535 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2538 * scanner.c (preprocessor_line): Allocate enough memory for a
2541 2008-05-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2544 * target-memory.c (gfc_target_expr_size): Correctly treat
2546 (gfc_target_encode_expr): Likewise.
2547 (gfc_interpret_complex): Whitespace change.
2549 2008-05-11 Thomas Koenig <tkoenig@gcc.gnu.org>
2552 * trans.c (gfc_call_malloc): If size equals zero, allocate one
2553 byte; don't return a null pointer.
2555 2008-05-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2558 * module.c (quote_string): Fix sprintf format.
2560 2008-05-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2563 * module.c (quote_string, unquote_string,
2564 mio_allocated_wide_string): New functions.
2565 (mio_expr): Call mio_allocated_wide_string where needed.
2567 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
2569 * trans-decl.c (gfc_get_extern_function_decl, build_function_decl):
2570 Rename DECL_IS_PURE to DECL_PURE_P.
2572 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2574 * arith.c: (gfc_arith_concat, gfc_compare_string,
2575 gfc_compare_with_Cstring, hollerith2representation,
2576 gfc_hollerith2int, gfc_hollerith2real, gfc_hollerith2complex,
2577 gfc_hollerith2character, gfc_hollerith2logical): Use wide
2578 characters for character constants.
2579 * data.c (create_character_intializer): Likewise.
2580 * decl.c (gfc_set_constant_character_len): Likewise.
2581 * dump-parse-tree.c (show_char_const): Correctly dump wide
2583 error.c (print_wide_char): Rename into gfc_print_wide_char.
2584 (show_locus): Adapt to new prototype of gfc_print_wide_char.
2585 expr.c (free_expr0): Representation is now disjunct from
2586 character string value, so we always free it.
2587 (gfc_copy_expr, find_substring_ref, gfc_simplify_expr): Adapt
2588 to wide character strings.
2589 * gfortran.h (gfc_expr): Make value.character.string a wide string.
2590 (gfc_wide_toupper, gfc_wide_strncasecmp, gfc_wide_memset,
2591 gfc_widechar_to_char, gfc_char_to_widechar): New prototypes.
2592 (gfc_get_wide_string): New macro.
2593 (gfc_print_wide_char): New prototype.
2594 * io.c (format_string): Make a wide string.
2595 (next_char, gfc_match_format, compare_to_allowed_values,
2596 gfc_match_open): Deal with wide strings.
2597 * module.c (mio_expr): Convert between wide strings and ASCII ones.
2598 * primary.c (match_hollerith_constant, match_charkind_name):
2599 Handle wide strings.
2600 * resolve.c (build_default_init_expr): Likewise.
2601 * scanner.c (gfc_wide_toupper, gfc_wide_memset,
2602 gfc_char_to_widechar): New functions.
2603 (wide_strchr, gfc_widechar_to_char, gfc_wide_strncasecmp):
2604 Changes in prototypes.
2605 (gfc_define_undef_line, load_line, preprocessor_line,
2606 include_line, load_file, gfc_read_orig_filename): Handle wide
2608 * simplify.c (gfc_simplify_achar, gfc_simplify_adjustl,
2609 gfc_simplify_adjustr, gfc_simplify_char, gfc_simplify_iachar,
2610 gfc_simplify_ichar, simplify_min_max, gfc_simplify_new_line,
2611 gfc_simplify_repeat): Handle wide strings.
2612 (wide_strspn, wide_strcspn): New helper functions.
2613 (gfc_simplify_scan, gfc_simplify_trim, gfc_simplify_verify):
2614 Handle wide strings.
2615 * symbol.c (generate_isocbinding_symbol): Likewise.
2616 * target-memory.c (size_character, gfc_target_expr_size,
2617 encode_character, gfc_target_encode_expr, gfc_interpret_character,
2618 gfc_target_interpret_expr): Handle wide strings.
2619 * trans-const.c (gfc_conv_string_init): Lower wide strings to
2621 (gfc_conv_constant_to_tree): Likewise.
2622 * trans-expr.c (gfc_conv_substring_expr): Handle wide strings.
2623 * trans-io.c (gfc_new_nml_name_expr): Likewise.
2624 * trans-stmt.c (gfc_trans_label_assign): Likewise.
2626 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2628 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
2629 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
2630 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): Mark arguments
2631 with ATTRIBUTE_UNUSED.
2633 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2635 * check.c (gfc_check_sizeof): Switch to ATTRIBUTE_UNUSED.
2636 * simplify.c (gfc_simplify_lgamma): Likewise.
2638 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2640 * openmp.c (gfc_match_omp_eos): Use gfc_next_ascii_char and
2641 gfc_peek_ascii_char.
2642 * decl.c (gfc_match_kind_spec, gfc_match_type_spec,
2643 gfc_match_implicit_none, match_implicit_range, gfc_match_implicit,
2644 match_string_p, match_attr_spec, gfc_match_suffix,
2645 match_procedure_decl, gfc_match_entry, gfc_match_subroutine):
2647 * gfortran.h (gfc_char_t): New type.
2648 (gfc_linebuf): Make line member a gfc_char_t.
2649 (locus): Make nextc member a gfc_char_t.
2650 (gfc_wide_is_printable, gfc_wide_is_digit, gfc_wide_fits_in_byte,
2651 gfc_wide_tolower, gfc_wide_strlen, gfc_next_ascii_char,
2652 gfc_peek_ascii_char, gfc_check_digit): New prototypes.
2653 * error.c (print_wide_char): New function.
2654 (show_locus): Use print_wide_char and gfc_wide_strlen.
2655 * io.c (next_char): Use gfc_char_t type.
2656 (match_io): Use gfc_peek_ascii_char and gfc_next_ascii_char.
2657 * match.c (gfc_match_parens, gfc_match_eos,
2658 gfc_match_small_literal_int, gfc_match_name, gfc_match_name_C,
2659 gfc_match_intrinsic_op, gfc_match_char, gfc_match_return,
2660 gfc_match_common): Likewise.
2661 * match.h (gfc_match_special_char): Change prototype.
2662 * parse.c (decode_specification_statement, decode_statement,
2663 decode_omp_directive, next_free, next_fixed): Use
2664 gfc_peek_ascii_char and gfc_next_ascii_char.
2665 * primary.c (gfc_check_digit): Change name.
2666 (match_digits, match_hollerith_constant, match_boz_constant,
2667 match_real_constant, next_string_char, match_charkind_name,
2668 match_string_constant, match_logical_constant_string,
2669 match_complex_constant, match_actual_arg, match_varspec,
2670 gfc_match_rvalue, match_variable): Use gfc_peek_ascii_char and
2671 gfc_next_ascii_char.
2672 * scanner.c (gfc_wide_fits_in_byte, wide_is_ascii,
2673 gfc_wide_is_printable, gfc_wide_tolower, gfc_wide_is_digit,
2674 gfc_wide_is_digit, wide_atoi, gfc_wide_strlen, wide_strcpy,
2675 wide_strchr, widechar_to_char, wide_strncmp, wide_strncasecmp,
2676 gfc_next_ascii_char, gfc_peek_ascii_char):
2678 (next_char, gfc_define_undef_line, skip_free_comments,
2679 gfc_next_char_literal, gfc_next_char, gfc_peek_char,
2680 gfc_error_recovery, load_line, preprocessor_line, include_line,
2681 load_file, gfc_read_orig_filename): Use gfc_char_t for source
2682 characters and the {gfc_,}wide_* functions to manipulate wide
2685 2008-05-06 Tobias Burnus <burnus@net-b.de>
2688 * intrinsic.c (add_functions): Call gfc_simplify_bessel_*.
2689 * intrinsic.h: Add prototypes for gfc_simplify_bessel_*.
2690 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
2691 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
2692 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): New.
2694 2008-05-03 Janus Weil <jaydub66@gmail.com>
2696 * misc.c (gfc_clear_ts): Set interface to NULL.
2698 2008-05-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2701 * gfortran.h: Add extra_comma pointer to gfc_dt structure. Add iokind to
2702 gfc_expr value union. Add io_kind enum to here from io.c.
2703 * io.c (gfc_free_dt): Free extra_comma.
2704 (gfc_resolve_dt): If an extra comma was encountered and io_unit is type
2705 BT_CHARACTER, resolve to format_expr and set default unit. Error if
2706 io_kind is M_WRITE. (match_io): Match the extra comma and set new
2707 pointer, extra_comma.
2709 2008-05-01 Bud Davis <bdavis9659@sbcglobal.net>
2712 * simplify.c (gfc_simplify_index): Check for direction argument
2715 2008-05-01 Janus Weil <jaydub66@gmail.com>
2717 * gfortran.h (struct gfc_symbol): Moving "interface" member to
2718 gfc_typespec (plus fixing a small docu error).
2719 * interface.c (gfc_procedure_use): Ditto.
2720 * decl.c (match_procedure_decl): Ditto.
2721 * resolve.c (resolve_specific_f0,
2722 resolve_specific_f0, resolve_symbol): Ditto.
2724 2008-04-30 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2726 * intrinsic.c (add_functions): Add SELECTED_CHAR_KIND intrinsic.
2727 * intrinsic.h (gfc_check_selected_char_kind,
2728 gfc_simplify_selected_char_kind): New prototypes.
2729 * gfortran.h (gfc_isym_id): Add GFC_ISYM_SC_KIND.
2730 * trans.h (gfor_fndecl_sc_kind): New function decl.
2731 * trans-decl.c (gfor_fndecl_sc_kind): Build new decl.
2732 * arith.c (gfc_compare_with_Cstring): New function.
2733 * arith.h (gfc_compare_with_Cstring): New prototype.
2734 * check.c (gfc_check_selected_char_kind): New function.
2735 * primary.c (match_string_constant, match_kind_param): Mark
2736 symbols used as literal constant kind param as referenced.
2737 * trans-intrinsic.c (gfc_conv_intrinsic_sc_kind): New function.
2738 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_sc_kind.
2739 * intrinsic.texi (SELECTED_CHAR_KIND): Document new intrinsic.
2740 * simplify.c (gfc_simplify_selected_char_kind): New function.
2742 2008-04-28 Paul Thomas <pault@gcc.gnu.org>
2745 * module.c (find_symbol): Do not return a result for a symbol
2746 that has been renamed in another module.
2748 2008-04-26 George Helffrich <george@gcc.gnu.org>
2752 * trans-common.c (create_common): Add decl to function
2753 chain (if inside one) to preserve identifier scope in debug output.
2755 2008-04-25 Jan Hubicka <jh@suse.cz>
2757 * trans-decl.c (trans_function_start): Update.
2759 2008-04-25 Tobias Burnus <burnus@net-b.de>
2760 Daniel Franke <franke.daniel@gmail.com>
2763 * gfortranspec.c (lang_specific_driver): Deprecate
2764 -M option; fix ICE when "-M" is last argument and
2765 make "-M<dir>" work.
2766 * options.c (gfc_handle_module_path_options):
2767 Use -J instead of -M in error messages.
2768 * invoke.texi: Mark -M as depecated.
2770 2008-04-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2771 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2774 * trans-instrinsic.c (gfc_conv_intrinsic_minmaxloc): Correctly adjust
2775 loop counter offset.
2777 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
2779 * trans-expr.c (gfc_conv_structure): Don't set TREE_INVARIANT.
2780 * trans-array.c (gfc_build_null_descriptor): Don't set TREE_INVARIANT.
2781 (gfc_trans_array_constructor_value): Don't set TREE_INVARIANT.
2782 (gfc_build_constant_array_constructor): Don't set TREE_INVARIANT.
2783 (gfc_conv_array_initializer): Don't set TREE_INVARIANT.
2784 * trans-common.c (get_init_field): Don't set TREE_INVARIANT.
2785 (create_common): Don't set TREE_INVARIANT.
2786 * trans-stmt.c (gfc_trans_character_select): Don't set TREE_INVARIANT.
2787 * trans-decl.c (gfc_generate_function_code): Don't set TREE_INVARIANT.
2789 2008-04-21 Steve Ellcey <sje@cup.hp.com>
2791 * f95-lang.c (gfc_init_decl_processing): use ptr_mode instead of Pmode.
2793 2008-04-21 Daniel Franke <franke.daniel@gmail.com>
2796 * gfortranspec.c (lookup_option): Properly handle separated arguments
2797 in -J option, print missing argument message when necessary.
2799 2008-04-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2802 * scanner.c (skip_fixed_comments): Update continue_line when comment is
2803 detected. (gfc_next_char_literal): Likewise.
2805 2008-04-19 Paul Thomas <pault@gcc.gnu.org>
2810 * trans_array.c (gfc_trans_array_constructor): Temporarily
2811 realign loop, if loop->from is not zero, before creating
2812 the temporary array and provide an offset.
2815 * trans-decl.c (gfc_init_default_dt): Add gfc_ prefix to name
2816 and allow for NULL body. Change all references from
2817 init_default_dt to gfc_init_default_dt.
2818 * trans.h : Add prototype for gfc_init_default_dt.
2819 * trans-array.c (gfc_trans_deferred_vars): After nullification
2820 call gfc_init_default_dt for derived types with allocatable
2823 2008-04-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2826 * trans-common.c (create_common): Revert patch causing regression.
2828 2008-04-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2831 * iresolve.c (gfc_resolve_eoshift): Check for NULL symtree in test for
2832 optional argument attribute.
2834 2008-04-16 Paul Thomas <pault@gcc.gnu.org>
2837 * trans-intrinsic.c (gfc_conv_intrinsic_char): Even though KIND
2838 is not used, the argument must be converted.
2840 2008-04-16 Jakub Jelinek <jakub@redhat.com>
2843 * f95-lang.c (gfc_init_builtin_functions): Make sure
2844 BUILT_IN_SINCOS{,F,L} types aren't varargs.
2846 2008-04-15 Paul Thomas <pault@gcc.gnu.org>
2849 * expr.c (scalarize_intrinsic_call): Reorder identification of
2850 array argument so that if one is not found a segfault does not
2851 occur. Return FAILURE if all scalar arguments.
2853 2008-04-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2854 Tobias Burnus <burnus@net-b.de>
2857 * options.c (gfc_init_options): Set the default maximum continuation
2858 lines to 255 for both free and fixed form source for warnings.
2859 (gfc_handle_option): Set -std=f95 fixed form max continuations to 19 and
2860 the -std=f95 free form max continuations to 39 for warnings.
2861 * scanner.c (gfc_next_char_literal): Adjust the current_line number only
2862 if it is less than the current locus.
2864 2008-04-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2866 PR fortran/25829 28655
2867 * io.c (io_tag): Add new tags for decimal, encoding, asynchronous,
2868 round, sign, and id. (match_open_element): Match new tags.
2869 (gfc_resolve_open): Resolve new tags. (gfc_match_open): Enable encoding
2870 for DEFAULT only. Update error messages. (match_dt_element): Fix match
2871 tag for asynchronous. Update error messages. (gfc_free_inquire): Free
2872 new expressions. (match_inquire_element): Match new tags.
2873 (gfc_match_inquire): Add constraint for ID and PENDING.
2874 (gfc_resolve_inquire): Resolve new tags.
2875 * trans-io.c (gfc_trans_inquire): Clean up whitespace and fix setting of
2876 mask for ID parameter.
2877 * ioparm.def: Fix order of parameters for pending, round, and sign.
2878 NOTE: These must line up with the definitions in libgfortran/io/io.h. or
2881 2008-04-06 Paul Thomas <pault@gcc.gnu.org>
2884 * expr.c (scalarize_intrinsic_call): Identify which argument is
2885 an array and use that as the template.
2886 (check_init_expr): Remove tests that first argument is an array
2887 in the call to scalarize_intrinsic_call.
2889 2008-04-06 Tobias Schlüter <tobi@gcc.gnu.org>
2892 * io.c (io_tag): Add field 'value'. Split 'spec' field in
2894 (match_etag, match_vtag, match_ltag): Split parsing in two steps
2895 to give better error messages.
2897 2008-04-06 Tobias Burnus <burnus@net-b.de>
2899 * io.c (check_io_constraints): Add constrains. ID= requires
2900 asynchronous= and asynchronous= must be init expression.
2902 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2904 * f95-lang.c: Set LANG_HOOKS_NAME to "GNU Fortran".
2906 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2908 * dump-parse-tree.c: Use fprintf, fputs and fputc instead of
2909 gfc_status and gfc_status_char. Remove gfc_ prefix of the gfc_show_*
2910 functions and make them static. Add new gfc_dump_parse_tree
2912 * gfortran.h (gfc_option_t): Rename verbose into dump_parse_tree.
2913 (gfc_status, gfc_status_char): Delete prototypes.
2914 * error.c (gfc_status, gfc_status_char): Remove functions.
2915 * scanner.c (gfc_new_file): Use printf instead of gfc_status.
2916 * options.c (gfc_init_options): Rename verbose into dump_parse_tree.
2917 (gfc_handle_module_path_options): Use gfc_fatal_error instead of
2918 gfc_status and exit.
2919 (gfc_handle_option): Rename verbose into dump_parse_tree.
2920 * parse.c (gfc_parse_file): Use gfc_dump_parse_tree.
2922 2008-04-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2923 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2925 PR fortran/25829 28655
2926 * dump-parse-tree.c (gfc_show_code_node): Show new I/O parameters.
2927 * gfortran.h (gfc_statement): Add ST_WAIT enumerator.
2928 (gfc_open): Add pointers for decimal, encoding, round, sign,
2929 asynchronous. (gfc_inquire): Add pointers for asynchronous, decimal,
2930 encoding, pending, round, sign, size, id.
2931 (gfc_wait): New typedef struct. (gfc_dt): Add pointers for id, pos,
2932 asynchronous, blank, decimal, delim, pad, round, sign.
2933 (gfc_exec_op): Add EXEC_WAIT enumerator. (gfc_code): Add pointer for
2934 wait. (gfc_free_wait), (gfc_resolve_wait): New function prototypes.
2935 * trans-stmt.h (gfc_trans_wait): New function prototype.
2936 * trans.c (gfc_trans_code): Add case for EXEC_WAIT.
2937 * io.c (io_tag): Add new tags for DECIMAL, ENCODING, ROUND, SIGN,
2938 ASYCHRONOUS, ID. (match_open_element): Add matchers for new tags.
2939 (gfc_free_open): Free new pointers. (gfc_resolve_open): Resolve new
2940 tags. (gfc_resolve_open): Remove comment around check for allowed
2941 values and ASYNCHRONOUS, update it. Likewise for DECIMAL, ENCODING,
2942 ROUND, and SIGN. (match_dt_element): Add matching for new tags.
2943 (gfc_free_wait): New function. (gfc_resolve_wait): New function.
2944 (match_wait_element): New function. (gfc_match_wait): New function.
2945 * resolve.c (gfc_resolve_blocks): Add case for EXEC_WAIT.
2946 (resolve_code): Add case for EXEC_WAIT.
2947 * st.c (gfc_free_statement): Add case for EXEC_WAIT.
2948 * trans-io.c (ioparam_type): Add IOPARM_ptype_wait. (gfc_st_parameter):
2949 Add "wait" entry. (iocall): Add IOCALL_WAIT enumerator.
2950 (gfc_build_io_library_fndecls): Add function declaration for st_wait.
2951 (gfc_trans_open): Add mask bits for new I/O tags.
2952 (gfc_trans_inquire): Add mask bits for new I/O tags.
2953 (gfc_trans_wait): New translation function.
2954 (build_dt): Add mask bits for new I/O tags.
2955 * match.c (gfc_match_if) Add matcher for "wait".
2956 * match.h (gfc_match_wait): Prototype for new function.
2957 * ioparm.def: Add new I/O parameter definitions.
2958 * parse.c (decode_statement): Add match for "wait" statement.
2959 (next_statement): Add case for ST_WAIT. (gfc_ascii_statement): Same.
2961 2008-04-03 Jakub Jelinek <jakub@redhat.com>
2964 * openmp.c (resolve_omp_clauses): Diagnose if a clause symbol
2967 2008-04-03 Tom Tromey <tromey@redhat.com>
2969 * Make-lang.in (fortran_OBJS): New variable.
2971 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
2973 * f95-lang.c (insert_block): Kill.
2975 2008-04-01 George Helffrich <george@gcc.gnu.org>
2977 PR fortran/35154, fortran/23057
2978 * trans-common.c (create_common): Add decl to function
2979 chain to preserve identifier scope in debug output.
2981 2008-04-01 Joseph Myers <joseph@codesourcery.com>
2983 * gfortran.texi: Include gpl_v3.texi instead of gpl.texi
2984 * Make-lang.in (GFORTRAN_TEXI): Include gpl_v3.texi instead of
2987 2008-03-30 Paul Thomas <pault@gcc.gnu.org>
2990 * resolve.c (resolve_function, resolve_call): If the procedure
2991 is elemental do not look for noncopying intrinsics.
2993 2008-03-29 Paul Thomas <pault@gcc.gnu.org>
2996 * trans-array.c (gfc_array_init_size): Set 'size' zero if
2997 negative in one dimension.
3000 * trans-expr.c (gfc_trans_string_copy): Only assign a char
3001 directly if the lhs and rhs types are the same.
3003 2008-03-28 Daniel Franke <franke.daniel@gmail.com>
3004 Paul Richard Thomas <paul.richard.thomas@gmail.com>
3007 * primary.c (match_variable): Improved matching of function
3009 * resolve.c (resolve_allocate_deallocate): Removed checks if
3010 the actual argument for STAT is a variable.
3012 2008-03-28 Tobias Burnus <burnus@net-b.de>
3014 * symbol.c (gfc_get_default_type): Fix error message; option
3015 -fallow_leading_underscore should be -fallow-leading-underscore
3017 2008-03-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3020 * iresolve.c (gfc_resolve_cshift): Check for NULL symtree in test for
3021 optional argument attribute.
3023 2008-03-27 Tom Tromey <tromey@redhat.com>
3025 * Make-lang.in: Revert automatic dependency patch.
3027 2008-03-25 Tom Tromey <tromey@redhat.com>
3029 * Make-lang.in: Remove .o targets.
3030 (fortran_OBJS): New variable.
3031 (fortran/gfortranspec.o): Move to fortran/. Reduce to variable
3033 (GFORTRAN_D_OBJS): Update.
3034 (GFORTRAN_TRANS_DEPS): Remove.
3036 2008-03-24 Paul Thomas <pault@gcc.gnu.org>
3039 * resolve.c (resolve_structure_cons): It is an error to assign
3040 NULL to anything other than a pointer or allocatable component.
3043 * resolve.c (resolve_symbol): If the symbol is a derived type,
3044 resolve the derived type. If the symbol is a derived type
3045 function, ensure that the derived type is visible in the same
3046 namespace as the function.
3048 2008-03-23 Tobias Schlüter <tobi@gcc.gnu.org>
3050 * trans.h: Use fold_build in build1_v, build2_v and build3_v
3052 * trans-openmp.c (gfc_trans_omp_critical, gfc_trans_omp_single):
3053 Don't use build2_v macro.
3055 2008-03-19 Daniel Franke <franke.daniel@gmail.com>
3058 * interface.c (gfc_procedure_use): Check for keyworded arguments in
3059 procedures without explicit interfaces.
3061 2008-03-16 Paul Thomas <pault@gcc.gnu.org>
3064 * resolve.c (check_assumed_size_reference): Only visit the
3065 first reference and look directly at the highest dimension.
3067 2008-03-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3070 * trans-array.c (gfc_conv_array_index_offset): Remove unnecessary
3073 2008-03-15 Daniel Franke <franke.daniel@gmail.com>
3076 * resolve.c (resolve_branch): Less strict and pessimistic warning
3079 2008-03-11 Paolo Bonzini <bonzini@gnu.org>
3081 * f95-lang.c (LANG_HOOKS_CLEAR_BINDING_STACK): Delete.
3082 (gfc_be_parse_file): Call clear_binding_stack from here.
3083 (gfc_clear_binding_stack): Rename to clear_binding_stack.
3085 2008-03-09 Paul Thomas <pault@gcc.gnu.org>
3088 * module.c (mio_symtree_ref): After providing a symbol for a
3089 missing equivalence member, resolve and NULL the fixups.
3091 2008-03-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3093 * invoke.texi (Error and Warning Options): Document
3096 2008-03-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3099 * trans-array.c (gfc_conv_ss_startstride): Fix the logic to avoid
3100 checking bounds of absent optional arguments.
3102 2008-03-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3105 * intrinsic.c (add_functions): Add simplification routines for
3106 ERF, DERF, ERFC and DERFC.
3107 * decl.c (gfc_match_suffix, gfc_match_subroutine): Change GNU
3108 extensions into Fortran 2008 features.
3109 * intrinsic.h (gfc_simplify_erf, gfc_simplify_erfc): New
3111 * simplify.c (gfc_simplify_erf, gfc_simplify_erfc): New functions.
3113 2008-03-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3116 * intrinsic.c (add_functions): Modify intrinsics ACOSH, ASINH,
3117 ATANH, ERF, ERFC and GAMMA. Add intrinsics BESSEL_{J,Y}{0,1,N},
3118 ERFC_SCALED, LOG_GAMMA and HYPOT.
3119 * intrinsic.h (gfc_check_hypot, gfc_simplify_hypot,
3120 gfc_resolve_hypot): New prototypes.
3121 * mathbuiltins.def: Add HYPOT builtin. Make complex versions of
3122 ACOSH, ASINH and ATANH available.
3123 * gfortran.h (GFC_ISYM_ERFC_SCALED, GFC_ISYM_HYPOT): New values.
3124 * lang.opt: Add -std=f2008 option.
3125 * libgfortran.h: Define GFC_STD_F2008.
3126 * lang-specs.h: Add .f08 and .F08 file suffixes.
3127 * iresolve.c (gfc_resolve_hypot): New function.
3128 * parse.c (parse_contained): Allow empty CONTAINS for Fortran 2008.
3129 * check.c (gfc_check_hypot): New function.
3130 * trans-intrinsic.c (gfc_intrinsic_map): Define ERFC_SCALE builtin.
3131 * options.c (set_default_std_flags): Allow Fortran 2008 by default.
3132 (form_from_filename): Add .f08 suffix.
3133 (gfc_handle_option): Handle -std=f2008 option.
3134 * simplify.c (gfc_simplify_hypot): New function.
3135 * gfortran.texi: Document Fortran 2008 status and file extensions.
3136 * intrinsic.texi: Document new BESSEL_{J,Y}{0,1,N} intrinsics,
3137 as well as HYPOT and ERFC_SCALED. Update documentation of ERF,
3138 ERFC, GAMMA, LGAMMA, ASINH, ACOSH and ATANH.
3139 * invoke.texi: Document the new -std=f2008 option.
3141 2008-03-02 Jakub Jelinek <jakub@redhat.com>
3143 * gfortranspec.c (lang_specific_driver): Update copyright notice
3146 2008-02-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3149 * expr.c (find_array_element): Modify traversing the constructor to
3150 avoid trying to access NULL memory pointed to by next for the
3151 last element. (find_array_section): Exit while loop if cons->next is
3153 * trans-expr.c (gfc_conv_scalar_char_value): Initialize gfc_typespec.
3154 (gfc_conv_function_call): Same.
3155 * decl.c (gfc_match_implicit): Same.
3156 * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Same.
3158 2008-02-28 Daniel Franke <franke.daniel@gmail.com>
3163 * lang.opt: Added -Wreturn-type.
3164 * options.c (gfc_handle_option): Recognize -Wreturn-type.
3165 * trans-decl.c (gfc_trans_deferred_vars): Emit warnings for funtions
3166 where the result value is not set.
3167 (gfc_generate_function_code): Likewise.
3168 (generate_local_decl): Emit warnings for funtions whose RESULT
3169 variable is not set.
3171 2008-02-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3174 * trans-expr.c (gfc_conv_variable): Don't build indirect
3175 references when explicit interface is mandated.
3176 * resolve.c (resolve_formal_arglist): Set attr.always_explicit
3177 on the result symbol as well as the procedure symbol.
3179 2008-02-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3182 * trans.h: Remove prototypes for gfor_fndecl_math_exponent4,
3183 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
3184 gfor_fndecl_math_exponent16.
3185 * f95-lang.c (build_builtin_fntypes): Add new function types.
3186 (gfc_init_builtin_functions): Add new builtins for nextafter,
3187 frexp, ldexp, fabs, scalbn and inf.
3188 * iresolve.c (gfc_resolve_rrspacing): Don't add hidden arguments.
3189 (gfc_resolve_scale): Don't convert type of second argument.
3190 (gfc_resolve_set_exponent): Likewise.
3191 (gfc_resolve_size): Don't add hidden arguments.
3192 * trans-decl.c: Remove gfor_fndecl_math_exponent4,
3193 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
3194 gfor_fndecl_math_exponent16.
3195 * trans-intrinsic.c (gfc_intrinsic_map): Remove intrinsics
3196 for scalbn, fraction, nearest, rrspacing, set_exponent and
3198 (gfc_conv_intrinsic_exponent): Directly call frexp.
3199 (gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_nearest,
3200 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
3201 gfc_conv_intrinsic_scale, gfc_conv_intrinsic_set_exponent): New
3203 (gfc_conv_intrinsic_function): Use the new functions above.
3205 2008-02-26 Tobias Burnus <burnus@net-b.de>
3208 * interface.c (check_operator_interface): Show better line for error
3209 messages; fix constrains for user-defined assignment operators.
3210 (gfc_extend_assign): Fix constrains for user-defined assignment
3213 2008-02-26 Tom Tromey <tromey@redhat.com>
3215 * trans-io.c (set_error_locus): Remove old location code.
3216 * trans-decl.c (gfc_set_decl_location): Remove old location code.
3217 * f95-lang.c (gfc_init): Remove test of USE_MAPPED_LOCATION.
3218 * scanner.c (gfc_gobble_whitespace): Remove old location code.
3219 (get_file): Likewise.
3220 (preprocessor_line): Likewise.
3221 (load_file): Likewise.
3222 (gfc_new_file): Likewise.
3223 * trans.c (gfc_trans_runtime_check): Remove old location code.
3224 (gfc_get_backend_locus): Likewise.
3225 (gfc_set_backend_locus): Likewise.
3226 * data.c (gfc_assign_data_value): Remove old location code.
3227 * error.c (show_locus): Remove old location code.
3228 * gfortran.h (gfc_linebuf): Remove old location code.
3229 (gfc_linebuf_linenum): Remove old-location variant.
3231 2008-02-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3234 * trans-const.c (gfc_build_string_const): Don't call gettext.
3235 (gfc_build_localized_string_const): New function.
3236 * trans-const.h (gfc_build_localized_string_const): New prototype.
3237 * trans.c (gfc_trans_runtime_check): Use
3238 gfc_build_localized_string_const instead of gfc_build_string_const.
3239 (gfc_call_malloc): Likewise.
3240 (gfc_allocate_with_status): Likewise.
3241 (gfc_allocate_array_with_status): Likewise.
3242 (gfc_deallocate_with_status): Likewise.
3243 (gfc_call_realloc): Likewise.
3244 * trans-io.c (gfc_trans_io_runtime_check): Likewise.
3246 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
3248 * arith.c: Update copyright years.
3249 * arith.h: Likewise.
3250 * array.c: Likewise.
3252 * check.c: Likewise.
3256 * dependency.c: Likewise.
3257 * dependency.h: Likewise.
3258 * dump-parse-tree.c: Likewise.
3259 * error.c: Likewise.
3261 * gfc-internals.texi: Likewise.
3262 * gfortran.h: Likewise.
3263 * gfortran.texi: Likewise.
3264 * gfortranspec.c: Likewise.
3265 * interface.c: Likewise.
3266 * intrinsic.c: Likewise.
3267 * intrinsic.h: Likewise.
3268 * intrinsic.texi: Likewise.
3269 * invoke.texi: Likewise.
3271 * iresolve.c: Likewise.
3272 * iso-c-binding.def: Likewise.
3273 * iso-fortran-env.def: Likewise.
3274 * lang-specs.h: Likewise.
3275 * lang.opt: Likewise.
3276 * libgfortran.h: Likewise.
3277 * match.c: Likewise.
3278 * match.h: Likewise.
3279 * matchexp.c: Likewise.
3281 * module.c: Likewise.
3282 * openmp.c: Likewise.
3283 * options.c: Likewise.
3284 * parse.c: Likewise.
3285 * parse.h: Likewise.
3286 * primary.c: Likewise.
3287 * resolve.c: Likewise.
3288 * scanner.c: Likewise.
3289 * simplify.c: Likewise.
3291 * symbol.c: Likewise.
3292 * target-memory.c: Likewise.
3293 * target-memory.h: Likewise.
3294 * trans-array.h: Likewise.
3295 * trans-const.h: Likewise.
3296 * trans-stmt.h: Likewise.
3297 * trans-types.c: Likewise.
3298 * trans-types.h: Likewise.
3299 * types.def: Likewise.
3301 2008-02-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3304 * simplify.c (gfc_simplify_ibclr), (gfc_simplify_ibits),
3305 (gfc_simplify_ibset): Remove call to range_check.
3306 (simplify_cmplx), (gfc_simplify_dble), (gfc_simplify_float)
3307 (gfc_simplify_real): Add call gfc_clear_ts to initialize the
3308 temporary gfc_typspec variable.
3310 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
3312 * trans-array.c (gfc_conv_descriptor_data_get,
3313 gfc_conv_descriptor_data_set_internal,
3314 gfc_conv_descriptor_data_addr, gfc_conv_descriptor_offset,
3315 gfc_conv_descriptor_dtype, gfc_conv_descriptor_dimension,
3316 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
3317 gfc_conv_descriptor_ubound, gfc_trans_create_temp_array,
3318 gfc_conv_array_transpose, gfc_grow_array,
3319 gfc_trans_array_constructor_subarray,
3320 gfc_trans_array_constructor_value, gfc_trans_scalarized_loop_end,
3321 gfc_array_init_size, gfc_array_allocate, gfc_array_deallocate,
3322 gfc_conv_array_initializer, gfc_trans_array_bounds,
3323 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
3324 gfc_get_dataptr_offset, gfc_conv_array_parameter,
3325 gfc_trans_dealloc_allocated, get_full_array_size,
3326 gfc_duplicate_allocatable, structure_alloc_comps): Use fold_buildN
3328 * trans-expr.c (gfc_conv_expr_present, gfc_conv_missing_dummy,
3329 gfc_conv_component_ref, gfc_conv_cst_int_power,
3330 gfc_conv_function_call, gfc_trans_structur_assign): Likewise.
3331 * trans-common.c (create_common): Likewise.
3332 * trans-openmp.c (gfc_trans_omp_atomic, gfc_trans_omp_do):
3334 * trans-const.c (gfc_conv_constant_to_tree): Likewise.
3335 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_do,
3336 gfc_trans_integer_select, gfc_trans_character_select,
3337 gfc_trans_forall_loop, compute_overall_iter_number,
3338 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_allocate,
3339 gfc_trans_deallocate): Likewise.
3340 * trans.c (gfc_build_addr_expr, gfc_trans_runtime_check,
3341 gfc_allocate_with_status, gfc_allocate_array_with_status,
3342 gfc_deallocate_with_status): Likewise.
3343 * f95-lang.c (gfc_truthvalue_conversion): Likewise.
3344 * trans-io.c (set_parameter_const, set_parameter_value,
3345 set_parameter_ref, set_string, set_internal_unit, io_result,
3346 set_error_locus, nml_get_addr_expr, transfer_expr): Likewise.
3347 * trans-decl.c (gfc_build_qualified_array, build_entry_thunks,
3348 gfc_get_fake_result_decl, gfc_trans_auto_character_variable,
3349 gfc_generate_function_code): Likewise.
3350 * convert.c (convert): Likewise.
3351 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
3352 build_fixbound_expr, build_fix_expr, gfc_conv_intrinsic_aint,
3353 gfc_conv_intrinsic_int, gfc_conv_intrinsic_imagpart,
3354 gfc_conv_intrinsic_conjg, gfc_conv_intrinsic_abs,
3355 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
3356 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_dprod,
3357 gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
3358 gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax,
3359 gfc_conv_intrinsic_minmax_char, gfc_conv_intrinsic_count,
3360 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_dot_product,
3361 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
3362 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_not,
3363 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
3364 gfc_conv_intrinsic_ichar, gfc_conv_intrinsic_size,
3365 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
3366 gfc_conv_allocated, gfc_conv_associated, gfc_conv_intrinsic_trim,
3367 gfc_conv_intrinsic_repeat): Likewise.
3369 2008-02-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3372 * trans-expr.c (gfc_conv_power_op): Use BUILT_IN_CPOW{F,,L}.
3373 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_CPOW{F,,L}.
3374 * trans.h (gfor_fndecl_math_cpow, gfor_fndecl_math_cpowf,
3375 gfor_fndecl_math_cpowl10, gfor_fndecl_math_cpowl16): Remove.
3376 * trans-decl.c: Likewise.
3378 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3381 * expr.c (find_array_element): Modify traversing the constructor to
3382 avoid trying to access NULL memory pointed to by next for the
3383 last element. (find_array_section): Exit while loop if cons->next is
3386 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3389 * iresolve.c (resolve_mask_arg): Add gfc_clear_ts to initialize
3391 (gfc_resolve_aint): Likewise.
3392 (gfc_resolve_anint): Likewise.
3393 (gfc_resolve_besn): Likewise.
3394 (gfc_resolve_cshift): Likewise.
3395 (gfc_resolve_ctime): Likewise.
3396 (gfc_resolve_eoshift): Likewise.
3397 (gfc_resolve_index_func): Likewise.
3398 (gfc_resolve_isatty): Likewise.
3399 (gfc_resolve_malloc): Likewise.
3400 (gfc_resolve_rrspacing): Likewise.
3401 (gfc_resolve_scale): Likewise.
3402 (gfc_resolve_set_exponent): Likewise.
3403 (gfc_resolve_spacing): Likewise.
3404 (gfc_resolve_spacing): Likewise.
3405 (gfc_resolve_fgetc): Likewise.
3406 (gfc_resolve_fputc): Likewise.
3407 (gfc_resolve_ftell): Likewise.
3408 (gfc_resolve_ttynam): Likewise.
3409 (gfc_resolve_alarm_sub): Likewise.
3410 (gfc_resolve_mvbits): Likewise.
3411 (gfc_resolve_getarg): Likewise.
3412 (gfc_resolve_signal_sub): Likewise.
3413 (gfc_resolve_exit): Likewise.
3414 (gfc_resolve_flush): Likewise.
3415 (gfc_resolve_free): Likewise.
3416 (gfc_resolve_ctime_sub): Likewise.
3417 (gfc_resolve_fgetc_sub): Likewise.
3418 (gfc_resolve_fputc_sub): Likewise.
3419 (gfc_resolve_fseek_sub): Likewise.
3420 (gfc_resolve_ftell_sub): Likewise.
3421 (gfc_resolve_ttynam_sub): Likewise.
3423 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3425 * gfc-internals.texi: Fix typos and markup nits.
3426 * gfortran.texi: Likewise.
3427 * intrinsic.texi: Likewise.
3429 2008-02-21 Richard Guenther <rguenther@suse.de>
3431 * trans-expr.c (gfc_conv_expr_op): Expand INTRINSIC_PARENTHESES
3432 as unary PAREN_EXPR for real and complex typed expressions.
3433 (gfc_conv_unary_op): Fold the built tree.
3435 2008-02-20 Tobias Burnus <burnus@net-b.de>
3438 * match.c (gfc_match_name): Improve error message for '$'.
3440 2008-02-19 Daniel Franke <franke.daniel@gmail.com>
3443 * expr.c (gfc_check_pointer_assign): Add type and kind information
3444 to type-mismatch message.
3445 (gfc_check_assign): Unify error messages.
3447 2008-02-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3450 * gfortran.texi: Create new section for unimplemented extensions.
3451 Add "STRUCTURE and RECORD" and "ENCODE and DECODE statements".
3452 Remove "smaller projects" list. Fix a few typos.
3454 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3456 * intrinsic.texi: Rename INDEX node to avoid clashing with
3457 index.html on case-insensitive systems.
3459 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3462 * trans-expr.c (gfc_conv_function_call): Force evaluation of
3465 2008-02-10 Daniel Franke <franke.daniel@gmail.com>
3468 * lang.opt: Allow '-J<dir>' next to '-J <dir>',
3469 likewise '-I <dir>' and '-I<dir>'.
3471 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3474 * Make-lang.in (f951): Add $(GMPLIBS).
3476 2008-02-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3479 * trans-common.c (build_field): Mark fields as volatile when needed.
3481 2008-02-05 Tobias Burnus <burnus@net-b.de>
3484 * data.c (gfc_assign_data_value): Only free "size" if
3485 it has not already been freed.
3487 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
3490 * array.c (match_array_element_spec): Remove check for negative
3492 (gfc_resolve_array_spec): Add check for negative size.
3494 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
3497 * data.c (gfc_assign_data_value): Add bounds check for array
3500 2008-02-04 Daniel Franke <franke.daniel@gmail.com>
3502 * resolve.c (resolve_where): Fix typo.
3503 (gfc_resolve_where_code_in_forall): Likewise.
3505 2008-02-03 Paul Thomas <pault@gcc.gnu.org>
3508 * resolve.c (resolve_allocate_deallocate): New function.
3509 (resolve_code): Call it for allocate and deallocate.
3510 * match.c (gfc_match_allocate, gfc_match_deallocate) : Remove
3511 the checking of the STAT tag and put in above new function.
3512 * primary,c (match_variable): Do not fix flavor of host
3513 associated symbols yet if the type is not known.
3515 2008-01-31 Paul Thomas <pault@gcc.gnu.org>
3518 * expr.c (gfc_check_assign): It is an error to assign
3519 to a sibling procedure.
3521 2008-01-30 Paul Thomas <pault@gcc.gnu.org>
3524 * symbol.c (gfc_delete_symtree, gfc_undo_symbols): Rename
3525 delete_symtree to gfc_delete_symtree.
3526 * gfortran.h : Add prototype for gfc_delete_symtree.
3527 * module.c (load_generic_interfaces): Transfer symbol to a
3528 unique symtree and delete old symtree, instead of renaming.
3529 (read_module): The rsym and the found symbol are the same, so
3530 the found symtree can be deleted.
3533 * decl.c (match_char_spec): Remove the constraint on deferred
3534 matching of functions and free the length expression.
3535 delete_symtree to gfc_delete_symtree.
3536 (gfc_match_type_spec): Whitespace.
3537 (gfc_match_function_decl): Defer characteristic association for
3538 all types except BT_UNKNOWN.
3539 * parse.c (decode_specification_statement): Only derived type
3540 function matching is delayed to the end of specification.
3542 2008-01-28 Tobias Burnus <burnus@net-b.de>
3545 * simplify.c (gfc_simplify_shape): Simplify rank zero arrays.
3547 2008-01-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3550 * array.c (gfc_check_constructor_type): Revert clearing the expression.
3552 2008-01-26 Tobias Burnus <burnus@net-b.de>
3555 * trans-expr.c (gfc_conv_function_call): Don't call
3556 gfc_add_interface_mapping if the expression is NULL.
3558 2008-01-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3561 * trans-array.c (gfc_trans_create_temp_array): Remove call to
3562 gcc_assert (integer_zerop (loop->from[n])).
3564 2008-01-25 Daniel Franke <franke.daniel@gmail.com>
3567 * resolve.c (resolve_where): Added check if user-defined assignment
3568 operator is an elemental subroutine.
3569 (gfc_resolve_where_code_in_forall): Likewise.
3571 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
3575 * gfortran.h: Revert changes from 2008-01-17.
3576 * match.c: Likewise.
3577 * symbol.c: Likewise.
3578 (gfc_undo_symbols): Undo namespace changes related to common blocks.
3580 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
3583 * data.c (formalize_structure_cons): Skip formalization on
3586 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
3588 * gfortran.texi (OpenMP): Extended existing documentation.
3589 (contributors): Added major contributors of 2008 that were
3591 (proposed extensions): Removed implemented items.
3593 2008-01-24 Paul Thomas <pault@gcc.gnu.org>
3596 * parse.c (next_statement) : If ST_GET_FCN_CHARACTERISTICS is
3597 seen, check for a statement label and, if present, delete it
3598 and set the locus to the start of the statement.
3600 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
3603 * trans-io.c (gfc_trans_transfer): If the array reference in a
3604 read has a vector subscript, use gfc_conv_subref_array_arg to
3605 copy back the temporary.
3607 2008-01-22 Tobias Burnus <burnus@net-b.de>
3610 * interface.c (compare_actual_formal): Fix adding type
3611 to missing_arg_type for absent optional arguments.
3613 2008-01-22 Tobias Burnus <burnus@net-b.de>
3616 * parse.c (parse_spec): Change = into ==.
3618 2008-01-22 Daniel Franke <franke.daniel@gmail.com>
3621 * expr.c (check_elemental): Fix check for valid data types.
3623 2008-01-22 Tobias Burnus <burnus@net-b.de>
3626 * scanner.c (load_line): Support <tab><digit> continuation lines.
3627 * invoke.texi (-Wtabs): Document this.
3629 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
3632 * module.c (read_module): Set use_rename attribute.
3634 2007-01-21 Tobias Burnus <burnus@net-b.de>
3637 * interface.c (compare_parameter): Improved error message
3638 for arguments of same type and mismatched kinds.
3640 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
3643 * resolve.c (resolve_entries): Do not do an array bounds check
3644 if the result symbols are the same.
3647 * module.c (read_module) : Hide the symtree of the previous
3648 version of the symbol if this symbol is renamed.
3650 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
3653 * array.c (gfc_check_constructor_type): Clear the expression ts
3654 so that the checking starts from the deepest level of array
3656 * primary.c (match_varspec): If an unknown type is changed to
3657 default character and the attempt to match a substring fails,
3658 change it back to unknown.
3661 * trans-array.c (gfc_add_loop_ss_code) : If ss->string_length is
3662 NULL for an array constructor, use the cl.length expression to
3664 (gfc_conv_array_parameter): Change call to gfc_evaluate_now to
3667 2008-01-19 Thomas Koenig <tkoenig@gcc.gnu.org>
3671 * iresolve.c (gfc_resolve_all): Remove conversion of mask
3672 argument to kind=1 by removing call to resolve_mask_arg().
3673 (gfc_resolve_any): Likewise.
3675 2008-01-19 Tobias Burnus <burnus@net-b.de>
3678 * primary.c (match_variable): Handle FL_UNKNOWN without
3679 uneducated guessing.
3680 (match_variable): Improve error message.
3682 2008-01-18 Tobias Burnus <burnus@net-b.de>
3685 * interface.c (get_expr_storage_size): Return storage size
3686 for array element designators.
3687 (compare_actual_formal): Reject unequal string sizes for
3688 assumed-shape dummy arguments. And fix error message for
3689 array-sections with vector subscripts.
3691 2008-01-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3694 * simplify.c (is_constant_array_expr): New static function that returns
3695 true if the given expression is an array and is constant.
3696 (gfc_simplify_reshape): Use new function.
3698 2008-01-17 H.J. Lu <hongjiu.lu@intel.com>
3701 * symbol.c (free_common_tree): Renamed to ...
3702 (gfc_free_common_tree): This. Remove static.
3703 (gfc_free_namespace): Updated.
3705 * gfortran.h (gfc_free_common_tree): New.
3707 * match.c (gfc_match_common): Call gfc_free_common_tree () with
3708 gfc_current_ns->common_root and set gfc_current_ns->common_root
3709 to NULL on syntax error.
3711 2008-01-18 Richard Sandiford <rsandifo@nildram.co.uk>
3714 * trans-expr.c (gfc_conv_function_call): Use proper
3715 type for returned character pointers.
3717 2008-01-17 Paul Thomas <pault@gcc.gnu.org>
3722 * decl.c : Remove gfc_function_kind_locus and
3723 gfc_function_type_locus. Add gfc_matching_function.
3724 (match_char_length): If matching a function and the length
3725 does not match, return MATCH_YES and try again later.
3726 (gfc_match_kind_spec): The same.
3727 (match_char_kind): The same.
3728 (gfc_match_type_spec): The same for numeric and derived types.
3729 (match_prefix): Rename as gfc_match_prefix.
3730 (gfc_match_function_decl): Except for function valued character
3731 lengths, defer applying kind, type and charlen info until the
3732 end of specification block.
3733 gfortran.h (gfc_statement): Add ST_GET_FCN_CHARACTERISTICS.
3734 parse.c (decode_specification_statement): New function.
3735 (decode_statement): Call it when a function has kind = -1. Set
3736 and reset gfc_matching function, as function statement is being
3738 (match_deferred_characteristics): Simplify with a single call
3739 to gfc_match_prefix. Do appropriate error handling. In any
3740 case, make sure that kind = -1 is reset or corrected.
3741 (parse_spec): Call above on seeing ST_GET_FCN_CHARACTERISTICS.
3742 Throw an error if kind = -1 after last specification statement.
3743 parse.h : Prototype for gfc_match_prefix.
3745 2008-01-16 Tobias Burnus <burnus@net-b.de>
3748 * interface.c (compare_parameter): Allow AS_DEFERRED array
3749 elements and reject attr.pointer array elemenents.
3750 (get_expr_storage_size): Return storage size of elements of
3751 assumed-shape and pointer arrays.
3753 2008-01-15 Sebastian Pop <sebastian.pop@amd.com>
3755 * f95-lang.c (gfc_init_builtin_functions): Initialize GOMP builtins
3756 for flag_tree_parallelize_loops.
3758 2008-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
3761 * iresolve.c (gfc_resolve_all): Call resolve_mask_arg.
3762 (gfc_resolve_any): Likewise.
3763 (gfc_resolve_count): Likewise. Don't append kind of
3764 argument to function name.
3766 2008-01-13 Tobias Burnus <burnus@net-b.de>
3769 * resolve.c (resolve_actual_arglist): For expressions,
3770 also check for assume-sized arrays.
3771 * interface.c (compare_parameter): Move F2003 character checks
3772 here, print error messages here, reject elements of
3773 assumed-shape array as argument to dummy arrays.
3774 (compare_actual_formal): Update for the changes above.
3776 2008-01-13 Tobias Burnus <burnus@net-b.de>
3779 * decl.c (contained_procedure): Only check directly preceeding state.
3781 2008-01-13 Tobias Burnus <burnus@net-b.de>
3784 * check.c (gfc_check_shape): Accept array ranges of
3785 assumed-size arrays.
3787 2008-01-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3790 * match.c (gfc_match_name): Don't error if leading character is a '(',
3791 just return MATCH_NO.
3793 2008-01-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3796 * trans-io.c (create_dummy_iostat): Commit the symbol.
3798 2008-01-11 Paul Thomas <pault@gcc.gnu.org>
3801 * simplify.c (gfc_simplify_transfer): Return NULL if the size
3802 of the element is unavailable and only assign character length
3803 to the result, if 'mold' is constant.
3805 2008-01-10 Paul Thomas <pault@gcc.gnu.org>
3808 * trans-array.c (gfc_trans_array_ctor_element): Use gfc_trans_string_copy
3809 to assign strings and perform bounds checks on the string length.
3810 (get_array_ctor_strlen): Remove bounds checking.
3811 (gfc_trans_array_constructor): Initialize string length checking.
3812 * trans-array.h : Add prototype for gfc_trans_string_copy.
3814 2008-01-08 Richard Guenther <rguenther@suse.de>
3817 PR tree-optimization/34683
3818 * trans-types.c (gfc_get_array_type_bounds): Use an array type
3819 with known size for accesses if that is known.
3821 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
3824 * expr.c (find_array_element): Check that the array bounds are
3825 constant before using them. Use lower, as well as upper bound.
3826 (check_restricted): Allow implied index variable.
3828 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
3831 * trans_array.c (gfc_trans_deferred_array): Do not null the
3832 data pointer on entering scope, nor deallocate it on leaving
3833 scope, if the symbol has the 'save' attribute.
3836 * trans_decl.c (gfc_finish_var_decl): Derived types with
3837 allocatable components and an initializer must be TREE_STATIC.
3839 2008-01-07 Paul Thomas <pault@gcc.gnu.org>
3842 * module.c (write_generic): Rewrite completely.
3843 (write_module): Change call to write_generic.
3845 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3848 * scanner.c (load_line): Do not count ' ' as printable when checking for
3851 2008-01-06 Paul Thomas <pault@gcc.gnu.org>
3854 * module.c (load_needed): If the namespace has no proc_name
3855 give it the module symbol.
3857 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3860 * trans-expr.c (gfc_conv_missing_dummy): Use a temporary to type convert
3861 the dummy variable expression, test for NULL, and pass the variable
3862 address to the called function.
3864 2007-01-06 Tobias Burnus <burnus@net-b.de>
3867 * match.c (gfc_match_common): Remove blank common in
3869 * resolve.c (resolve_common_vars): New function.
3870 (resolve_common_blocks): Move checks to resolve_common_vars
3871 and invoke that function.
3872 (resolve_types): Call resolve_common_vars for blank commons.
3874 2008-01-06 Tobias Burnus <burnus@net-b.de>
3877 * resolve.c (resolve_equivalence_derived): Reject derived types with
3878 default initialization if equivalenced with COMMON variable.
3880 2008-01-06 Tobias Burnus <burnus@net-b.de>
3883 * io.c (check_io_constraints): Disallow unformatted I/O for
3886 2008-01-06 Tobias Burnus <burnus@net-b.de>
3889 * resolve.c (resolve_formal_arglist): Reject dummy procedure in
3890 ELEMENTAL functions.
3892 2008-01-06 Tobias Burnus <burnus@net-b.de>
3895 * interface.c (compare_actual_formal): Reject parameter
3896 actual to intent(out) dummy.
3898 2008-01-04 Tobias Burnus <burnus@net-b.de>
3901 * primary.c (match_varspec): Gobble whitespace before