blob: 87973aa060e8c2c8227f3b1a8ad6e0b752b5ef2a [file] [log] [blame]
2019-11-14 Release Manager
* GCC 7.5.0 released.
2019-10-27 Paul Thomas <>
Backport from mainline
PR fortran/86248
* resolve.c (flag_fn_result_spec): Correct a typo before the
function declaration.
* trans-decl.c (gfc_sym_identifier): Boost the length of 'name'
to allow for all variants. Simplify the code by using a pointer
to the symbol's proc_name and taking the return out of each of
the conditional branches. Allow symbols with fn_result_spec set
that do not come from a procedure namespace and have a module
name to go through the non-fn_result_spec branch.
2019-10-18 Steven G. Kargl <>
PR fortran/69455
* trans-decl.c (generate_local_decl): Avoid misconstructed
intrinsic modules in a BLOCK construct.
2019-09-15 Thomas Koenig <>
Backport from trunk
PR fortran/91557
* trans-decl.c (generate_local_decl): Do not warn if the symbol
is artificial.
* trans-types.c (get_formal_from_actual_arglist): Set artificial
attribute on dummy arguments.
2019-09-12 Paul Thomas <>
PR fortran/91686
Backport from mainline
* trans-expr.c (gfc_trans_assignment_1): Copy and paste section
handling the rse.pre block from mainline.
2019-08-30 Jakub Jelinek <>
Backported from mainline
2019-05-30 Jakub Jelinek <>
* lang.opt (ftail-call-workaround=): Fix a typo - lenghts to lengths.
2019-05-16 Jakub Jelinek <>
PR fortran/90329
* lang.opt (fbroken-callers): Remove.
(ftail-call-workaround, ftail-call-workaround=): New options.
* gfortran.h (struct gfc_namespace): Add implicit_interface_calls.
* interface.c (gfc_procedure_use): Set implicit_interface_calls
for calls to implicit interface procedures.
* trans-decl.c (create_function_arglist): Use flag_tail_call_workaround
instead of flag_broken_callers. If it is not 2, also require
* invoke.texi (fbroken-callers): Remove documentation.
(ftail-call-workaround, ftail-call-workaround=): Document.
2019-05-19 Thomas Koenig <>
PR fortran/90329
* invoke.texi: Document -fbroken-callers.
* lang.opt: Add -fbroken-callers.
* trans-decl.c (create_function_arglist): Only set
DECL_HIDDEN_STRING_LENGTH if flag_broken_callers is set.
2019-05-16 Jakub Jelinek <>
PR fortran/90329
* trans-decl.c (create_function_arglist): Set
DECL_HIDDEN_STRING_LENGTH on hidden string length PARM_DECLs if
len is constant.
2019-03-11 Jakub Jelinek <>
PR fortran/89651
* trans-openmp.c (gfc_omp_clause_default_ctor): Set TREE_NO_WARNING
on decl if adding COND_EXPR for allocatable.
(gfc_omp_clause_copy_ctor): Set TREE_NO_WARNING on dest.
2019-02-01 Jakub Jelinek <>
PR fortran/83246
PR fortran/89084
* trans-decl.c (generate_local_decl): Add referenced FL_PARAMETERs
if sym->ns->construct_entities rather than if
sym->ns->parent->code->op == EXEC_BLOCK.
2019-01-19 Jakub Jelinek <>
PR fortran/88902
* trans-decl.c (gfc_get_symbol_decl): Don't add length to function
or parent function if it has been added there already.
2018-12-07 Jakub Jelinek <>
PR fortran/88377
* trans-openmp.c (gfc_omp_clause_default_ctor,
gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
gfc_omp_clause_linear_ctor, gfc_omp_clause_dtor): Only consider
GFC_DECL_GET_SCALAR_ALLOCATABLE vars as scalar allocatables if they
have pointer type.
2018-10-25 Jakub Jelinek <>
PR fortran/87725
* openmp.c (gfc_match_omp_clauses): Parse simd, monotonic and
nonmonotonic modifiers regardless of if they have been parsed
already or if the opposite one has. Fix up check whether
comma after modifier should be parsed.
(resolve_omp_clauses): Diagnose schedule modifier restrictions.
2019-08-03 Thomas Koenig <>
Paul Thomas <>
Backport from trunk
PR fortran/90786
PR fortran/90813
* trans-expr.c (pointer_assignment_is_proc_pointer) Remove as
it is very simple and only called from one place.
(gfc_trans_pointer_assignment): Rename non_proc_pointer_assign
as non_proc_ptr_assign. Assign to it directly, rather than call
to above, deleted function and use gfc_expr_attr instead of
only checking the reference chain.
* trans-decl.c (sym_identifier): New function.
(mangled_identifier): New function, doing most of the work
of gfc_sym_mangled_identifier.
(gfc_sym_mangled_identifier): Use mangled_identifier. Add mangled
identifier to global symbol table.
(get_proc_pointer_decl): Use backend decl from global identifier
if present.
2019-06-21 Thomas Koenig <>
Backport from trunk
PR fortran/90937
* trans-types.c (get_formal_from_actual_arglist): Get symbol from
current namespace so it will be freed later. If symbol is of type
character, get an empty character length.
2019-06-12 Thomas Koenig <>
Tomáš Trnka <>
Backport from trunk
PR fortran/90744
* trans-types.c (get_formal_from_actual_arglist): Unset typespec
flags which make no sense for procedures without explicit
2019-05-05 Thomas Koenig <>
PR fortran/90344
* frontend-passes.c (create_var): Bring into sync with gcc 8.
2019-04-14 Thomas Koenig <>
PR fortran/87352
Backport from trunk
* gfortran.h (gfc_component): Add finalized field.
* class.c (finalize_component): If the component is already
finalized, return early. Set component->finalized on exit.
2019-04-10 Harald Anlauf <>
Backport from trunk
PR fortran/89904
* check.c (gfc_check_transfer): Reject procedures as actual
arguments for SOURCE and MOLD of TRANSFER intrinsic.
2019-03-31 Harald Anlauf <>
Backport from trunk
PR fortran/83515
PR fortran/85797
* trans-types.c (gfc_typenode_for_spec): Handle conversion for
procedure pointers.
* target-memory.c (gfc_element_size): Handle size determination
for procedure pointers.
2019-03-25 Janus Weil <>
PR fortran/71861
Backport from trunk
* symbol.c (check_conflict): ABSTRACT attribute conflicts with
INTRINSIC attribute.
2019-03-23 Thomas Koenig <>
PR fortran/68009
Backport from trunk
* iresolve.c: Include trans.h.
(gfc_resolve_fe_runtine_error): Set backend_decl on
2019-03-17 Thomas Koenig <>
PR fortran/84394
Backport from trunk
* symbol.c (gfc_add_subroutine): If we are encountering a
subrtoutine within a BLOCK DATA and the name starts with an
underscore, do not check.
2019-03-16 Thomas Koenig <>
PR fortran/66089
Backport from trunk
* trans-array.c (gfc_scalar_elemental_arg_saved_as_reference):
Return false if a scalar tempoary is needed.
(gfc_walk_variable_expr): Fix up class refs.
2019-03-16 Thomas Koenig <>
PR fortran/66695
PR fortran/77746
PR fortran/79485
Backport from trunk
* gfortran.h (gfc_symbol): Add bind_c component.
(gfc_get_gsymbol): Add argument bind_c.
* decl.c (add_global_entry): Add bind_c argument to
* parse.c (parse_block_data): Likewise.
(parse_module): Likewise.
(add_global_procedure): Likewise.
(add_global_program): Likewise.
* resolve.c (resolve_common_blocks): Likewise.
(resolve_global_procedure): Likewise.
(gfc_verify_binding_labels): Likewise.
* symbol.c (gfc_get_gsymbol): Add argument bind_c. Set bind_c
in gsym.
* trans-decl.c (gfc_get_module_backend_decl): Add bind_c argument
to gfc_get_symbol.
(gfc_get_extern_function_decl): If the sym has a binding label
and it cannot be found in the global symbol tabel, it is the wrong
one and vice versa.
2019-03-13 Thomas Koenig <>
PR fortran/87673
Backport from trunk
* match.c (gfc_match_type_spec): Remove call to
gfc_resolve_expr for character length.
2019-03-10 Thomas Koenig <>
PR fortran/71544
Backport from trunk
* trans-types.c (gfc_typenode_for_spec) Set ts->is_c_interop of
(create_fn_spec): Mark argument as escaping if ts->is_c_interop is set.
2019-03-10 Thomas Koenig <>
Steven G. Kargl <>
PR fortran/87734
Backort from trunk
* symbol.c (gfc_add_procedure): Only throw an error if the
procedure has not been declared either PUBLIC or PRIVATE.
* resolve.c (is_illegal_recursion): Remove an assert().
2019-03-06 Thomas Koenig <>
PR fortran/72714
Backport from trunk
* resolve.c (resolve_allocate_expr): Add some tests for coarrays.
2019-03-03 Harald Anlauf <>
Steven G. Kargl <>
Backport from trunk
PR fortran/77583
* symbol.c (check_conflict): Check for valid procedure name
passed to error reporting routine.
2019-03-03 Thomas Koenig <>
PR fortran/87689
Backport from trunk
* trans-decl.c (gfc_get_extern_function_decl): Add argument
actual_args and pass it through to gfc_get_function_type.
* trans-expr.c (conv_function_val): Add argument actual_args
and pass it on to gfc_get_extern_function_decl.
(conv_procedure_call): Pass actual arguments to conv_function_val.
* trans-types.c (get_formal_from_actual_arglist): New function.
(gfc_get_function_type): Add argument actual_args. Generate
formal args from actual args if necessary.
* trans-types.h (gfc_get_function_type): Add optional argument.
* trans.h (gfc_get_extern_function_decl): Add optional argument.
2019-02-23 Paul Thomas <>
Backport from trunk
PR fortran/88117
* resolve.c (deferred_op_assign): Return if the lhs expression
has the pointer attribute.
2019-02-23 Thomas Koenig <>
PR fortran/71066
Backport from trunk
* trans-decl.c (generate_coarray_sym_init): For an array
constructor in a DATA statement of a coarray variable, set the
rank to 1 to avoid confusion later on. If the constructor
contains only one value, use that for initiailizig.
2019-02-10 Harald Anlauf <>
Backport from trunk
PR fortran/89077
* decl.c (add_init_expr_to_sym): Copy length of string initializer
to declared symbol.
2019-02-10 Thomas Koenig <>
PR fortran/71723
Backport from trunk
* expr.c (gfc_check_assign): Add argument is_init_expr. If we are
looking at an init expression, issue error if the target is not a
TARGET and we are not looking at a procedure pointer.
* gfortran.h (gfc_check_assign): Add optional argument
2019-02-05 Thomas Koenig <>
PR fortran/67679
Backport from trunk
* trans-array.c (gfc_array_allocate): For setting the bounds on
the new array, add a condition for a not previously allocated
2019-02-03 Paul Thomas <>
Backport from trunk
PR fortran/88393
* trans-expr.c (gfc_conv_procedure_call): For derived entities,
passed in parentheses to class formals, invert the order of
copying allocatable components to taking the _data of the
class expression.
2019-02-02 Thomas Koenig <>
PR fortran/88298
Backport from trunk
* arith.c (gfc_int2int): Do not warn if src->do_not_warn is set.
* gfortran.h (gfc_expr): Add flag do_not_warn.
* intrinsic.c (gfc_convert_type_warn): Set expr->do_not_warn if
no warning is desired.
2019-02-02 Thomas Koenig <>
PR fortran/57048
Backport from trunk
* interface.c (gfc_compare_types): If a derived type and an
integer both have a derived type, and they are identical,
this is a C binding type and compares equal.
2019-01-27 Paul Thomas <>
Backport from trunk
PR fortran/56386
PR fortran/58906
PR fortran/77385
PR fortran/80260
PR fortran/82077
* resolve.c (resolve_variable): Fix up expressions with array
associate names, where the parser did not detect that this is
array and there was no array part_ref in the expression.
* trans-expr.c (gfc_find_and_cut_at_last_class_ref): base_expr
should be a copy of e and not the initialization expr.
2019-01-15 Steven G. Kargl <>
PR fortran/81849
* resolve.c (resolve_symbol): Host associated varaibles can appear
in the specification statement of a RESULT array.
2019-01-11 Steven G. Kargl <>
PR fortran/35031
* decl.c (gfc_match_entry): Check for F2018:C1546. Fix nearby
2018-12-29 Paul Thomas <>
Backport from trunk
PR fortran/82550
* trans_decl.c (gfc_get_symbol_decl): Procedure symbols that
have the 'used_in_submodule' attribute should be processed by
2018-12-23 Paul Thomas <>
Backport from trunk
PR fortran/77703
* resolve.c (get_temp_from_expr): Use the string length of
constant character expressions.
2018-12-22 Steven G . Kargl <>
PR fortran/85798
* decl.c (gfc_match_data): If a component of a derived type entity
appears in data statement, check that does not have the allocatable
2018-12-22 Thomas Koenig <>
Backport from trunk
PR fortran/85544
* frontend-passes.c (optimize_power): Remove.
(optimize_op): Remove call to optimize_power.
* trans-expr.c (gfc_conv_power_op): Handle cases of 1**integer,
(2|4|8|16) ** integer and (-1) ** integer.
2018-12-21 Steven G. Kargl <>
PR fortran/88169
* module.c (mio_namelist): Remove an error condition/message that
is contrary to the Fortran standard.
2018-12-15 Steven G. Kargl <>
PR fortran/88138
* decl.c (variable_decl): Check that a derived isn't being assigned
an incompatible entity in an initialization.
2018-12-11 Steven G. Kargl <>
PR fortran/88155
* primary.c (gfc_match_structure_constructor): Set the locus of
an expression to avoid a NULL pointer dereference.
2018-12-11 Steven G. Kargl <>
PR fortran/88249
* gfortran.h: Update prototype for gfc_resolve_filepos().
* io.c (gfc_resolve_filepos): Check for UNIT number if ERR= is present.
Use passed in locus for error message.
* resolve.c (gfc_resolve_code): Pass locus in gfc_resolve_filepos()
2018-12-10 Steven G. Kargl <>
PR fortran/88269
* io.c (io_constraint): Update macro. If locus line buffer is NULL,
use gfc_current_locus in error messages.
(check_io_constraints): Catch missing IO UNIT in write and read
statements. io_constraint macro is incompatible here.
2018-12-09 Steven G. Kargl <>
PR fortran/88205
* io.c (gfc_match_open): Move NEWUNIT checks to after STATUS checks.
2018-12-09 Steven G. Kargl <>
PR fortran/88206
* match.c (gfc_match_type_spec): REAL can be an intrinsic function.
2018-12-09 Fritz Reese <>
PR fortran/88228
* resolve.c (resolve_operator): Do not call resolve_function.
Break like other cases.
2018-12-06 Release Manager
* GCC 7.4.0 released.
2018-11-25 Thomas Koenig <>
Backport from trunk
PR fortran/88073
* frontend-passes.c (combine_array_constructor): Do not do
anything if in a WHERE statement.
2018-11-24 Paul Thomas <>
Backport from mainline
PR fortran/88143
* resolve.c (resolve_variable): Check for associate names with
NULL target.
2019-11-03 Tobias Burnus <>
Thomas Koenig <>
Backport from trunk
PR fortran/87597
* expr.c (gfc_simplify_expr): Avoid simplifying
the 'array' argument to lbound/ubound/lcobound/
2018-10-12 Jakub Jelinek <>
Backported from mainline
2018-07-10 Jakub Jelinek <>
PR fortran/86421
* module.c (omp_declare_simd_clauses): Add LINEAR with _REF, _VAL and
_UVAL suffixes.
(mio_omp_declare_simd): Save and restore ref, val and uval modifiers
on linear clauses. Initialize n->where to gfc_current_locus.
2018-09-13 Paul Thomas <>
Backported from trunk
PR fortran/87284
* trans-expr.c (gfc_trans_class_init_assign): Access to
to array elements of the dynamic type requires that the array
reference be added to the class expression and not the _data
component, unlike scalar expressions.
2018-09-07 Janus Weil <>
Backported from trunk
PR fortran/86116
* interface.c (compare_type): Remove a CLASS/TYPE check.
(compare_type_characteristics): New function that behaves like the old
(gfc_check_dummy_characteristics, gfc_check_result_characteristics):
Call 'compare_type_characteristics' instead of 'compare_type'.
2018-07-16 Fritz Reese <>
PR fortran/83184
Backport from trunk.
* decl.c (match_old_style_init): Initialize locus of variable expr when
creating a data variable.
(match_clist_expr): Verify array is explicit shape/size before
attempting to allocate constant array constructor.
2018-07-16 Fritz Reese <>
Backport from trunk:
PR fortran/86417
* module.c (mio_component): Set component->loc when loading from module.
PR fortran/83183
PR fortran/86325
* expr.c (class_allocatable, class_pointer, comp_allocatable,
comp_pointer): New helpers.
(component_initializer): Generate EXPR_NULL for allocatable or pointer
components. Do not generate initializers for components within BT_CLASS.
Do not assign to comp->initializer.
(gfc_generate_initializer): Use new helpers; move code to generate
EXPR_NULL for class allocatable components into component_initializer().
2018-07-03 Paul Thomas <>
PR fortran/82969
PR fortran/86242
* trans-array.c (structure_alloc_comps): Do not explicitly copy
procedure pointer components.
2018-06-25 Fritz Reese <>
PR fortran/82972
PR fortran/83088
PR fortran/85851
Backport from trunk.
* expr.c (component_initializer): Assign init expr to c->initializer.
(generate_isocbinding_initializer): New.
(gfc_generate_initializer): Call generate_isocbinding_initializer to
generate initializers for c_ptr and c_funptr with -finit-derived.
2018-06-25 Paul Thomas <>
PR fortran/83118
Back port from trunk
* resolve.c (resolve_ordinary_assign): Force the creation of a
vtable for assignment of non-polymorphic expressions to an
unlimited polymorphic object.
* trans-array.c (gfc_alloc_allocatable_for_assignment): Use the
size of the rhs type for such assignments. Set the dtype, _len
and vptrs appropriately.
* trans-expr.c (gfc_trans_assignment): Force the use of the
_copy function for these assignments.
2018-06-22 Jakub Jelinek <>
Backported from mainline
2018-04-10 Jakub Jelinek <>
PR fortran/85313
* openmp.c (resolve_omp_do): Remove bogus if (j < i) break;.
(resolve_oacc_nested_loops): Likewise. Formatting fix.
2018-06-13 Steven G. Kargl <>
PR fortran/86110
* array.c (gfc_resolve_character_array_constructor): Avoid NULL
pointer dereference.
2018-06-12 Steven G. Kargl <>
PR fortran/44491
* expr.c (gfc_check_assign): Select non-NULL locus.
2018-06-09 Steven G. Kargl <>
PR fortran/38351
* resolve.c (resolve_operator): Provide better error message for
derived type entity used in an binary intrinsic numeric operator.
2018-06-09 Steven G. Kargl <>
PR fortran/63514
* symbol.c (gfc_add_volatile): Enforce F2008:C1282 and F2018:C1588.
2018-06-09 Steven G. Kargl <>
PR fortran/78278
* data.c (gfc_assign_data_value): Re-arrange code to allow for
an error for double initialization of CHARACTER entities.
2018-06-09 Steven G. Kargl <>
PR fortran/86059
* array.c (match_array_cons_element): NULL() cannot be in an
array constructor.
2018-06-09 Steven G. Kargl <>
PR fortran/85138
PR fortran/85996
PR fortran/86051
* decl.c (gfc_match_char_spec): Use private namespace in attempt to
reduce a charlen to a constant.
2018-06-07 Steven G. Kargl <>
PR fortran/86045
Backport from trunk.
* simplify.c (gfc_simplify_mod): Re-arrange code to test whether
'P' is zero and issue an error if it is.
2018-06-07 Thomas Koenig <>
PR fortran/85641
Backport from trunk.
* frontend-passes.c (is_fe_temp): Add prototype.
(realloc_string_callback): Early return for frontend-generated
2018-06-04 Steven G. Kargl <>
PR fortran/85981
* resolve.c (resolve_allocate_deallocate): Check errmsg is default
character kind.
2018-05-25 Steven G. Kargl <>
PR fortran/85543
Backport from trunk
* resolve.c (update_current_proc_array_outer_dependency): Avoid NULL
pointer dereference.
2018-05-25 Steven G. Kargl <>
PR fortran/85779
Backport from trunk
* decl.c (gfc_match_derived_decl): Fix NULL point dereference.
2018-05-25 Steven G. Kargl <>
PR fortran/85780
Backport from trunk
* resolve.c (resolve_fl_procedure): Avoid NULL dereference.
2018-05-25 Steven G. Kargl <>
PR fortran/85895
Backport from trunk
* resolve.c (resolve_sync): Resolve expression before checking for
an error.
2018-05-20 Paul Thomas <>
PR fortran/80657
Backport from trunk
* resolve.c (flag_fn_result_spec): Use the 'sym' argument to
test for self refs to the function result in the character len
expression. If a self reference is found, emit an error and
return true.
(resolve_fntype): Use the function symbol in the calls to the
2018-05-20 Paul Thomas <>
PR fortran/82275
Backport from trunk
* match.c (gfc_match_type_spec): Go through the array ref and
decrement 'rank' for every dimension that is an element.
2018-05-19 Paul Thomas <>
PR fortran/82923
PR fortran/66694
PR fortran/82617
Backport from trunk
* trans-array.c (gfc_alloc_allocatable_for_assignment): Set the
charlen backend_decl of the rhs expr to ss->info->string_length
so that the value in the current scope is used.
2018-05-16 Paul Thomas <>
PR fortran/83149
Backport from trunk
* trans-decl.c (gfc_finish_var_decl): Test sym->ns->proc_name
before accessing its components.
* trans-types.c (gfc_sym_type): If a character result has null
backend_decl, try the procedure symbol..
2018-16-05 Paul Thomas <>
PR fortran/83898
Backport from trunk
* trans-stmt.c (trans_associate_var): Do not set cst_array_ctor
for characters.
2018-05-16 Paul Thomas <>
PR fortran/84546
Backport from trunk
* trans-array.c (structure_alloc_comps): Make sure that the
vptr is copied and that the unlimited polymorphic _len is used
to compute the size to be allocated.
(build_array_ref): Set the 'unlimited' argument false in the
call to gfc_get_class_array_ref.
* trans-expr.c (gfc_get_class_array_ref): If unlimited, use the
unlimited polymorphic _len for the offset to the element.
(gfc_copy_class_to_class): Set the new 'unlimited' argument.
* trans.h : Add the boolean 'unlimited' to the prototype.
2018-05-12 Steven G. Kargl <>
PR fortran/85542
Backport from trunk
* expr.c (check_inquiry): Avoid NULL pointer dereference.
2018-05-12 Paul Thomas <>
PR fortran/68846
PR fortran/70864
Backport from trunk
* resolve.c (get_temp_from_expr): The temporary must not have
dummy or intent attributes.
2018-05-11 Steven G. Kargl <>
PR fortran/70870
Backport from trunk
* data.c (gfc_assign_data_value): Check that a data object does
not also have default initialization.
2018-05-11 Steven G. Kargl <>
PR fortran/85521
Backport from trunk
* array.c (gfc_resolve_character_array_constructor): Substrings
with upper bound smaller than lower bound are zero length strings.
2018-05-11 Steven G. Kargl <>
PR fortran/85687
Backport from trunk
* check.c (gfc_check_rank): Check that the argument is a data object.
2018-05-06 Andre Vehreschild <>
PR fortran/85507
Backport from trunk.
* dependency.c (gfc_dep_resolver): Revert looking at coarray dimension
introduced by r259385.
* trans-intrinsic.c (conv_caf_send): Always report a dependency for
same variables in coarray assignments.
2018-04-28 Andre Vehreschild <>
PR fortran/81773
PR fortran/83606
Backport from trunk.
* dependency.c (gfc_dep_resolver): Coarray indexes are to be ignored
during dependency computation. They define no data dependency.
* trans-array.c (conv_array_index_offset): The stride can not be set
here, prevent fail.
* trans-intrinsic.c (conv_caf_send): Add creation of temporary array
for caf_get's result and copying to the array with vectorial
2018-04-24 Steven G. Kargl <>
PR fortran/85520
* decl.c (gfc_match_char_spec): Check for negative length and set to 0.
2018-03-28 Thomas Koenig <>
PR fortran/85084
Backport from trunk.
* frontend-passes.c (gfc_run_passes): Do not run front-end
optimizations if a previous error occurred.
2018-03-20 Steven G. Kargl <>
PR fortran/85001
* interface.c (symbol_rank): Remove bogus null pointer check that
crept in when translating a ternary operator into an if-else
2018-03-19 Thomas Koenig <>
PR fortran/84931
Backport from trunk
* simplify.c (gfc_convert_constant): Correctly handle iterators
for type conversion.
2018-03-19 Steven G. Kargl <>
PR fortran/77414
* decl.c (get_proc_name): Check for a subroutine re-defined in
the contain portion of a subroutine. Change language of existing
error message to better describe the issue. While here fix whitespace
2018-03-19 Steven G. Kargl <>
PR fortran/65453
* decl.c (get_proc_name): Catch clash between a procedure statement
and a contained subprogram
2018-03-15 Steven G. Kargl <>
PR fortran/78741
* decl.c (get_proc_name): Check for clash of entry name with
subroutine name.
2018-03-12 Steven G. Kargl <>
PR fortran/83939
* resolve.c (resolve_fl_procedure): Enforce F2018:C15100.
2018-03-10 Steven G. Kargl <>
PR fortran/84734
* arith.c (check_result, eval_intrinsic): If result overflows, pass
the expression up the chain instead of a NULL pointer.
2018-03-08 Steven G. Kargl <>
PR fortran/64124
PR fortran/70409
* decl.c (gfc_match_char_spec): Try to reduce a charlen to a constant.
2018-03-06 Steven G. Kargl <>
PR fortran/56667
* primary.c (match_sym_complex_part): Give the matcher for an implied
do-loop a chance to run.
2018-03-04 Paul Thomas <>
PR fortran/83076
* resolve.c (resolve_fl_derived0): Add caf_token fields for
allocatable and pointer scalars, when -fcoarray selected.
* trans-types.c (gfc_copy_dt_decls_ifequal): Copy the token
field as well as the backend_decl.
(gfc_get_derived_type): Flag GFC_FCOARRAY_LIB for module
derived types that are not vtypes. Components with caf_token
attribute are pvoid types. For a component requiring it, find
the caf_token field and have the component token field point to
its backend_decl.
2018-03-03 Harald Anlauf <>
PR fortran/71085
* trans-expr.c (gfc_apply_interface_mapping_to_expr): Do not
dereference NULL pointer.
2018-03-03 Steven G. Kargl <>
PR fortran/51434
* simplify.c (gfc_simplify_transfer): Resolve mold.
2018-03-03 Paul Thomas <>
PR fortran/80965
* resolve.c (build_loc_call): Change symtree name from 'loc' to
2018-03-03 Paul Thomas <>
Backported from trunk.
PR fortran/78990
* expr.c (gfc_is_class_array_function): Renamed from
'gfc_is_alloc_class_array_function' and modified to return true
for pointers as well as allocatable results.
* gfortran.h : Change of name for prototype of above function.
* trans-array.c (gfc_add_loop_ss_code): Force finalization of
class array results.
(build_class_array_ref): Change assertion into a condition.
(build_class_array_ref): Set the se class_vptr for class array
function results.
(gfc_walk_function_expr): Reference gfc_is_class_array_function
as above.
* trans-decl.c (get_proc_result): Move it up before
(gfc_trans_deferred_vars): Nullify explicit return class arrays
on entry.
* trans-expr.c (gfc_conv_class_to_class): Allow conversion of
class array functions that have an se class_vptr and use it
for the result vptr.
(gfc_conv_subref_array_arg): Rename reference to the above
(gfc_conv_procedure_call): Ditto. Add the se pre block to the
loop pre block before the function is evaluated. Do not
finalize class pointer results.
(arrayfunc_assign_needs_temporary, gfc_trans_assignment_1) More
renamed references.
* trans-intrinsic.c (gfc_conv_intrinsic_size): Ditto.
2018-03-03 Jakub Jelinek <>
Backported from mainline
2018-02-16 Jakub Jelinek <>
PR fortran/84418
* trans-openmp.c (gfc_trans_omp_clauses): For OMP_CLAUSE_LINEAR_REF
kind set OMP_CLAUSE_LINEAR_STEP to TYPE_SIZE_UNIT times last_step.
2018-01-31 Jakub Jelinek <>
PR fortran/84116
* openmp.c (gfc_match_omp_clauses): If all the linear
gfc_match_omp_variable_list calls failed, don't gfc_free_omp_namelist
nor set *head = NULL. Formatting fixes.
2018-02-25 Steven G. Kargl <>
ChangeLog for r257972
PR fortran/83633
* decl.c (variable_decl): Check that an explicit-shape-array with
nonconstant bounds is allowed.
2018-02-25 Thomas Koenig <>
PR fortran/78238
Backport from trunk
* gfortran.h (gfc_integer_4_kind): Define.
* resolve.c (resolve_select_type): Make sure that the
kind of c->high is gfc_integer_4_kind.
2018-02-24 Steven G. Kargl <>
PR fortran/30792
* decl.c (gfc_match_data): Check for invalid substring in
2018-02-23 Steven G. Kargl <>
PR fortran/84511
* trans-io.c (transfer_expr): Deal with C_LOC in transfer statement.
2018-02-23 Steven G. Kargl <>
PR fortran/84346
* interface.c (compare_actual_formal): Issue error if keyword is
used in a statement function.
2018-02-23 Jerry DeLisle <>
Backport from trunk
PR fortran/84506
* trans-io.c (set_parameter_value_inquire): Adjust range check of
negative unit values for kind=8 units to the kind=4 negative limit.
2018-02-22 Thomas Koenig <>
PR fortran/81116
PR fortran/84495
* gfortran.dg/realloc_on_assignment_29.f90: New test.
2018-02-19 Jerry DeLisle <>
Backport from trunk
PR fortran/82007
* resolve.c (resolve_transfer): Delete code looking for 'DT'
format specifiers in format strings. Set formatted to true if a
format string or format label is present.
* trans-io.c (get_dtio_proc): Likewise. (transfer_expr): Fix
2018-02-17 Thomas Koenig <>
Backport from trunk
PR fortran/84270
* frontend-passes (scalarized_expr): If the expression
is an assumed size array, leave in the last reference
and pass AR_SECTION instead of AR_FULL to gfc_resolve
in order to avoid an error.
2018-02-13 Alastair McKinstry <>
Janne Blomqvist <>
* module.c (dump_module): Use lbasename to ensure that module
files are reproducible.
2018-02-12 Thomas Koenig <>
PR fortran/68560
* trans-intrinsic.c (gfc_conv_intrinsic_shape): New function.
(gfc_conv_intrinsic_function): Call it.
2018-02-12 Francois-Xavier Coudert <>
PR fortran/35299
ChangeLog for r257566
* resolve.c (resolve_formal_arglist): Update error message.
2018-02-12 Steven G. Kargl <>
PR fortran/54223
PR fortran/84276
* interface.c (compare_actual_formal): Add in_statement_function
bool parameter. Skip check of INTENT attribute for statement
functions. Arguments to a statement function cannot be optional,
issue error for missing argument.
(gfc_procedure_use, gfc_ppc_use, gfc_arglist_matches_symbol): Use
2018-02-07 Steven G. Kargl <>
PR fortran/82994
* match.c (gfc_match_deallocate): Check for NULL pointer.
2018-02-07 Steven G. Kargl <>
PR fortran/82049
* match.c (gfc_match_type_spec): If the charlen is non-NULL, then
try to resolve it. While here return early if possible.
2018-01-25 Release Manager
* GCC 7.3.0 released.
2018-01-20 Steven G. Kargl <>
PR fortran/83900
* simplify.c (gfc_simplify_matmul): Set return type correctly.
2018-01019 Steven G. Kargl <>
PR fortran/83900
* simplify.c (gfc_simplify_matmul): Delete bogus assertion.
2018-01-19 Steven G. Kargl <>
Backport of r250734 from mainline
PR fortran/80768
* check.c (gfc_check_num_images): Fix typo.
2018-01-18 Harald Anlauf <>
Backport from mainline
PR fortran/83864
* expr.c (gfc_apply_init): Do not dereference NULL pointer.
2018-01-17 Harald Anlauf <>
Backport from mainline
PR fortran/83874
* decl.c (add_init_expr_to_sym): Do not dereference NULL pointer.
2018-01-13 Steven G. Kargl <>
Backport from mainline
PR fortran/78814
* interface.c (symbol_rank): Check for NULL pointer.
2018-01-10 Steven G. Kargl <>
Backport from trunk
PR fortran/82367
* resolve.c (resolve_allocate_expr): Check for NULL pointer.
2018-01-10 Steven G. Kargl <>
Backport from trunk
PR fortran/83093
* resolve.c (resolve_charlen): Check the type of cl->length
after resolution.
2018-01-10 Steven G. Kargl <>
Backport r254555 from trunk
PR Fortran/82841
* simplify.c(gfc_simplify_transfer): Do not dereference a NULL pointer.
Unwrap a short line.
2018-01-04 Steven G. Kargl <>
PR Fortran/83679
* simplify.c (gfc_simplify_cshift): Restore early return for zero-sized
array. Update Copyright year while here.
2018-01-02 Thomas Koenig <>
PR fortran/83650
* simplify.c (gfc_simplify_cshift): Correct contition for
negative shifts.
2017-12-28 Steven G. Kargl <>
PR Fortran/83548
* match.c (gfc_match_type_spec): Check for LOGICAL conflict in
type-spec versus LOGICAL intrinsic subprogram.
2017-12-15 Jakub Jelinek <>
Backported from mainline
2017-11-24 Jakub Jelinek <>
PR fortran/81304
* trans-openmp.c (gfc_trans_omp_array_reduction_or_udr): Set
attr.implicit_type in intrinsic_sym to avoid undesirable warning.
2017-11-23 Dirk Broemmel <>
Jakub Jelinek <>
PR fortran/81841
* parse.c (parse_spec): Allow ST_OMP_THREADPRIVATE inside of
2017-11-28 Paul Thomas <>
PR fortran/83021
* resolve.c (resolve_component): Only escape for use assciated
vtypes if the current namespace has no proc_name and is most
particularly block data.
2017-11-23 Paul Thomas <>
Backported from trunk
PR fortran/79072
* trans-expr.c (trans_class_vptr_len_assignment): Set from_len
if the temporary is unlimited polymorphic.
* trans-stmt.c (trans_associate_var): Use the fake result decl
to obtain the 'len' field from an explicit function result when
in that function scope.
2017-11-21 Paul Thomas <>
Backported from trunk fix for PR82586
PR fortran/78686
* resolve.c (resolve_generic_f): Check usage of derived type by
calling gfc_use_derived.
2017-11-13 Paul Thomas <>
Backport from trunk
PR fortran/82934
* trans-stmt.c (gfc_trans_allocate): Remove the gcc_assert on
null string length for assumed length typespec and set
expr3_esize to NULL_TREE;
2017-11-13 Paul Thomas <>
Backport from trunk
PR fortran/78619
* check.c (same_type_check): Introduce a new argument 'assoc'
with default value false. If this is true, use the symbol type
spec of BT_PROCEDURE expressions.
(gfc_check_associated): Set 'assoc' true in the call to
2017-11-13 Janne Blomqvist <>
PR 82869
* convert.c (truthvalue_conversion): Use logical_type_node.
* trans-array.c (gfc_trans_allocate_array_storage): Likewise.
(gfc_trans_create_temp_array): Likewise.
(gfc_trans_array_ctor_element): Likewise.
(gfc_trans_array_constructor_value): Likewise.
(trans_array_constructor): Likewise.
(trans_array_bound_check): Likewise.
(gfc_conv_array_ref): Likewise.
(gfc_trans_scalarized_loop_end): Likewise.
(gfc_conv_array_extent_dim): Likewise.
(gfc_array_init_size): Likewise.
(gfc_array_allocate): Likewise.
(gfc_trans_array_bounds): Likewise.
(gfc_trans_dummy_array_bias): Likewise.
(gfc_conv_array_parameter): Likewise.
(duplicate_allocatable): Likewise.
(duplicate_allocatable_coarray): Likewise.
(structure_alloc_comps): Likewise
(get_std_lbound): Likewise
(gfc_alloc_allocatable_for_assignment): Likewise
* trans-decl.c (add_argument_checking): Likewise
(gfc_generate_function_code): Likewise
* trans-expr.c (gfc_copy_class_to_class): Likewise
(gfc_trans_class_array_init_assign): Likewise
(gfc_trans_class_init_assign): Likewise
(gfc_conv_expr_present): Likewise
(gfc_conv_substring): Likewise
(gfc_conv_cst_int_power): Likewise
(gfc_conv_expr_op): Likewise
(gfc_conv_procedure_call): Likewise
(fill_with_spaces): Likewise
(gfc_trans_string_copy): Likewise
(gfc_trans_alloc_subarray_assign): Likewise
(gfc_trans_pointer_assignment): Likewise
(gfc_trans_scalar_assign): Likewise
(fcncall_realloc_result): Likewise
(alloc_scalar_allocatable_for_assignment): Likewise
(trans_class_assignment): Likewise
(gfc_trans_assignment_1): Likewise
* trans-intrinsic.c (build_fixbound_expr): Likewise
(gfc_conv_intrinsic_aint): Likewise
(gfc_trans_same_strlen_check): Likewise
(conv_caf_send): Likewise
(trans_this_image): Likewise
(conv_intrinsic_image_status): Likewise
(trans_image_index): Likewise
(gfc_conv_intrinsic_bound): Likewise
(conv_intrinsic_cobound): Likewise
(gfc_conv_intrinsic_mod): Likewise
(gfc_conv_intrinsic_dshift): Likewise
(gfc_conv_intrinsic_dim): Likewise
(gfc_conv_intrinsic_sign): Likewise
(gfc_conv_intrinsic_ctime): Likewise
(gfc_conv_intrinsic_fdate): Likewise
(gfc_conv_intrinsic_ttynam): Likewise
(gfc_conv_intrinsic_minmax): Likewise
(gfc_conv_intrinsic_minmax_char): Likewise
(gfc_conv_intrinsic_anyall): Likewise
(gfc_conv_intrinsic_arith): Likewise
(gfc_conv_intrinsic_minmaxloc): Likewise
(gfc_conv_intrinsic_minmaxval): Likewise
(gfc_conv_intrinsic_btest): Likewise
(gfc_conv_intrinsic_bitcomp): Likewise
(gfc_conv_intrinsic_shift): Likewise
(gfc_conv_intrinsic_ishft): Likewise
(gfc_conv_intrinsic_ishftc): Likewise
(gfc_conv_intrinsic_leadz): Likewise
(gfc_conv_intrinsic_trailz): Likewise
(gfc_conv_intrinsic_mask): Likewise
(gfc_conv_intrinsic_spacing): Likewise
(gfc_conv_intrinsic_rrspacing): Likewise
(gfc_conv_intrinsic_size): Likewise
(gfc_conv_intrinsic_sizeof): Likewise
(gfc_conv_intrinsic_transfer): Likewise
(gfc_conv_allocated): Likewise
(gfc_conv_associated): Likewise
(gfc_conv_same_type_as): Likewise
(gfc_conv_intrinsic_trim): Likewise
(gfc_conv_intrinsic_repeat): Likewise
(conv_isocbinding_function): Likewise
(conv_intrinsic_ieee_is_normal): Likewise
(conv_intrinsic_ieee_is_negative): Likewise
(conv_intrinsic_ieee_copy_sign): Likewise
(conv_intrinsic_move_alloc): Likewise
* trans-io.c (set_parameter_value_chk): Likewise
(set_parameter_value_inquire): Likewise
(set_string): Likewise
* trans-openmp.c (gfc_walk_alloc_comps): Likewise
(gfc_omp_clause_default_ctor): Likewise
(gfc_omp_clause_copy_ctor): Likewise
(gfc_omp_clause_assign_op): Likewise
(gfc_omp_clause_dtor): Likewise
(gfc_omp_finish_clause): Likewise
(gfc_trans_omp_clauses): Likewise
(gfc_trans_omp_do): Likewise
* trans-stmt.c (gfc_trans_goto): Likewise
(gfc_trans_sync): Likewise
(gfc_trans_arithmetic_if): Likewise
(gfc_trans_simple_do): Likewise
(gfc_trans_do): Likewise
(gfc_trans_forall_loop): Likewise
(gfc_trans_where_2): Likewise
(gfc_trans_allocate): Likewise
(gfc_trans_deallocate): Likewise
* trans-types.c (gfc_init_types): Initialize logical_type_node and
their true/false trees.
(gfc_get_array_descr_info): Use logical_type_node.
* trans-types.h (logical_type_node): New tree.
(logical_true_node): Likewise.
(logical_false_node): Likewise.
* trans.c (gfc_trans_runtime_check): Use logical_type_node.
(gfc_call_malloc): Likewise
(gfc_allocate_using_malloc): Likewise
(gfc_allocate_allocatable): Likewise
(gfc_add_comp_finalizer_call): Likewise
(gfc_add_finalizer_call): Likewise
(gfc_deallocate_with_status): Likewise
(gfc_deallocate_scalar_with_status): Likewise
(gfc_call_realloc): Likewise
2017-11-06 Paul Thomas <>
Backported from trunk
PR fortran/78641
* resolve.c (resolve_ordinary_assign): Do not add the _data
component for class valued array constructors being assigned
to derived type arrays.
* trans-array.c (gfc_trans_array_ctor_element): Take the _data
of class valued elements for assignment to derived type arrays.
2017-11-06 Paul Thomas <>
Backported from trunk
PR fortran/69739
* trans-expr.c (gfc_map_intrinsic_function): Return false for
bounds without the DIM argument instead of ICEing.
2017-11-04 Steven G. Kargl <>
PR fortran/82796
* resolve.c (resolve_equivalence): An entity in a common block within
a module cannot appear in an equivalence statement if the entity is
with a pure procedure.
2017-11-04 Andre Vehreschild <>
* trans-expr.c (gfc_trans_assignment_1): Character kind conversion may
create a loop variant temporary, too.
* trans-intrinsic.c (conv_caf_send): Treat char arrays as arrays and
not as scalars.
* trans.c (get_array_span): Take the character kind into account when
doing pointer arithmetic.
2017-11-03 Paul Thomas <>
PR fortran/81735
* trans-decl.c (gfc_trans_deferred_vars): Correct case where
'tmp' can be used unititialized.
2017-11-01 Paul Thomas <>
Backported from trunk
PR fortran/80554
* decl.c (build_sym): In a submodule allow overriding of host
associated symbols from the ancestor module with a new
2017-11-01 Paul Thomas <>
Backport from trunk
PR fortran/80850
* trans_expr.c (gfc_conv_procedure_call): When passing a class
argument to an unlimited polymorphic dummy, it is wrong to cast
the passed expression as unlimited, unless it is unlimited. The
correct way is to assign to each of the fields and set the _len
field to zero.
2017-10-28 Andre Vehreschild <>
* check.c (gfc_check_co_reduce): Clarify error message.
2017-10-28 Paul Thomas <>
Backported from trunk
PR fortran/81758
* trans-expr.c (trans_class_vptr_len_assignment): 'vptr_expr'
must only be set if the right hand side expression is of type
2017-10-21 Paul Thomas <>
Backport from trunk
PR fortran/82312
* resolve.c (gfc_resolve_code): Simplify condition for class
pointer assignments becoming regular assignments by asserting
that only class valued targets are permitted.
* trans-expr.c (trans_class_pointer_fcn): New function using a
block of code from gfc_trans_pointer_assignment.
(gfc_trans_pointer_assignment): Call the new function. Tidy up
a minor whitespace issue.
2017-10-20 Thomas Koenig <>
Backport from trunk
PR fortran/79795
* resolve.c (resovle_symbol): Change gcc_assert to
sensible error message.
2017-10-16 Paul Thomas <>
PR fortran/52832
* match.c (gfc_match_associate): Before failing the association
try again, allowing a proc pointer selector.
PR fortran/80120
PR fortran/81903
PR fortran/82121
* primary.c (gfc_match_varspec): Introduce 'tgt_expr', which
points to the associate selector, if any. Go through selector
references, after resolution for variables, to catch any full
or section array references. If a class associate name does
not have the same declared type as the selector, resolve the
selector and copy the declared type to the associate name.
Before throwing a no implicit type error, resolve all allowed
selector expressions, and copy the resulting typespec.
PR fortran/67543
* resolve.c (resolve_assoc_var): Selector must cannot be the
NULL expression and it must have a type.
PR fortran/78152
* resolve.c (resolve_symbol): Allow associate names to be
2017-10-16 Paul Thomas <>
Backport from trunk
PR fortran/81048
* resolve.c (resolve_symbol): Ensure that derived type array
results get default initialization.
2017-10-03 Thomas Koenig <>
Steven G. Kargl <>
Backport from trunk
PR fortran/80118
* expr.c (gfc_get_full_arrayspec_from_expr): If there is
no symtree, set array spec to NULL.
2017-09-02 Janus Weil <>
Backport from trunk
PR fortran/81770
* expr.c (gfc_check_pointer_assign): Improve the check whether pointer
may outlive pointer target.
2017-08-22 Jerry DeLisle <>
Backport from trunk
PR fortran/81296
* trans-io.c (get_dtio_proc): Add check for format label and set
formatted flag accordingly. Reorganize the code a little.
2017-08-18 Jerry DeLisle <>
Backport from trunk
PR fortran/80164
* trans-stmt.c (gfc_trans_call): If no code expr, use code->loc
as warning/error locus.
2017-08-14 Release Manager
* GCC 7.2.0 released.
2017-06-09 Janus Weil <>
Backport from trunk
PR fortran/70601
* trans-expr.c (gfc_conv_procedure_call): Fix detection of allocatable
function results.
2017-06-05 Janus Weil <>
Backport from trunk
PR fortran/80766
* resolve.c (resolve_fl_derived): Make sure that vtype symbols are
properly resolved.
2017-06-02 Thomas Koenig <>
PR fortran/80904
* frontend-passes.c (matmul_lhs_realloc): Correct
allocation size for case A1B2.
2017-06-02 Jakub Jelinek <>
PR fortran/80918
* openmp.c (resolve_omp_clauses): Fix a typo.
2017-05-23 Jerry DeLisle <>
Backport from trunk
PR fortran/80741
* trans-io.c (transfer_namelist_element): Change check from
NULL_TREE to null_pointer_node.
2017-05-23 Paul Thomas <>
Backport from trunk
PR fortran/80333
* trans-io.c (nml_get_addr_expr): If we are dealing with class
type data set tmp tree to get that address.
(transfer_namelist_element): Set the array spec to point to the
the class data.
2017-05-17 Jerry DeLisle <>
Backport from trunk
PR fortran/78659
* io.c (dtio_procs_present): Add new function to check for DTIO
procedures relative to I/O statement READ or WRITE.
(gfc_resolve_dt): Add namelist checks using the new function.
* resolve.c (dtio_procs_present): Remove function and related
namelist checks. (resolve_fl_namelist): Add check specific to
Fortran 95 restriction on namelist objects.
2017-05-15 Steven G. Kargl <>
Backport from trunk
PR fortran/80752
* expr.c (gfc_generate_initializer): If type conversion fails,
check for error and return NULL.
2017-05-05 Janus Weil <>
Backport from trunk
PR fortran/80121
* trans-expr.c (gfc_conv_procedure_call): Deallocate the components
of allocatable intent(out) arguments.
2017-05-05 Janus Weil <>
Backport from trunk
PR fortran/80392
* trans-types.c (gfc_get_derived_type): Prevent an infinite loop when
building a derived type that includes a procedure pointer component
with a polymorphic result.
2017-05-04 Jerry DeLisle <>
Backport from trunk.
PR fortran/80484
* io.c (format_lex): Check for '/' and set token to FMT_SLASH.
(check_format): Move FMT_DT checking code to data_desc section.
* module.c (gfc_match_use): Include the case of INTERFACE_DTIO.
2017-05-02 Release Manager
* GCC 7.1.0 released.
2017-04-17 Paul Thomas <>
PR fortran/80440
* module.c (find_symtree_for_symbol): Delete.
(read_module): Remove the call to the above.
2017-04-14 Janus Weil <>
PR fortran/80361
* class.c (generate_finalization_wrapper): Give the finalization wrapper
the recursive attribute.
2017-04-10 Nicolas Koenig <>
Paul Thomas <>
PR fortran/69498
* module.c (gfc_match_submodule): Add error
if function is called in the wrong state.
2017-04-10 Janus Weil <>
PR fortran/80046
* expr.c (gfc_check_pointer_assign): Check if procedure pointer
components in a pointer assignment need an explicit interface.
2017-03-18 Nicolas Koenig <>
PR fortran/69498
* symbol.c (gfc_delete_symtree): If there is a period in the name, ignore
everything before it.
2017-03-28 Janus Weil <>
PR fortran/78661
* trans-io.c (transfer_namelist_element): Perform a polymorphic call
to a DTIO procedure if necessary.
2017-03-25 Paul Thomas <>
PR fortran/80156
PR fortran/79382
* decl.c (access_attr_decl): Remove the error for an absent
generic DTIO interface and ensure that symbol has the flavor
2017-03-22 Dominique d'Humieres <>
PR fortran/79838
* module.c: Remove trailing period.
2017-03-22 Dominique d'Humieres <>
PR fortran/79602
* decl.c: Replace '%s' with %qs.
* expr.c: Likewise.
* interface.c: Likewise.
* match.c: Likewise.
* primary.c: Likewise.
* resolve.c: Likewise.
PR fortran/79844
PR fortran/80011
* io.c: Remove trailing spaces.
* match.c: Likewise.
* openmp.c: Likewise.
* resolve.c: Likewise.
* trans-intrinsic.c: Likewise.
PR fortran/79853
* expr.c: Remove a double spaces.
PR fortran/79859
* primary.c: Remove spurious quotes around %qs.
2017-03-22 Thomas Koenig <>
PR fortran/80142
* frontend-passes.c (combine_array_constructor): Take
location of new expression from constructor expression instead
of constructor.
2017-03-20 Nicolas Koenig <>
PR fortran/39239
* symbol.c (check_conflict): Report an error if an EQUIVALENCE
object is BIND(C)
2017-03-18 Nicolas Koenig <>
PR fortran/69498
* decl.c (add_hidden_procptr_result): Fixed Refs count of the
created "ppr@" symbol.
2017-03-18 Paul Thomas <>
PR fortran/79676
* module.c (mio_symbol_attribute): Remove reset of the flag
(check_for_module_procedures): New function. Move declaration
of 'no_module_procedures' to above it.
(gfc_dump_module): Traverse namespace calling new function.
2017-03-18 Paul Thomas <>
PR fortran/71838
* symbol.c (check_conflict): A dummy procedure in a submodule,
module procedure is not an error.
(gfc_add_flavor): Ditto.
2017-03-17 Jerry DeLisle <>
PR fortran/79841
* openmp.c (check_symbol_not_pointer): Adjust diagnostics.
2017-03-16 Jakub Jelinek <>
PR fortran/80010
* parse.c (gfc_ascii_statement): Use !$ACC for ST_OACC_ATOMIC
and ST_OACC_END_ATOMIC, instead of !ACC.
* trans-decl.c (finish_oacc_declare): Use !$ACC instead of $!ACC.
* openmp.c (gfc_match_oacc_declare, gfc_match_oacc_wait,
gfc_resolve_oacc_declare): Likewise.
PR fortran/79886
* error.c (gfc_format_decoder): Rename plus argument to set_locus,
remove ATTRIBUTE_UNUSED from all arguments, call default_tree_printer
if not a Fortran specific spec.
* trans-io.c: Include options.h.
(gfc_build_st_parameter): Temporarily disable -Wpadded around layout
of artificial IO data structures.
2017-03-15 David Malcolm <>
PR fortran/79860
* resolve.c (resolve_contained_fntype): Make error messages more
amenable to translation.
2017-03-06 Richard Biener <>
PR fortran/79894
* trans.c (gfc_add_modify_loc): Weaken assert.
2017-03-05 Andre Vehreschild <>,
Alessandro Fanfarillo <>
* check.c (positive_check): Add new function checking constant for
being greater then zero.
(gfc_check_image_status): Add checking of image_status arguments.
(gfc_check_failed_or_stopped_images): Same but for failed_- and
stopped_images function.
* dump-parse-tree.c (show_code_node): Added output of FAIL IMAGE.
* gfortran.h (enum gfc_statement): Added FAIL_IMAGE_ST.
(enum gfc_isym_id): Added new intrinsic symbols.
(enum gfc_exec_op): Added EXEC_FAIL_IMAGE.
* gfortran.texi: Added description for the new API functions. Updated
coverage of gfortran of TS18508.
* intrinsic.c (add_functions): Added symbols to resolve new intrinsic
* intrinsic.h: Added prototypes.
* iresolve.c (gfc_resolve_failed_images): Resolve the failed_images
(gfc_resolve_image_status): Same for image_status.
(gfc_resolve_stopped_images): Same for stopped_images.
* libgfortran.h: Added prototypes.
* match.c (gfc_match_if): Added matching of FAIL IMAGE statement.
(gfc_match_fail_image): Match a FAIL IMAGE statement.
* match.h: Added prototype.
* parse.c (decode_statement): Added matching for FAIL IMAGE.
(next_statement): Same.
(gfc_ascii_statement): Same.
* resolve.c: Same.
* simplify.c (gfc_simplify_failed_or_stopped_images): For COARRAY=
single a constant result can be returne.d
(gfc_simplify_image_status): For COARRAY=single the result is constant.
* st.c (gfc_free_statement): Added FAIL_IMAGE handling.
* trans-decl.c (gfc_build_builtin_function_decls): Added decls of the
new intrinsics.
* trans-expr.c (gfc_conv_procedure_call): This is first time all
arguments of a function are optional, which is now handled here
* trans-intrinsic.c (conv_intrinsic_image_status): Translate
(gfc_conv_intrinsic_function): Add support for image_status.
(gfc_is_intrinsic_libcall): Add support for the remaining new
* trans-stmt.c (gfc_trans_fail_image): Trans a fail image.
* trans-stmt.h: Add the prototype for the above.
* trans.c (trans_code): Dispatch for fail_image.
* trans.h: Add the trees for the new intrinsics.
2017-03-03 Jerry DeLisle <>
PR fortran/79841
* openmp.c (check_symbol_not_pointer): Adjust diagnostic.
2017-02-28 Paul Thomas <>
PR fortran/79739
* resolve.c (resolve_fl_procedure): Deal with the case where
'submodule_name' is NULL so that gfc_error does not ICE.
Reformat the error message to make it more consistent.
2017-02-28 Jakub Jelinek <>
* parse.c (parse_critical_block): Use cond ? G_("...") : G_("...")
instead of just cond ? "..." : "...".
* scanner.c (gfc_next_char_literal): Likewise.
* match.c (match_exit_cycle): Likewise.
2017-02-26 Thomas Koenig <>
PR fortran/51119
* options.c (gfc_post_options): Set default limit for matmul
inlining to 30.
* invoke.texi: Document change.
2017-02-25 Dominique d'Humieres <>
PR fortran/79601
* interface.c (check_dtio_arg_TKR_intent): Change 'intent'
to 'INTENT'.
2017-02-25 Dominique d'Humieres <>
PR fortran/79597
* interface.c (gfc_match_end_interface): Remove spurious comma
and space, replace 'got %s' with 'got %qs'.
2017-02-20 Paul Thomas <>
PR fortran/79599
* interface.c (check_dtio_arg_TKR_intent): Supply 'must'
missing from error message.
2017-02-20 Paul Thomas <>
PR fortran/79523
* interface.c (gfc_find_typebound_dtio_proc): Guard test for
flavor attribute by checking that symbol is resolved.
2017-02-16 Paul Thomas <>
PR fortran/79382
* decl.c (access_attr_decl): Test for presence of generic DTIO
interface and emit error if not present.
2017-02-20 Paul Thomas <>
PR fortran/79434
* parse.c (check_component, parse_union): Whitespace.
(set_syms_host_assoc): For a derived type, check if the module
in which it was declared is one of the submodule ancestors. If
it is, make the components public. Otherwise, reset attribute
'host_assoc' and set 'use-assoc' so that encapsulation is
2017-02-19 Paul Thomas <>
PR fortran/79447
* decl.c (gfc_set_constant_character_len): Whitespace.
(gfc_match_end): Catch case where a procedure is contained in
a module procedure and ensure that 'end procedure' is the
correct termination.
2017-02-19 Paul Thomas <>
PR fortran/79402
* resolve.c (fixup_unique_dummy): New function.
(gfc_resolve_expr): Call it for dummy variables with a unique
symtree name.
2017-02-19 Andre Vehreschild <>
PR fortran/79229
* trans-expr.c (gfc_trans_assignment_1): Deref indirect refs when
compiling with -fcheck=mem to check the pointer and not the data.
2017-02-19 Andre Vehreschild <>
PR fortran/79335
* trans-array.c (duplicate_allocatable_coarray): Ensure attributes
passed are properly initialized.
(structure_alloc_comps): Same.
* trans-expr.c (gfc_trans_structure_assign): Same.
2017-02-13 Jakub Jelinek <>
* trans-expr.c (gfc_conv_substring): Add missing space in diagnostics.
2017-02-12 Thomas Koenig <>
PR fortran/65542
* intrinsic.c (gfc_intrinsic_func_interface): Return an error
for -std=f95 for disallowed transformational functions in
initialization expressions.
2017-02-09 Cesar Philippidis <>
Joseph Myers <>
* openmp.c (resolve_omp_clauses): Error on directives
containing both tile and collapse clauses.
(resolve_oacc_loop_blocks): Represent '*' tile arguments as zero.
* trans-openmp.c (gfc_trans_omp_do): Lower tiled loops like
collapsed loops.
2017-02-07 Steven G. Kargl <>
* trans-types.c (gfc_get_int_kind_from_width_isofortranen): Choose
REAL type with the widest precision if two (or more) have the same
storage size.
2017-02-05 Andre Vehreschild <>
PR fortran/79344
* trans-stmt.c (gfc_trans_allocate): Only deallocate the components of
the temporary, when a new object was created for the temporary. Not
when it is just an alias to an existing object.
2017-02-05 Andre Vehreschild <>
PR fortran/79335
* trans-decl.c (generate_coarray_sym_init): Retrieve the symbol's
attributes before using them.
2017-02-05 Andre Vehreschild <>
PR fortran/78958
* trans-stmt.c (gfc_trans_allocate): Add the multiplying the _len
component of unlimited polymorphic objects when source-allocating.
2017-02-05 Andre Vehreschild <>
PR fortran/79230
* trans-array.c (structure_alloc_comps): Ignore pointer components when
freeing structures.
2017-01-25 Maxim Ostapenko <>
PR lto/79061
* f95-lang.c (gfc_create_decls): Include stringpool.h.
Pass main_input_filename to build_translation_unit_decl.
2017-01-23 Thomas Koenig <>
* arith.c (arith_power): If simplifying integer power expression
to zero, warn if -Winteger-division is given.
2017-01-22 Jakub Jelinek <>
PR fortran/79154
* parse.c (matchs, matcho, matchds, matchdo): Replace return st;
with { ret = st; goto finish; }.
(decode_omp_directive): Allow declare simd, declare target and
simd directives in PURE/ELEMENTAL procedures. Only call
gfc_unset_implicit_pure on successful match of other procedures.
2017-01-21 Gerald Pfeifer <>
* gfc-internals.texi (Symbol Versioning): Change references
to to https.
2017-01-21 Jakub Jelinek <>
* gfortran.h (gfc_extract_int): Change return type to bool. Add
int argument with = 0.
* decl.c (gfc_match_kind_spec): Adjust gfc_extract_int caller, pass
1 as new last argument to it, don't emit gfc_error.
(match_char_kind): Likewise.
(gfc_match_decl_type_spec): Use gfc_get_string ("%s", x) instead of
gfc_get_string (x).
(gfc_match_derived_decl, match_binding_attributes): Likewise.
(gfc_match_structure_decl): Don't sprintf back to name, call
get_struct_decl directly with gfc_dt_upper_string (name) result.
* trans-stmt.c (gfc_trans_allocate): Use gfc_get_string ("%s", x)
instead of gfc_get_string (x).
* module.c (gfc_dt_lower_string, gfc_dt_upper_string,
gfc_match_use, gfc_match_submodule, find_true_name, mio_pool_string,
mio_symtree_ref, mio_expr, mio_omp_udr_expr, load_generic_interfaces,
load_omp_udrs, load_needed, read_module, dump_module,
create_intrinsic_function, import_iso_c_binding_module,
create_int_parameter, create_int_parameter_array, create_derived_type,
use_iso_fortran_env_module): Likewise.
* error.c (gfc_diagnostic_starter, gfc_diagnostic_start_span): Use
pp_verbatim (context->printer, "%s", x) instead of
pp_verbatim (context->printer, x).
* match.c (gfc_match_small_int): Adjust gfc_extract_int caller, pass
1 as new last argument to it, don't emit gfc_error.
(gfc_match_small_int_expr): Likewise.
* iresolve.c (gfc_get_string): Optimize format "%s" case.
(resolve_bound): Use gfc_get_string ("%s", x) instead of
gfc_get_string (x).
(resolve_transformational): Formatting fix.
(gfc_resolve_char_achar): Change name argument to bool is_achar,
use a single format string and if is_achar add "a" before "char".
(gfc_resolve_achar, gfc_resolve_char): Adjust callers.
* expr.c (gfc_extract_int): Change return type to bool, return true
if some error occurred. Add REPORT_ERROR argument, if non-zero
call either gfc_error or gfc_error_now depending on its sign.
* arith.c (arith_power): Adjust gfc_extract_int caller.
* symbol.c (gfc_add_component): Use gfc_get_string ("%s", x) instead
of gfc_get_string (x).
(gfc_new_symtree, gfc_delete_symtree, gfc_get_uop, gfc_new_symbol,
gfc_get_gsymbol, generate_isocbinding_symbol): Likewise.
* openmp.c (gfc_match_omp_clauses): Adjust gfc_extract_int caller, pass
-1 as new last argument to it, don't emit gfc_error_now.
(gfc_match_omp_declare_reduction): Use gfc_get_string ("%s", x)
instead of gfc_get_string (x).
* check.c (kind_check): Adjust gfc_extract_int caller.
* intrinsic.c (add_sym, find_sym, make_alias): Use
gfc_get_string ("%s", x) instead of gfc_get_string (x).
* simplify.c (get_kind, gfc_simplify_btest, gfc_simplify_maskr,
gfc_simplify_maskl, gfc_simplify_poppar, gfc_simplify_repeat,
gfc_simplify_selected_int_kind, gfc_simplify_selected_real_kind):
Adjust gfc_extract_int callers.
* trans-decl.c (gfc_find_module): Use gfc_get_string ("%s", x)
instead of gfc_get_string (x).
* matchexp.c (expression_syntax): Add const.
* primary.c (match_kind_param, match_hollerith_constant,
match_string_constant): Adjust gfc_extract_int callers.
(match_keyword_arg): Use gfc_get_string ("%s", x) instead of
gfc_get_string (x).
* frontend-passes.c (optimize_minmaxloc): Likewise.
2017-01-19 Andre Vehreschild <>
PR fortran/70696
* trans-decl.c (gfc_build_qualified_array): Add static decl to parent
function only, when the decl-context is not the translation unit.
2017-01-18 Louis Krupp <>
PR fortran/50069
PR fortran/55086
* trans-expr.c (gfc_conv_variable): Don't treat temporary variables
as function arguments.
* trans-stmt.c (forall_make_variable_temp,
generate_loop_for_temp_to_lhs, gfc_trans_assign_need_temp,
gfc_trans_forall_1): Don't adjust offset of forall temporary
for array sections, make forall temporaries work for substring
expressions, improve test coverage by adding -ftest-forall-temp
option to request usage of temporary array in forall code.
* lang.opt: Add -ftest-forall-temp option.
* invoke.texi: Add -ftest-forall-temp option.
2017-01-18 Andre Vehreschild <>
* primary.c (caf_variable_attr): Improve figuring whether the current
component is the last one refed.
* trans-stmt.c (gfc_trans_allocate): Do not generate sync_all calls
when allocating pointer or allocatable components.
2017-01-18 Andre Vehreschild <>
* gfortran.texi: Add missing parameters to caf-API functions. Correct
typos and clarify some descriptions.
2017-01-18 Andre Vehreschild <>
PR fortran/70696
Missed some cases, here they are:
* trans-decl.c (gfc_build_qualified_array): Add static tokens to the
parent function's scope.
* trans-expr.c (gfc_get_tree_for_caf_expr): Shorten code. Remove
unnecessary assert.
2017-01-13 Andre Vehreschild <>
PR fortran/70697
* resolve.c (resolve_lock_unlock_event): Resolve the expression for
event's until_count.
2017-01-13 Andre Vehreschild <>
PR fortran/70696
* trans-expr.c (gfc_get_tree_for_caf_expr): Ensure the backend_decl
is valid before accessing it.
2017-01-09 Jakub Jelinek <>
PR translation/79019
PR translation/79020
* decl.c (attr_decl1): Fix spelling in translatable string.
* intrinsic.texi: Fix spelling - invokation -> invocation.
* lang.opt (faggressive-function-elimination, gfc_convert): Fix
typos in descriptions.
* openmp.c (resolve_omp_clauses): Add missing whitespace to
translatable strings.
2017-01-08 Martin Sebor <>
PR tree-optimization/78913
PR middle-end/77708
* trans-common.c (build_equiv_decl): Increase buffer size to avoid
truncation for any argument.
* trans-types.c (gfc_build_logical_type): Same.
2017-01-07 Andre Vehreschild <>
PR fortran/78781
PR fortran/78935
* expr.c (gfc_check_pointer_assign): Return the same error message for
rewritten coarray pointer assignments like for plain ones.
* gfortran.h: Change prototype.
* primary.c (caf_variable_attr): Set attributes used ones only only
ones. Add setting of pointer_comp attribute.
(gfc_caf_attr): Add setting of pointer_comp attribute.
* trans-array.c (gfc_array_allocate): Add flag that the component to
allocate is not an ultimate coarray component. Add allocation of
pointer arrays.
(structure_alloc_comps): Extend nullify to treat pointer components in
coarrays correctly. Restructure nullify to remove redundant code.
(gfc_nullify_alloc_comp): Allow setting caf_mode flags.
* trans-array.h: Change prototype of gfc_nullify_alloc_comp ().
* trans-decl.c (generate_coarray_sym_init): Call nullify_alloc_comp for
derived type coarrays with pointer components.
* trans-expr.c (gfc_trans_structure_assign): Also treat pointer
(trans_caf_token_assign): Handle assignment of token of scalar pointer
(gfc_trans_pointer_assignment): Call above routine.
* trans-intrinsic.c (conv_expr_ref_to_caf_ref): Add treating pointer
(gfc_conv_intrinsic_caf_get): Likewise.
(conv_caf_send): Likewise.
* trans-stmt.c (gfc_trans_allocate): After allocating a derived type in
a coarray pre-register the tokens.
(gfc_trans_deallocate): Simply determining the coarray type (scalar or
array) and deregistering it correctly.
* trans-types.c (gfc_typenode_for_spec): Replace in_coarray flag by the
actual codim to allow lookup of array types in the cache.
(gfc_build_array_type): Likewise.
(gfc_get_array_descriptor_base): Likewise.
(gfc_get_array_type_bounds): Likewise.
(gfc_get_derived_type): Likewise.
* trans-types.h: Likewise.
* trans.c (gfc_deallocate_with_status): Enable deregistering of all kind
of coarray components.
(gfc_deallocate_scalar_with_status): Use free() in fcoarray_single mode
instead of caf_deregister.
2017-01-06 Jakub Jelinek <>
* simplify.c (simplify_transformation_to_array): Use
#pragma GCC diagnostic {push,ignored,pop}.
2017-01-06 Alexandre Oliva <>
* simplify.c (simplify_transformation_to_array): Silence
array bounds warning. Fix whitespace.
2017-01-04 Alexandre Oliva <>
* module.c (load_omp_udrs): Initialize name.
2017-01-02 Janne Blomqvist <>
PR fortran/78534
* trans-expr.c (gfc_trans_string_copy): Rework string copy
algorithm to avoid -Wstringop-overflow warning.
2017-01-01 Jakub Jelinek <>
Update copyright years.
* gfortranspec.c (lang_specific_driver): Update copyright notice
* gfc-internals.texi: Bump @copying's copyright year.
* gfortran.texi: Ditto.
* intrinsic.texi: Ditto.
* invoke.texi: Ditto.
Copyright (C) 2017 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.