blob: 99c1c11e83d6bb67a40cf136d03b56236a618504 [file] [log] [blame]
2022-05-16 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2022-05-11 Harald Anlauf <anlauf@gmx.de>
Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/105230
* expr.c (find_array_section): Correct logic to avoid NULL
pointer dereference on invalid array section.
2022-05-16 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2022-03-09 Harald Anlauf <anlauf@gmx.de>
PR fortran/104849
* expr.c (find_array_section): Avoid NULL pointer dereference on
invalid array section.
2022-05-16 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2022-04-05 Harald Anlauf <anlauf@gmx.de>
Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/105138
* intrinsic.c (gfc_is_intrinsic): When a symbol refers to a
RECURSIVE procedure, it cannot be an INTRINSIC.
2022-05-11 Jakub Jelinek <jakub@redhat.com>
Backported from master:
2021-11-21 Jakub Jelinek <jakub@redhat.com>
PR debug/103315
* trans-types.c (gfc_get_array_descr_info): Use DW_OP_deref_size 1
instead of DW_OP_deref for DW_AT_rank.
2022-05-09 Mikael Morin <mikael@gcc.gnu.org>
Backported from master:
2022-04-24 Mikael Morin <mikael@gcc.gnu.org>
PR fortran/104228
PR fortran/104570
* parse.c (parse_associate): Use a new distinct gfc_charlen if
the copied type has one whose length is not known to be
constant.
* resolve.c (resolve_assoc_var): Also create a new character
length for non-dummy associate targets. Reset charlen if it’s
shared with the associate target regardless of the expression
type. Don’t reinitialize charlen if it’s deferred.
* trans-stmt.c (trans_associate_var): Initialize character
length even if no temporary is used for the associate variable.
2022-04-21 Fritz Reese <foreese@gcc.gnu.org>
Backported from master:
2022-04-21 Fritz Reese <foreese@gcc.gnu.org>
PR fortran/105310
* trans-expr.c (gfc_conv_union_initializer): Pass vec* by reference.
2022-02-04 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2022-02-03 Harald Anlauf <anlauf@gmx.de>
PR fortran/104311
* check.c (gfc_calculate_transfer_sizes): Checks for case when
storage size of SOURCE is greater than zero while the storage size
of MOLD is zero and MOLD is an array shall not depend on SIZE.
2022-01-29 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2022-01-22 Harald Anlauf <anlauf@gmx.de>
PR fortran/104127
* simplify.c (gfc_simplify_transfer): Ensure that the result
typespec is set up for TRANSFER with MOLD of type CHARACTER
including character length even if the result is a zero-sized
array.
2022-01-26 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2022-01-25 Harald Anlauf <anlauf@gmx.de>
PR fortran/104227
* check.c (gfc_calculate_transfer_sizes): Fix checking of arrays
passed as MOLD argument to the TRANSFER intrinsic for having
storage size zero.
2022-01-23 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2022-01-14 Harald Anlauf <anlauf@gmx.de>
PR fortran/103782
* expr.c (gfc_simplify_expr): Adjust logic for when to scalarize a
call of an intrinsic which may have been overloaded.
2021-12-19 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2021-12-07 Harald Anlauf <anlauf@gmx.de>
PR fortran/103588
* array.c (gfc_ref_dimen_size): Do not generate internal error on
failed simplification of stride expression; just return failure.
2021-12-17 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2021-12-08 Harald Anlauf <anlauf@gmx.de>
PR fortran/103610
* array.c (spec_dimen_size): Fix simplification of SHAPE:
dimensions must be non-negative.
2021-12-16 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2021-12-11 Harald Anlauf <anlauf@gmx.de>
PR fortran/103606
* resolve.c (resolve_fl_procedure): Do not access CLASS components
before class container has been built.
2021-12-16 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2021-12-14 Harald Anlauf <anlauf@gmx.de>
PR fortran/103717
* frontend-passes.c (doloop_code): Prevent NULL pointer
dereference when checking for passing a do-loop variable to a
contained procedure with an interface mismatch.
2021-12-10 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2021-12-07 Harald Anlauf <anlauf@gmx.de>
PR fortran/103607
* frontend-passes.c (do_subscript): Ensure that array bounds are
of type INTEGER before performing checks on array subscripts.
2021-11-26 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2021-11-23 Harald Anlauf <anlauf@gmx.de>
PR fortran/103392
* simplify.c (simplify_bound): Do not try to simplify
LBOUND/UBOUND for arrays with POINTER or ALLOCATABLE attribute.
2021-09-30 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2021-09-07 Harald Anlauf <anlauf@gmx.de>
PR fortran/101327
* expr.c (find_array_element): When bounds cannot be determined as
constant, return error instead of aborting.
2021-09-30 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2021-09-09 Harald Anlauf <anlauf@gmx.de>
PR fortran/98490
* trans-expr.c (gfc_conv_substring): Do not generate substring
bounds check for implied do loop index variable before it actually
becomes defined.
2021-09-30 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2021-09-13 Harald Anlauf <anlauf@gmx.de>
PR fortran/82314
* decl.c (add_init_expr_to_sym): For proper initialization of
array-valued named constants the array bounds need to be
simplified before adding the initializer.
2021-09-21 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2021-09-13 Harald Anlauf <anlauf@gmx.de>
PR fortran/85130
* expr.c (find_substring_ref): Handle given substring start and
end indices as signed integers, not unsigned.
2021-09-21 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2021-09-16 Harald Anlauf <anlauf@gmx.de>
PR fortran/102287
* trans-expr.c (gfc_conv_procedure_call): Wrap deallocation of
allocatable components of optional allocatable derived type
procedure arguments with INTENT(OUT) into a presence check.
2021-09-10 Paul Thomas <pault@gcc.gnu.org>
Backported from master:
2020-12-29 Paul Thomas <pault@gcc.gnu.org>
PR fortran/97612
* primary.c (build_actual_constructor): Missing allocatable
components are set unallocated using EXPR_NULL. Then missing
components are tested for a default initializer.
2021-09-10 Paul Thomas <pault@gcc.gnu.org>
Backported from master:
2021-01-22 Paul Thomas <pault@gcc.gnu.org>
PR fortran/98565
* trans-intrinsic.c (gfc_conv_associated): Do not add a _data
component for scalar class function targets. Instead, fix the
function result and access the _data from that.
2021-09-10 Paul Thomas <pault@gcc.gnu.org>
Backported from master:
2021-01-07 Paul Thomas <pault@gcc.gnu.org>
PR fortran/93701
* resolve.c (find_array_spec): Put static prototype for
resolve_assoc_var before this function and call for associate
variables.
2021-09-10 Paul Thomas <pault@gcc.gnu.org>
Backported from master:
2021-01-27 Paul Thomas <pault@gcc.gnu.org>
PR fortran/98472
* trans-array.c (gfc_conv_expr_descriptor): Include elemental
procedure pointers in the assert under the comment 'elemental
function' and eliminate the second, spurious assert.
2021-09-10 Paul Thomas <pault@gcc.gnu.org>
Backported from master:
2021-04-20 Paul Thomas <pault@gcc.gnu.org>
PR fortran/100110
* trans-decl.c (gfc_get_symbol_decl): Replace test for host
association with a check that the current and symbol namespaces
are the same.
2021-09-06 Paul Thomas <pault@gcc.gnu.org>
Backported from master:
2021-05-06 Paul Thomas <pault@gcc.gnu.org>
PR fortran/46691
PR fortran/99819
* class.c (gfc_build_class_symbol): Remove the error that
disables assumed size class arrays. Class array types that are
not deferred shape or assumed rank are given a unique name and
placed in the procedure namespace.
* trans-array.c (gfc_trans_g77_array): Obtain the data pointer
for class arrays.
(gfc_trans_dummy_array_bias): Suppress the runtime error for
extent violations in explicit shape class arrays because it
always fails.
* trans-expr.c (gfc_conv_procedure_call): Handle assumed size
class actual arguments passed to non-descriptor formal args by
using the data pointer, stored as the symbol's backend decl.
2021-09-06 Paul Thomas <pault@gcc.gnu.org>
Backported from master:
2021-03-13 Paul Thomas <pault@gcc.gnu.org>
PR fortran/99125
* trans-array.c (gfc_conv_expr_descriptor): For deferred length
length components use the ss_info string length instead of
gfc_get_expr_charlen. Make sure that the deferred string length
is a variable before assigning to it. Otherwise use the expr.
* trans-expr.c (gfc_conv_string_length): Make sure that the
deferred string length is a variable before assigning to it.
2021-09-06 Paul Thomas <pault@gcc.gnu.org>
Backported from master:
2021-01-27 Paul Thomas <pault@gcc.gnu.org>
PR fortran/93924
PR fortran/93925
* trans-expr.c (gfc_conv_procedure_call): Suppress the call to
gfc_conv_intrinsic_to_class for unlimited polymorphic procedure
pointers.
(gfc_trans_assignment_1): Similarly suppress class assignment
for class valued procedure pointers.
2021-09-06 Paul Thomas <pault@gcc.gnu.org>
Backported from master:
2021-01-08 Paul Thomas <pault@gcc.gnu.org>
PR fortran/93794
* trans-expr.c (gfc_conv_component_ref): Remove the condition
that deferred character length components only be allocatable.
2021-07-16 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2021-07-14 Harald Anlauf <anlauf@gmx.de>
PR fortran/100949
* trans-expr.c (gfc_trans_class_init_assign): Call
gfc_conv_expr_present only for dummy variables.
2021-07-12 Thomas Koenig <tkoenig@gcc.gnu.org>
Backported from master:
2021-07-06 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/100227
* frontend-passes.c (traverse_io_block): Adjust test for
when a variable is eligible for the transformation to
array slice.
2021-06-04 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2021-06-04 Harald Anlauf <anlauf@gmx.de>
PR fortran/99839
* frontend-passes.c (inline_matmul_assign): Do not inline matmul
if the assignment to the resulting array if it is not of canonical
type (real/integer/complex/logical).
2021-06-01 Release Manager
* GCC 9.4.0 released.
2021-05-05 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2021-05-05 Harald Anlauf <anlauf@gmx.de>
PR fortran/100274
* interface.c (gfc_compare_actual_formal): Continue checks after
emitting warning for argument length mismatch.
* trans-expr.c (gfc_conv_procedure_call): Check for NULL pointer
dereference.
2021-04-27 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2021-04-24 Harald Anlauf <anlauf@gmx.de>
PR fortran/100154
* check.c (variable_check): Allow function reference having a data
pointer result.
(arg_strlen_is_zero): New function.
(gfc_check_fgetputc_sub): Add static check of character and status
arguments.
(gfc_check_fgetput_sub): Likewise.
* intrinsic.c (add_subroutines): Fix argument name for the
character argument to intrinsic subroutines fget[c], fput[c].
2021-04-02 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2021-04-01 Harald Anlauf <anlauf@gmx.de>
PR fortran/99840
* simplify.c (gfc_simplify_transpose): Properly initialize
resulting shape.
2021-03-24 Tobias Burnus <tobias@codesourcery.com>
Backported from master:
2021-03-22 Tobias Burnus <tobias@codesourcery.com>
PR fortran/99688
* match.c (select_type_set_tmp, gfc_match_select_type) Fix 'name'
buffersize to avoid out of bounds.
* resolve.c (resolve_select_type): Likewise.
2021-03-20 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2020-10-27 Harald Anlauf <anlauf@gmx.de>
* resolve.c (gfc_impure_variable): A dummy argument with the VALUE
attribute may be redefined without making a procedure impure.
2021-03-15 Paul Thomas <pault@gcc.gnu.org>
Backported from master:
2021-03-15 Paul Thomas <pault@gcc.gnu.org>
PR fortran/99545
* trans-stmt.c (gfc_trans_allocate): Mark the initialization
assignment by setting init_flag.
2021-02-26 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2021-01-14 Harald Anlauf <anlauf@gmx.de>
* gfortran.h (gfc_resolve_substring): Add prototype.
* primary.c (match_string_constant): Simplify substrings with
constant starting and ending points.
* resolve.c: Rename resolve_substring to gfc_resolve_substring.
(gfc_resolve_ref): Use renamed function gfc_resolve_substring.
2021-02-24 Paul Thomas <pault@gcc.gnu.org>
Backported from master:
2021-02-23 Paul Thomas <pault@gcc.gnu.org>
PR fortran/99124
* resolve.c (resolve_fl_procedure): Include class results in
the test for F2018, C15100.
* trans-array.c (get_class_info_from_ss): Do not use the saved
descriptor to obtain the class expression for variables. Use
gfc_get_class_from_expr instead.
2021-02-23 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2021-02-21 Harald Anlauf <anlauf@gmx.de>
* trans-expr.c (gfc_conv_procedure_call): Do not add clobber to
allocatable intent(out) argument.
2021-02-11 Paul Thomas <pault@gcc.gnu.org>
Backported from master:
2021-02-11 Paul Thomas <pault@gcc.gnu.org>
PR fortran/99060
* primary.c (gfc_match_varspec): Test for non-null 'previous'
before using its name in the error message.
2021-01-28 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2021-01-28 Harald Anlauf <anlauf@gmx.de>
PR fortran/86470
* trans.c (gfc_call_malloc): Allocate area of size 1 if passed
size is NULL (as documented).
2021-01-25 Paul Thomas <pault@gcc.gnu.org>
Backported from master:
2021-01-25 Steve Kargl <kargl@gcc.gnu.org>
PR fortran/98517
* resolve.c (resolve_charlen): Check that length expression is
present before testing for scalar/integer..
2021-01-25 Paul Thomas <pault@gcc.gnu.org>
Backported from master:
2020-12-29 Paul Thomas <pault@gcc.gnu.org>
PR fortran/93833
* trans-array.c (get_array_ctor_var_strlen): If the character
length backend_decl cannot be found, convert the expression and
use the string length. Clear up some minor white space issues
in the rest of the file.
2021-01-23 Paul Thomas <pault@gcc.gnu.org>
Backported from master:
2020-12-26 Paul Thomas <pault@gcc.gnu.org>
PR fortran/98022
* data.c (gfc_assign_data_value): Throw an error for inquiry
references. Follow with corrected code that would provide the
expected result and provides clean error recovery.
2021-01-23 Paul Thomas <pault@gcc.gnu.org>
Backported from master:
2020-12-12 Paul Thomas <pault@gcc.gnu.org>
PR fortran/98022
* data.c (gfc_assign_data_value): Handle inquiry references in
the data statement object list.
2021-01-19 Tobias Burnus <tobias@codesourcery.com>
Backported from master:
2020-01-04 Tobias Burnus <tobias@codesourcery.com>
PR fortran/91640
* trans-expr.c (gfc_conv_procedure_call): Avoid copy-out for nonvariable
arguments to contiguous dummy args. Avoid re-checking whether fsym is
NULL.
2021-01-07 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2021-01-06 Harald Anlauf <anlauf@gmx.de>
* resolve.c (resolve_component): Add check for valid CLASS
reference before trying to access CLASS data.
2021-01-07 Paul Thomas <pault@gcc.gnu.org>
Backported from master:
2020-08-02 Paul Thomas <pault@gcc.gnu.org>
PR fortran/96325
* primary.c (gfc_match_varspec): In the case that a component
reference is added to an intrinsic type component, emit the
error message in this function.
2021-01-07 Paul Thomas <pault@gcc.gnu.org>
Backported from master:
2020-12-26 Paul Thomas <pault@gcc.gnu.org>
PR fortran/83118
* trans-array.c (gfc_alloc_allocatable_for_assignment): Make
sure that class expressions are captured for dummy arguments by
use of gfc_get_class_from_gfc_expr otherwise the wrong vptr is
used.
* trans-expr.c (gfc_get_class_from_gfc_expr): New function.
(gfc_get_class_from_expr): If a constant expression is
encountered, return NULL_TREE;
(gfc_trans_assignment_1): Deallocate rhs allocatable components
after passing derived type function results to class lhs.
* trans.h : Add prototype for gfc_get_class_from_gfc_expr.
2021-01-07 Paul Thomas <pault@gcc.gnu.org>
Backported from master:
2020-12-18 Paul Thomas <pault@gcc.gnu.org>
PR fortran/83118
PR fortran/96012
* resolve.c (resolve_ordinary_assign): Generate a vtable if
necessary for scalar non-polymorphic rhs's to unlimited lhs's.
* trans-array.c (get_class_info_from_ss): New function.
(gfc_trans_allocate_array_storage): Defer obtaining class
element type until all sources of class exprs are tried. Use
class API rather than TREE_OPERAND. Look for class expressions
in ss->info by calling get_class_info_from_ss. After, obtain
the element size for class descriptors. Where the element type
is unknown, cast the data as character(len=size) to overcome
unlimited polymorphic problems.
(gfc_conv_ss_descriptor): Do not fix class variable refs.
(build_class_array_ref, structure_alloc_comps): Replace code
replicating the new function gfc_resize_class_size_with_len.
(gfc_alloc_allocatable_for_assignment): Obtain element size
for lhs in cases of deferred characters and class enitities.
Move code for the element size of rhs to start of block. Clean
up extraction of class parameters throughout this function.
After the shape check test whether or not the lhs and rhs
element sizes are the same. Use earlier evaluation of
'cond_null'. Reallocation of lhs only to happen if size changes
or element size changes.
* trans-expr.c (gfc_resize_class_size_with_len): New function.
(gfc_get_class_from_expr): If a constant expression is
encountered, return NULL_TREE;
(trans_scalar_class_assign): New function.
(gfc_conv_procedure_call): Ensure the vtable is present for
passing a non-class actual to an unlimited formal.
(trans_class_vptr_len_assignment): For expressions of type
BT_CLASS, extract the class expression if necessary. Use a
statement block outside the loop body. Ensure that 'rhs' is
of the correct type. Obtain rhs vptr in all circumstances.
(gfc_trans_scalar_assign): Call trans_scalar_class_assign to
make maximum use of the vptr copy in place of assignment.
(trans_class_assignment): Actually do reallocation if needed.
(gfc_trans_assignment_1): Simplify some of the logic with
'realloc_flag'. Set 'vptr_copy' for all array assignments to
unlimited polymorphic lhs.
* trans.c (gfc_build_array_ref): Call gfc_resize_class_size_
with_len to correct span for unlimited polymorphic decls.
* trans.h : Add prototype for gfc_resize_class_size_with_len.
2021-01-06 Tobias Burnus <tobias@codesourcery.com>
Backported from master:
2020-04-14 Tobias Burnus <tobias@codesourcery.com>
* module.c (gfc_match_use): Fix name-conflict check for use-associating
the same symbol again in a submodule.
2021-01-04 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2021-01-01 Harald Anlauf <anlauf@gmx.de>
* class.c (gfc_find_vtab): Add check on attribute is_class.
2021-01-04 Tobias Burnus <tobias@codesourcery.com>
Backported from master:
2020-12-17 Tobias Burnus <tobias@codesourcery.com>
PR fortran/92587
* match.c (gfc_match_assignment): Move gfc_find_vtab call from here ...
* resolve.c (gfc_resolve_code): ... to here.
2021-01-04 Paul Thomas <pault@gcc.gnu.org>
PR fortran/96320
* interface.c (gfc_check_dummy_characteristics): If a module
procedure arrives with assumed shape in the interface and
deferred shape in the procedure itself, update the latter and
copy the lower bounds.
2021-01-04 Paul Thomas <pault@gcc.gnu.org>
PR fortran/94246
* expr.c (scalarize_intrinsic_call): Remove the error checking.
Make a copy of the expression to be simplified and only replace
the original if the simplification succeeds.
2020-12-29 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2020-12-25 Harald Anlauf <anlauf@gmx.de>
* data.c (gfc_assign_data_value): Restrict use of
create_character_initializer to constant initializers.
* trans-expr.c (gfc_conv_initializer): Ensure that character
initializer is constant, otherwise fall through to get the same
error handling as for non-character cases.
2020-12-28 Paul Thomas <pault@gcc.gnu.org>
Backported from master:
2020-08-20 Paul Thomas <pault@gcc.gnu.org>
PR fortran/96100
PR fortran/96101
* trans-array.c (get_array_charlen): Tidy up the evaluation of
the string length for array constructors. Avoid trailing array
references. Ensure string lengths of deferred length components
are set. For parentheses operator apply string length to both
the primary expression and the enclosed expression.
2020-12-23 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2020-12-17 Harald Anlauf <anlauf@gmx.de>
PR fortran/98307
* trans-stmt.c (check_forall_dependencies): Extend dependency
check to allocatable components of derived types.
2020-12-11 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2020-11-29 Harald Anlauf <anlauf@gmx.de>
* expr.c (simplify_parameter_variable): Fix up character length
after copying an array-valued expression.
2020-12-04 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2020-12-03 Harald Anlauf <anlauf@gmx.de>
PR fortran/95342
* decl.c (gfc_match_function_decl): Avoid NULL pointer dereference.
(gfc_match_subroutine): Likewise.
2020-11-12 Tobias Burnus <tobias@codesourcery.com>
Backported from master:
2020-11-10 Tobias Burnus <tobias@codesourcery.com>
PR fortran/95847
* trans-decl.c (gfc_get_symbol_decl): Do not (re)set the location
of an external procedure.
(build_entry_thunks, generate_coarray_init, create_main_function,
gfc_generate_function_code): Use fndecl's location in BIND_EXPR.
2020-11-06 Tobias Burnus <tobias@codesourcery.com>
Backported from master:
2020-11-06 Tobias Burnus <tobias@codesourcery.com>
PR fortran/97652
* module.c (mio_symbol): Fix symbol name for pdt_type.
2020-10-08 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2020-10-04 Harald Anlauf <anlauf@gmx.de>
PR fortran/97272
* trans-intrinsic.c (strip_kind_from_actual): Helper function for
removal of KIND argument.
(gfc_conv_intrinsic_minmaxloc): Ignore KIND argument here, as it
is treated elsewhere.
2020-09-28 Mark Eggleston <markeggleston@gcc.gnu.org>
Revert:
2020-09-27 Steven G. Kargl <kargl@gcc.gnu.org>
Mark Eggleston <markeggleston@gcc.gnu.org>
PR fortran/95614
* decl.c (gfc_get_common): Use gfc_match_common_name instead
of match_common_name.
* decl.c (gfc_bind_idents): Use gfc_match_common_name instead
of match_common_name.
* match.c : Rename match_common_name to gfc_match_common_name.
* match.c (gfc_match_common): Use gfc_match_common_name instead
of match_common_name.
* match.h : Rename match_common_name to gfc_match_common_name.
* resolve.c (resolve_common_vars): Check each symbol in a
common block has a global symbol. If there is a global symbol
issue an error if the symbol type is known as is not a common
block name.
2020-09-27 Mark Eggleston <markeggleston@gcc.gnu.org>
Backported from master:
2020-09-27 Steven G. Kargl <kargl@gcc.gnu.org>
Mark Eggleston <markeggleston@gcc.gnu.org>
PR fortran/95614
* decl.c (gfc_get_common): Use gfc_match_common_name instead
of match_common_name.
* decl.c (gfc_bind_idents): Use gfc_match_common_name instead
of match_common_name.
* match.c : Rename match_common_name to gfc_match_common_name.
* match.c (gfc_match_common): Use gfc_match_common_name instead
of match_common_name.
* match.h : Rename match_common_name to gfc_match_common_name.
* resolve.c (resolve_common_vars): Check each symbol in a
common block has a global symbol. If there is a global symbol
issue an error if the symbol type is known as is not a common
block name.
2020-09-19 Tobias Burnus <tobias@codesourcery.com>
Backported from master:
2020-09-17 Tobias Burnus <tobias@codesourcery.com>
PR fortran/96041
PR fortran/93423
* decl.c (gfc_match_submod_proc): Avoid later double-free
in the error case.
2020-09-19 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2020-07-02 Harald Anlauf <anlauf@gmx.de>
PR fortran/93423
* resolve.c (resolve_symbol): Avoid NULL pointer dereference.
2020-09-08 Thomas Koenig <tkoenig@gcc.gnu.org>
Backported from master:
2020-09-08 Thomas Koenig <tkoenig@gcc.gnu.org>
* intrinsic.texi: Fix description of FINDLOC result.
2020-08-27 Mark Eggleston <markeggleston@gcc.gnu.org>
Backported from master:
2020-08-27 Mark Eggleston <markeggleston@gcc.gnu.org>
PR fortran/95882
* decl.c (char_len_param_value): Check gfc_seen_div0 and
if it is set return MATCH_ERROR.
2020-07-27 Mark Eggleston <markeggleston@gcc.gnu.org>
Backported from master:
2020-07-14 Steven G. Kargl <kargl@gcc.gnu.org>
Mark Eggleston <markeggleston@gcc.gnu.org>
PR fortran/95612
* expr.c (gfc_check_pointer_assigb): Output an error if
rvalue is a zero sized array or output an error if rvalue
doesn't have a symbol tree.
2020-07-26 Mark Eggleston <markeggleston@gcc.gnu.org>
Backported from master:
2020-06-22 Steven G. Kargl <kargl@gcc.gnu.org>
Mark Eggleston <markeggleston@gcc.gnu.org>
PR fortran/95585
* check.c (gfc_check_reshape): Add check for a value when
the symbol has an attribute flavor FL_PARAMETER.
2020-07-23 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2020-07-21 Harald Anlauf <anlauf@gmx.de>
PR fortran/89574
* trans-decl.c (gfc_get_extern_function_decl): Check whether a
symbol belongs to a different module.
2020-07-23 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/96018
* frontend-passes.c (gfc_check_externals): Adjust formatting.
(implicit_pure_call): New function.
(implicit_pure_expr): New function.
(gfc_fix_implicit_pure): New function.
* gfortran.h (gfc_fix_implicit_pure): New prototype.
* parse.c (translate_all_program_units): Call gfc_fix_implicit_pure.
2020-07-23 Thomas Koenig <tkoenig@gcc.gnu.org>
Backported from master:
2020-07-19 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/96220
* dump-parse-tree.c (get_c_type_name): Always use the entries from
c_interop_kinds_table to find the correct C type.
2020-07-08 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2020-07-06 Harald Anlauf <anlauf@gmx.de>
PR fortran/95709
* resolve.c (gfc_resolve_code): Check for valid arguments to
assigned GOTO.
2020-07-07 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2020-07-02 Harald Anlauf <anlauf@gmx.de>
PR fortran/93337
* class.c (gfc_find_derived_vtab): Punt if name is not set.
2020-07-05 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2020-06-30 Harald Anlauf <anlauf@gmx.de>
PR fortran/88379
* resolve.c (resolve_assoc_var): Avoid NULL pointer dereference.
2020-07-01 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2020-06-29 Harald Anlauf <anlauf@gmx.de>
PR fortran/71706
* trans-stmt.c (gfc_trans_sync): Do proper kind conversion in
bounds-checking code.
2020-07-01 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2020-06-28 Harald Anlauf <anlauf@gmx.de>
PR fortran/95880
* symbol.c (gfc_add_type): If sym->ns->proc_name is set, use it,
otherwise fall back to sym->name.
2020-07-01 Mark Eggleston <markeggleston@gcc.gnu.org>
Backported from master:
2020-07-01 Steven G. Kargl <kargl@gcc.gnu.org>
Mark Eggleston <markeggleston@gcc.gnu.org>
PR fortran/95829
* decl.c (gfc_match_decl_type_spec): Compare with "* ) " instead
of "*)".
2020-06-30 Thomas Koenig <tkoenig@gcc.gnu.org>
Backported from master:
2020-06-29 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/95743
* trans-decl.c (gfc_generate_function_code): Do not generate
recursion check for compiler-generated procedures.
2020-06-27 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2020-06-27 Harald Anlauf <anlauf@gmx.de>
PR fortran/95881
* resolve.c (resolve_symbol): Avoid NULL pointer dereference.
2020-06-24 Harald Anlauf <anlauf@gmx.de>
PR fortran/95689
* interface.c (check_sym_interfaces): Enlarge temporary buffer,
and add check on length on mangled name to prevent overflow.
2020-06-23 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2020-06-20 Harald Anlauf <anlauf@gmx.de>
PR fortran/95689
* interface.c (check_sym_interfaces): Enlarge temporary buffer,
and add check on length on mangled name to prevent overflow.
2020-06-23 Harald Anlauf <anlauf@gmx.de>
Backported from master:
2020-06-20 Harald Anlauf <anlauf@gmx.de>
PR fortran/95587
* match.c (gfc_match_equivalence): Check constraints on
EQUIVALENCE objects also for CLASS variables.
2020-06-23 Mark Eggleston <markeggleston@gcc.gnu.org>
Backported from master:
2020-06-22 Steven G. Kargl <kargl@gcc.gnu.org>
Mark Eggleston <markeggleston@gcc.gnu.org>
PR fortran/95708
* intrinsic.c (add_functions): Replace CLASS_INQUIRY with
CLASS_TRANSFORMATIONAL for intrinsic num_images.
(make_generic): Replace ACTUAL_NO with ACTUAL_YES for
intrinsic team_number.
* resolve.c (resolve_fl_procedure): Check pointer ts.u.derived
exists before using it.
2020-06-14 Harald Anlauf <anlauf@gmx.de>
PR fortran/95503
* expr.c (gfc_check_pointer_assign): Skip contiguity check of rhs
of pointer assignment if lhs cannot be simply contiguous.
2020-06-14 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/94109
* class.c (finalize_component): Return early if finalization has
already happened for expression and component within namespace.
* gfortran.h (gfc_was_finalized): New type.
(gfc_namespace): Add member was_finalzed.
(gfc_expr): Remove finalized.
* symbol.c (gfc_free_namespace): Free was_finalized.
2020-06-11 Harald Anlauf <anlauf@gmx.de>
Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/95611
* decl.c (access_attr_decl): Use correct symbol in error message.
2020-06-11 Harald Anlauf <anlauf@gmx.de>
PR fortran/95091
* class.c (gfc_hash_value): Add cast.
2020-06-11 Harald Anlauf <anlauf@gmx.de>
PR fortran/95091
* class.c (get_unique_type_string, gfc_hash_value): Enlarge
buffers, and check whether the strings returned by
get_unique_type_string() fit.
2020-06-05 Harald Anlauf <anlauf@gmx.de>
PR fortran/95373
* primary.c (is_inquiry_ref): Move validity check of inquiry
references against selected Fortran standard from here...
(gfc_match_varspec) ...to here.
2020-06-05 Harald Anlauf <anlauf@gmx.de>
PR fortran/95373
* primary.c (is_inquiry_ref): Check validity of inquiry
references against selected Fortran standard.
2020-06-05 Harald Anlauf <anlauf@gmx.de>
PR fortran/95106
* trans-common.c (gfc_sym_mangled_common_id): Enlarge temporaries
for name-mangling.
2020-06-05 Harald Anlauf <anlauf@gmx.de>
PR fortran/95530
PR fortran/95537
* decl.c (gfc_match_decl_type_spec): Enlarge buffer, and enhance
string copy to detect buffer overflow.
* gfortran.h (gfc_common_head): Enlarge buffer.
* trans-common.c (finish_equivalences): Enhance string copy to
detect buffer overflow.
2020-06-05 Steven G. Kargl <kargl@gcc.gnu.org>
Harald Anlauf <anlauf@gmx.de>
PR fortran/95500
* trans-expr.c (gfc_conv_expr_reference): Do not dereference NULL
pointer.
2020-06-01 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/94361
* class.c (finalize_component): Use expr->finalized instead of
comp->finalized.
* gfortran.h (gfc_component): Remove finalized member.
(gfc_expr): Add it here instead.
2020-05-28 Steven G. Kargl <kargl@gcc.gnu.org>
Mark Eggleston <markeggleston@gcc.gnu.org>
Mark Eggleston <markeggleston@gcc.gnu.org>
PR fortran/94397
* match.c (gfc_match_type_spec): New variable ok initialised
to true. Set ok with the return value of gfc_reduce_init_expr
called only if the expression is not EXPR_CONSTANT and is not
EXPR_VARIABLE. Add !ok to the check for type not being integer
or the rank being greater than zero.
2020-05-28 Tobias Burnus <tobias@codesourcery.com>
Mark Eggleston <markeggleston@gnu.gcc.org>
PR fortran/50392
* trans-decl.c (gfc_get_symbol_decl): Remove unnecessary block
delimiters. Add auxiliary variables if a label is assigned to
a return variable. (gfc_gat_fake_result): If the symbol has an
assign attribute set declaration from the symbol's backend
declaration.
2020-05-27 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/95191
* libgfortran.h (libgfortran_error_codes): Add
LIBERROR_BAD_WAIT_ID.
2020-05-20 Mark Eggleston <markeggleston@gcc.gnu.org>
PR fortran/39695
* resolve.c (resolve_fl_procedure): Set name depending on
whether the result attribute is set. For PROCEDURE/RESULT
conflict use the name in sym->ns->proc_name->name.
* symbol.c (gfc_add_type): Add check for function and result
attributes use sym->ns->proc_name->name if both are set.
Where the symbol cannot have a type use the name in
sym->ns->proc_name->name.
2020-05-13 Mark Eggleston <markeggleston@gcc.gnu.org>
Backported from master
2020-05-13 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/93497
* decl.c (char_len_param_value): Check whether character
length expression is of type EXPR_OP and if so simplify it.
* resolve.c (resolve_charlen): Reject length if it has a
rank.
2020-05-11 Mark Eggleston <markeggleston@gcc.gnu.org>
Backported from mainline
2020-05-11 Janus Weil <janus@gcc.gnu.org>
Dominique d'Humieres <dominiq@lps.ens.fr>
PR fortran/59107
* gfortran.h: Rename field resolved as resolve_symbol_called
and assign two 2 bits instead of 1.
* interface.c (gfc_find_typebound_dtio_proc): Use new field name.
* resolve.c (gfc_resolve_intrinsic): Replace check of the formal
field with resolve_symbol_called is at least 2, if it is not
set the field to 2. (resolve_typebound_procedure): Use new field
name. (resolve_symbol): Use new field name and check whether it
is at least 1, if it is not set the field to 1.
2020-05-04 Tobias Burnus <tobias@codesourcery.com>
Backport from mainline.
2020-03-08 Paul Thomas <pault@gcc.gnu.org>
PR fortran/93581
* resolve.c (gfc_resolve_ref): Modify array refs to be elements
if the ref chain ends in INQUIRY_LEN.
* trans-array.c (gfc_get_dataptr_offset): Provide the offsets
for INQUIRY_RE and INQUIRY_IM.
2020-04-27 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/93956
PR fortran/94788
* expr.c (gfc_check_pointer_assign): Revert patch for PR 93956.
* interface.c: Likewise.
2020-04-24 Thomas Koenig <tkoenig@gcc.gnu.org>
Backport from trunk
PR fortran/93956
* expr.c (gfc_check_pointer_assign): Also set subref_array_pointer
when a function returns a pointer.
* interface.c (gfc_set_subref_array_pointer_arg): New function.
(gfc_procedure_use): Call it.
2020-04-20 Harald Anlauf <anlauf@gmx.de>
Backport from mainline.
PR fortran/93364
* array.c (gfc_set_array_spec): Check for sum of rank and corank
not exceeding GFC_MAX_DIMENSIONS.
2020-04-14 Thomas Koenig <tkoenig@gcc.gnu.org>
Backport from trunk.
PR fortran/94270
* trans-decl.c (generate_local_decl): Do not warn if the
symbol is artifical.
2020-04-06 Fritz Reese <foreese@gcc.gnu.org>
Backport from master
Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/93686
* decl.c (gfc_match_data): Handle data matching for derived type
pointers.
2020-04-02 Mark Eggleston <markeggleston@gcc.gnu.org>
Backport from master
Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/93498
* check.c (gfc_check_findloc): If the kinds of the arguments
differ goto label "incompat".
2020-04-02 Mark Eggleston <markeggleston@gcc.gnu.org>
Backport from master
2020-04-02 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/94030
* resolve.c (resolve_equivalence): Correct formatting
around the label "identical_types". Instead of using
gfc_resolve_array_spec use is_non_constants_shape_array
to determine whether the array can be used in a in an
equivalence statement.
2020-03-28 Tobias Burnus <tobias@codesourcery.com>
Backport from mainline
2020-03-28 Tobias Burnus <tobias@codesourcery.com>
PR fortran/94348
* decl.c (gfc_match_submod_proc): Add result var to the
proc's namespace.
2020-03-25 Mark Eggleston <markeggleston@gcc.gnu.org>
Backport from master
2020-03-25 Mark Eggleston <markeggleston@gcc.gnu.org>
PR fortran/93484
* match.c (gfc_match_type_spec): Replace gfc_match_init_expr with
gfc_match_expr. Return m if m is MATCH_NO or MATCH_ERROR.
2020-03-12 Release Manager
* GCC 9.3.0 released.
2020-03-05 Paul Thomas <pault@gcc.gnu.org>
Backport from trunk
PR fortran/92976
* match.c (select_type_set_tmp): Variable 'selector' to replace
select_type_stack->selector. If the selector array spec has
explicit bounds, make the temporary's bounds deferred.
2020-02-19 Mark Eggleston <markeggleston@gcc.gnu.org>
Backported from mainline
2020-02-18 Mark Eggleston <markeggleston@gcc.gnu.org>
PR fortran/93714
* expr.c (gfc_check_pointer_assign): Move check for
matching character length to after checking the lvalue
attributes for target or pointer.
2020-02-18 Mark Eggleston <markeggleston@gcc.gnu.org>
Backported from mainline
2020-02-18 Steven G. Kargl <kargl@gcc.gnu.org>
Mark Eggleston <markeggleston@gcc.gnu.org>
PR fortran/93580
* primary.c (gfc_match_varspec): If the symbol following %
is re or im and the primary expression type is not BT_COMPLEX
issue an error. If the symbol is len and the primary
expression type is not BT_CHARACTER is an error.
2020-02-13 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
2020-01-29 Jakub Jelinek <jakub@redhat.com>
PR fortran/93463
* openmp.c (oacc_code_to_statement): Handle
EXEC_OACC_{ROUTINE,UPDATE,WAIT,CACHE,{ENTER,EXIT}_DATA,DECLARE}.
2020-02-03 Tobias Burnus <tobias@codesourcery.com>
Backported from mainline
2020-02-03 Tobias Burnus <tobias@codesourcery.com>
PR fortran/93541
* intrinisic.texi (OpenMP Modules OMP_LIB and OMP_LIB_KINDS):
Add undocumented parameters from omp_lib.f90.in.
2020-02-03 Tobias Burnus <tobias@codesourcery.com>
Backported from mainline
2020-01-31 Tobias Burnus <tobias@codesourcery.com>
PR fortran/93462
* frontend-passes.c (gfc_code_walker): For EXEC_OACC_ATOMIC, set
in_omp_atomic to true prevent front-end optimization.
2020-02-03 Tobias Burnus <tobias@codesourcery.com>
Backported from mainline
2020-01-21 Tobias Burnus <tobias@codesourcery.com>
PR fortran/93309
* interface.c (gfc_procedure_use): Also check parent namespace for
'implict none (external)'.
* symbol.c (gfc_get_namespace): Don't set has_implicit_none_export
to parent namespace's setting.
2020-01-22 Jakub Jelinek <jakub@redhat.com>
* parse.c (parse_omp_structured_block): Handle ST_OMP_TARGET_PARALLEL.
* trans-openmp.c (gfc_trans_omp_target)
<case EXEC_OMP_TARGET_PARALLEL>: Call pushlevel first.
PR fortran/93329
* openmp.c (omp_code_to_statement): Handle remaining EXEC_OMP_*
cases.
2020-01-17 Mark Eggleston <mark.eggleston@codethink.com>
Backport from mainline
Mark Eggleston <mark.eggleston@codethink.com>
PR fortran/93236
* resolve.c (resolve_types): Declare boolean recursive and set with the
value of the recursive attribute of namespace proc_name symbol
structure if it exists. Call gfc_save_all if both flag_automatic and
recursive are false or ns->save_all is true.
2020-01-10 Tobias Burnus <tobias@codesourcery.com>
Backported from mainline
2020-01-09 Tobias Burnus <tobias@codesourcery.com>
PR fortran/84135
* array.c (gfc_set_array_spec): Fix shifting of codimensions
when adding a dimension.
* decl.c (merge_array_spec): Ditto. Fix using correct codimensions.
2019-12-30 Thomas Koenig <tkoenig@gcc.gnu.org>
Backport from trunk
PR fortran/92961
* gfortran.h (gfc_seen_div0): Add declaration.
* arith.h (gfc_seen_div0): Add definition.
(eval_intrinsic): For integer division by zero, set gfc_seen_div0.
* decl.c (variable_decl): If resolution resp. simplification
fails for array spec and a division of zero error has been
seen, return MATCH_ERROR.
2019-12-21  Paul Thomas  <pault@gcc.gnu.org>
Backported from mainline
PR fortran/92753
* expr.c (find_inquiry_ref): Catch INQUIRY_LEN case, where the
temporary expression has been converted to a constant and make
the new expression accordingly. Correct the error in INQUIRY_RE
and INQUIRY_IM cases. The original rather than the resolved
expression was being used as the source in mpfr_set.
2019-12-20 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
2019-12-19 Jakub Jelinek <jakub@redhat.com>
PR fortran/92977
* frontend-passes.c (call_external_blas): Use || instead of |.
PR fortran/92977
* frontend-passes.c (in_omp_atomic): New variable.
(cfe_expr_0, matmul_to_var_expr, matmul_temp_args,
inline_matmul_assign, call_external_blas): Don't optimize in
EXEC_OMP_ATOMIC.
(optimize_namespace): Clear in_omp_atomic.
(gfc_code_walker): Set in_omp_atomic for EXEC_OMP_ATOMIC, save/restore
it around.
2019-12-11 Jakub Jelinek <jakub@redhat.com>
PR fortran/92899
* trans-openmp.c (gfc_trans_omp_atomic): For GFC_OMP_ATOMIC_SWAP,
do look through conversion on expr2 if any.
2019-12-06 Jakub Jelinek <jakub@redhat.com>
PR fortran/92775
* trans.h (struct lang_type, struct lang_decl): Remove span member.
(GFC_DECL_SPAN, GFC_TYPE_ARRAY_SPAN): Remove macros.
* trans-array.h (gfc_get_descriptor_offsets_for_info): Add another
argument.
* trans-array.c (gfc_get_descriptor_offsets_for_info): Add SPAN_OFF
argument and initialize *SPAN_OFF to the offset of span field.
* trans-types.c (gfc_get_array_descr_info): Adjust
gfc_get_descriptor_offsets_for_info caller. Compute elem_size
as base->span instead of TYPE_SIZE_UNIT (etype) constant.
2019-12-05 Jakub Jelinek <jakub@redhat.com>
PR fortran/92781
* trans-decl.c (gfc_get_symbol_decl): If sym->backend_decl is
current_function_decl, add length to current rather than parent
function and expect DECL_CONTEXT (length) to be current_function_decl.
2019-11-27 Jakub Jelinek <jakub@redhat.com>
PR fortran/91944
* simplify.c (gfc_simplify_spread): Check gfc_init_expr_flag instead
of gfc_current_ns->sym_root->n.sym->attr.flavor == FL_PARAMETER.
2019-12-12 Harald Anlauf <anlauf@gmx.de>
Backport from mainline
PR fortran/92898
* check.c (gfc_check_is_contiguous): Simplify check to handle
arbitrary NULL() argument.
2019-12-11 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/92897
* array.c (gfc_set_array_spec): Remove invalid assert() triggered
by invalid Fortran code.
2019-11-29 Harald Anlauf <anlauf@gmx.de>
Backport from mainline
PR fortran/92629
* simplify.c (convert_mpz_to_unsigned): Skip assert for argument
range when -fno-range-check is specified.
2019-11-25 Tobias Burnus <tobias@codesourcery.com
Backport from mainline
2019-10-11 Tobias Burnus <tobias@codesourcery.com>
PR fortran/92050
* trans-expr.c (gfc_conv_procedure_call): Handle code generated
by -fcheck=all.
2019-11-10 Thomas Koenig <tkoenig@gcc.gnu.org>
Backport from trunk
PR fortran/92113
* trans-decl.c (gfc_get_symbol_decl): If __def_init actually
contains a value, put it into the read-only section.
2019-11-10 Thomas Koenig <tkoenig@gcc.gnu.org>
Backport from trunk
PR fortran/92321
* frontend-passes.c (call_external_blas): Commit symbol for
external BLAS routine.
2019-11-08 Tobias Burnus <tobias@codesourcery.com
Backport from mainline
2019-11-08 Tobias Burnus <tobias@codesourcery.com
PR fortran/91253
* scanner.c (skip_fixed_comments): Move comment
lines to next if block.
(gfc_next_char_literal): Fix continue_line setting.
(get_file): Remove bogus ATTRIBUTE_UNUSED.
2019-11-05 Tobias Burnus <tobias@codesourcery.com>
PR fortran/92208
Backport from mainline
2019-10-31 Tobias Burnus <tobias@codesourcery.com>
PR fortran/92277
* trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Fix DECL_ARTIFICIAL
checking.
2019-11-04 Tobias Burnus <tobias@codesourcery.com>
Backport from mainline
2019-10-30 Tobias Burnus <tobias@codesourcery.com>
PR fortran/92208
* trans-array.c (gfc_conv_array_parameter): Only copy
string-length backend_decl if expression is not a function.
2019-11-04 Tobias Burnus <tobias@codesourcery.com>
Backport from mainline
2019-10-31 Tobias Burnus <tobias@codesourcery.com>
PR fortran/92284.
* trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Free CFI descriptor
at the end; partial revised revert of Rev. 277502.
2019-10-28  Paul Thomas  <pault@gcc.gnu.org>
Backport from trunk
PR fortran/91926
* trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Correct the
assignment of the attribute field to account correctly for an
assumed shape dummy. Assign separately to the gfc and cfi
descriptors since the atribute can be different. Add branch to
correctly handle missing optional dummies.
2019-10-28 Tobias Burnus <tobias@codesourcery.com>
Backport from mainline
2019-10-28 Tobias Burnus <tobias@codesourcery.com>
PR fortran/91863
* trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Don't free data
memory as that's done on the Fortran side.
(gfc_conv_procedure_call): Handle void* pointers from
gfc_conv_gfc_desc_to_cfi_desc.
2019-10-27 Paul Thomas <pault@gcc.gnu.org>
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-22 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/92174
* decl.c (attr_decl1): Move check for F2018:C822 from here ...
* array.c (gfc_set_array_spec): ... to here.
2019-10-18 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/69455
* trans-decl.c (generate_local_decl): Avoid misconstructed
intrinsic modules in a BLOCK construct.
2019-10-18 Tobias Burnus <tobias@codesourcery.com>
Backport from mainline
2019-10-18 Tobias Burnus <tobias@codesourcery.com>
PR fortran/91586
* class.c (gfc_find_derived_vtab): Return NULL
instead of deref'ing NULL pointer.
2019-10-17 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/83113
PR fortran/89943
decl.c (gfc_match_function_decl): Ignore duplicate BIND(C) for function
declaration in submodule. Implement at check for F2018 C1550.
(gfc_match_entry): Use temporary for locus, which allows removal of
one gfc_error_now().
(gfc_match_subroutine): Ignore duplicate BIND(C) for subroutine
declaration in submodule. Implement at check for F2018 C1550.
2019-10-11 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91715
* decl.c (gfc_match_prefix): If matching a type-spec returns an error,
it's an error so re-act correctly.
2019-10-11 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91649
check.c (gfc_check_findloc): Additional checking for valid arguments
2019-10-10 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91801
* simplify.c (gfc_simplify_reshape): Convert a gcc_assert into a
gfc_error as a user can easily hit the condition.
2019-10-07 Thomas Koenig <tkoenig@gcc.gnu.org>
Backport from trunk
PR fortran/84487
* trans-decl.c (gfc_get_symbol_decl): For __def_init, set
DECL_ARTIFICAL and do not set TREE_READONLY.
2019-10-05 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/47054
* decl.c (variable_decl): Do not search parent namespace for symbol.
2019-10-04 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91942
* io.c (match_vtag): Check for non-NULL result->symtree.
(match_out_tag): Check for invalid constant due to inquiry parameter.
(match_filepos): Instead of a syntax error, go to cleanup to get better
error messages.
2019-10-04 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91785
* primary.c (gfc_match_varspec): Ensure an inquiry parameter has
it locus set.
2019-10-01 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91864
* gcc/fortran/io.c (match_io_element): An inquiry parameter cannot be
read into.
* gcc/fortran/match.c (gfc_match_allocate): An inquiry parameter
can be neither an allocate-object nor stat variable.
(gfc_match_deallocate): An inquiry parameter cannot be deallocated.
2019-10-01 Steven G. Kargl <kargl@gcc.ngu.org>
Backport of r276254+276265
PR fortran/91802
* decl.c (attr_decl1): Check if rank+corank > 15.
2019-10-01 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91714
* decl.c (gfc_match_decl_type_spec): Issue errors for a few
mangled types.
2019-10-01 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91641
* check.c (gfc_check_is_contiguous): null() cannot be an actual
argument to is_contiguous().
2019-09-21 Paul Thomas <pault@gcc.gnu.org>
Backport from mainline
PR fortran/91588
* expr.c (check_inquiry): Remove extended component refs by
using symbol pointers. If a function argument is an associate
variable with a constant target, copy the target expression in
place of the argument expression. Check that the charlen is not
NULL before using the string length.
2019-09-19 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91727
* resolve.c (conformable_arrays): If array-spec is NULL, then
allocate-object is a scalar. a conformability check only occurs
for an array source-expr.
2019-09-18 Thomas Koenig <tkoenig@gcc.gnu.org>
Backport from trunk
PR fortran/91550
* frontend-passes.c (do_subscript): If step equals
zero, a previuos error has been reported; do nothing
in this case.
* resolve.c (gfc_resolve_iterator): Move error checking
after type conversion.
2019-09-15 Thomas Koenig <tkoenig@gcc.gnu.org>
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-14 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91553
* simplify.c (gfc_convert_constant): During conversion check if the
constant is enclosed in parenthesis, and simplify expression.
2019-09-14 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91566
* simplify.c (gfc_simplify_merge): Need to simplify expression
after insertation of parenthesis.
2019-09-14 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91642
* io.c (gfc_match_inquire): null() cannot be in an iolength inquire
list.
2019-09-07 Paul Thomas <pault@gcc.gnu.org>
Backport from mainline
PR fortran/91589
* primary.c (gfc_match_varspec): Return MATCH_NO on an apparent
component ref, when the primary type is intrinsic.
2019-09-05 Harald Anlauf <anlauf@gmx.de>
Backport from mainline
PR fortran/91496
* gfortran.h: Extend struct gfc_iterator for loop annotations.
* array.c (gfc_copy_iterator): Copy loop annotations by IVDEP,
VECTOR, and NOVECTOR pragmas.
* decl.c (gfc_match_gcc_ivdep, gfc_match_gcc_vector)
(gfc_match_gcc_novector): New matcher functions handling IVDEP,
VECTOR, and NOVECTOR pragmas.
* match.h: Declare prototypes of matcher functions handling IVDEP,
VECTOR, and NOVECTOR pragmas.
* parse.c (decode_gcc_attribute, parse_do_block)
(parse_executable): Decode IVDEP, VECTOR, and NOVECTOR pragmas;
emit warning for unrecognized pragmas instead of error.
* trans-stmt.c (gfc_trans_simple_do, gfc_trans_do): Add code to
emit annotations for IVDEP, VECTOR, and NOVECTOR pragmas.
* gfortran.texi: Document IVDEP, VECTOR, and NOVECTOR pragmas.
PR fortran/91496
* parse.c (parse_executable): Improve error messages for
improperly placed pragmas not preceeding a loop.
2019-09-05 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91660
* decl.c (gfc_match_decl_type_spec): Improve and restore error
message for malformed types-spec.
2019-09-02 Steven G. Kargl <kargl@gc.gnu.org>
PR fortran/91552
* array.c (walk_array_constructor): New function.
(gfc_match_array_constructor): Use it.
2019-08-30 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91587
* io.c (match_filepos): MATCH_ERROR should branch to a syntax error.
2019-08-30 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91565
* simplify.c (gfc_simplify_reshape): Add additional checks of the
ORDER dummy argument.
2019-08-30 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91564
* check.c (gfc_check_kill_sub): Additional checks on status dummy
argument.
2019-08-30 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91551
* intrinsic.c (sort_actual): ALLOCATED has one argument. Check for
no argument case.
2019-08-30 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91485
module.c (gfc_match_use): User defined operator cannot conflict with
a rename symbol.
2019-08-17 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91471
* primary.c (gfc_variable_attr): Remove a gfc_internal_error(),
which cannot be reached by conforming Fortran code, but seems to
be reachable from nonconforming Fortran code. Treat the AR_UNKNOWN
case as a no-op.
2019-08-17 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/78739
* match.c (gfc_match_st_function): When matching a statement function,
need to check if the statement function name shadows the function
name.
2019-08-17 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/78719
* decl.c (get_proc_name): Check for a CLASS entity when trying to
add attributes to an entity that already has an explicit interface.
2019-08-17 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/82992
* module.c (gfc_match_use): When renaming a module entity, search
current namespace for conflicting symbol.
2019-08-13 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/87991
* resolve.c (check_data_variable): data-stmt-object with pointer
attribute requires a data-stmt-value with the target attribute.
2013-08-13 Thomas Koenig <tkoenig@gcc.gnu.org>
Backport from trunk
PR fortran/90563
* frontend-passes.c (insert_index): Suppress errors while
simplifying the resulting expression.
2019-08-13 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/88072
* misc.c (gfc_typename): Do not point to something that ought not to
be pointed at.
2019-08-13 Thomas Koenig <tkoenig@gcc.gnu.org>
Backport from trunk
PR fortran/90561
* trans.h (gfc_evaluate_now_function_scope): New function.
* trans.c (gfc_evaluate_now_function_scope): New function.
* trans-expr.c (gfc_trans_assignment): Use it.
2019-08-13 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/89647
resolve.c (resolve_typebound_procedure): Allow host associated
procedure to be a binding target. While here, wrap long line.
2019-08-13 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/87993
* expr.c (gfc_simplify_expr): Simplifcation of an array with a kind
type inquiry suffix yields a constant expression.
2019-08-13 Thomas Koenig <tkoenig@gcc.gnu.org>
Backport from trunk
PR fortran/91424
* frontend-passes.c (do_subscript): Do not warn for an
expression a second time. Do not warn about a zero-trip loop.
(doloop_warn): Also look at contained namespaces.
2019-08-12 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91359
* trans-decl.c (gfc_generate_return): Ensure something is returned
from a function.
2019-08-12 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/42546
* check.c(gfc_check_allocated): Add comment pointing to ...
* intrinsic.c(sort_actual): ... the checking done here.
2019-08-12 Release Manager
* GCC 9.2.0 released.
2019-08-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Backport from trunk
PR fortran/87233
* expr.c (check_restricted): Relax constraint C1279 which was
removed from F2008 and above.
2019-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91296
* interface.c (compare_actual_expr): When checking for aliasing, add
a case to handle REF_INQUIRY (e.g., foo(x%re, x%im) do not alias).
2019-07-29 Thomas Koenig <tkoenig@gcc.gnu.org>
Paul Thomas <pault@gcc.gnu.org>
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.
* dump-parse-tree.c (show_global_symbol): New function.
(gfc_dump_global_symbols): New function.
* gfortran.h (gfc_traverse_gsymbol): Add prototype.
(gfc_dump_global_symbols): Likewise.
* invoke.texi: Document -fdump-fortran-global.
* lang.opt: Add -fdump-fortran-global.
* parse.c (gfc_parse_file): Handle flag_dump_fortran_global.
* symbol.c (gfc_traverse_gsymbol): New function.
* 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-07-23 Thomas König <tkoenig@gcc.gnu.org>
Backport from trunk
PR libfortran/91030
* gfortran.texi (GFORTRAN_FORMATTED_BUFFER_SIZE): Document.
(GFORTRAN_UNFORMATTED_BUFFER_SIZE): Likewise.
2019-07-07 Paul Thomas <pault@gcc.gnu.org>
Backport from mainline
PR fortran/91077
* trans-array.c (gfc_conv_scalarized_array_ref) Delete code
that gave symbol backend decl for subref arrays and deferred
length variables.
2019-06-21 Thomas Koenig <tkoenig@gcc.gnu.org>
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-20 Steven G. Kargl <kargl@gcc.gnu.org>
Backport from mainline
PR fortran/90290
* match.c (gfc_match_stopcode): Check F2008 condition on stop code.
2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
Backport from mainline
PR fortran/90002
* array.c (gfc_free_array_spec): When freeing an array-spec, avoid
an ICE for assumed-shape coarrays.
2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
Backport from mainline
PR fortran/89344
* expr.c (gfc_check_vardef_context): Check for INTENT(IN) variable
in SELECT TYPE construct.
2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
Backport from mainline
PR fortran/87907
* resolve.c (resolve_contained_fntype): Do not dereference a NULL
pointer.
2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
Backport from mainline
PR fortran/86587
* symbol.c (verify_bind_c_derived_type): Remove erroneous error
checking for BIND(C) and PRIVATE attributes.
2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
Backport from mainline
PR fortran/77632
* /decl.c (variable_decl): Mark a variable that is a target in pointer
initialization when in PROGRAM, MODULE, or SUBMODULE scope with an
implicit save.
2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
Backport from mainline
PR fortran/69499
* match.c (gfc_match_select_type): SELECT TYPE is an executable
statement, and cannot appear in MODULE or SUBMODULE scope.
2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
Backport from mainline
PR fortran/69398
* decl.c (attr_decl): Check for duplicate DIMENSION attribute for a
CLASS entity.
2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
Backport from mainline
PR fortran/68544
* resolve.c (is_dt_name): New function to compare symbol name against
list of derived types.
(resolve_actual_arglist): Use it to find wrong code.
2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
Backport from mainline
* arith.c (arith_power): Rework overflow of an integer to an integer
exponent.
2019-06-18 Harald Anlauf <anlauf@gmx.de>
Backport from mainline
2019-06-14 Harald Anlauf <anlauf@gmx.de>
PR fortran/90577
PR fortran/90578
* trans-intrinsic.c (gfc_conv_intrinsic_shift): Properly
distinguish logical/arithmetic shifts.
* intrinsic.texi: Update documentation for SHIFTR/SHIFTL/SHIFTA
(Fortran 2008) and LSHIFT/RSHIFT (GNU extensions).
2019-06-11 Thomas Koenig <tkoenig@gcc.gnu.org>
Tomáš Trnka <trnka@scm.com>
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
interface.
2019-05-30 Marek Polacek <polacek@redhat.com>
* lang.opt (ftail-call-workaround): Fix a typo.
2019-05-30 Jakub Jelinek <jakub@redhat.com>
* lang.opt (ftail-call-workaround=): Fix a typo - lenghts to lengths.
2019-05-29 Jakub Jelinek <jakub@redhat.com>
PR fortran/90329
Backported from mainline
2019-05-29 Jakub Jelinek <jakub@redhat.com>
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
sym->ns->implicit_interface_calls.
* invoke.texi (fbroken-callers): Remove documentation.
(ftail-call-workaround, ftail-call-workaround=): Document.
2019-05-19 Thomas Koenig <tkoenig@gcc.gnu.org>
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 <jakub@redhat.com>
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-05-21 Janne Blomqvist <jb@gcc.gnu.org>
Backport from trunk
PR libfortran/90038
* intrinsic.texi (EXECUTE_COMMAND_LINE): Explain new
wait=.false. implementation.
2019-05-19 Paul Thomas <pault@gcc.gnu.org>
Backport from trunk
PR fortran/90498
* trans-stmt.c (trans_associate_var) Do not use the saved
descriptor if the expression is a COMPONENT_REF.
2019-05-15 Janne Blomqvist <jb@gcc.gnu.org>
Backport from trunk
* parse.c (gfc_parse_file): Remove translation string markers.
2019-05-12 Janne Blomqvist <jb@gcc.gnu.org>
Backport from trunk
* dump-parse-tree.c (get_c_type_name): Use macros for complex type
names.
* parse.c (gfc_parse_file): Define complex macros, add CPP support
when printing C prototypes.
2019-05-11 Paul Thomas <pault@gcc.gnu.org>
Backport from trunk
PR fortran/90093
* trans-decl.c (convert_CFI_desc): Test that the dummy is
present before doing any of the conversions.
PR fortran/90352
* decl.c (gfc_verify_c_interop_param): Restore the error for
charlen > 1 actual arguments passed to bind(C) procs.
Clean up trailing white space.
PR fortran/90355
* trans-array.c (gfc_trans_create_temp_array): Set the 'span'
field to the element length for all types.
(gfc_conv_expr_descriptor): The force_no_tmp flag is used to
prevent temporary creation, especially for substrings.
* trans-decl.c (gfc_trans_deferred_vars): Rather than assert
that the backend decl for the string length is non-null, use it
as a condition before calling gfc_trans_vla_type_sizes.
* trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): 'force_no_tmp'
is set before calling gfc_conv_expr_descriptor.
* trans.c (get_array_span): Move the code for extracting 'span'
from gfc_build_array_ref to this function. This is specific to
descriptors that are component and indirect references.
* trans.h : Add the force_no_tmp flag bitfield to gfc_se.
2019-05-09 Thomas Koenig <tkoenig@gcc.gnu.org>
Backport from trunk
PR fortran/90351
PR fortran/90329
* gfortran.dg/dump-parse-tree.c: Include version.h.
(gfc_dump_external_c_prototypes): New function.
(get_c_type_name): Select "char" as a name for a simple char.
Adjust to handling external functions. Also handle complex.
(write_decl): Add argument bind_c. Adjust for dumping of external
procedures.
(write_proc): Likewise.
(write_interop_decl): Add bind_c argument to call of write_proc.
* gfortran.h: Add prototype for gfc_dump_external_c_prototypes.
* lang.opt: Add -fc-prototypes-external flag.
* parse.c (gfc_parse_file): Move dumping of BIND(C) prototypes.
Call gfc_dump_external_c_prototypes if option is set.
* invoke.texi: Document -fc-prototypes-external.
2019-05-03 Release Manager
* GCC 9.1.0 released.
2019-04-19 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/90166
* decl.c (in_module_or_interface): New function to check that the
current state is in a module, submodule, or interface.
(gfc_match_prefix): Use it.
2019-04-22 Paul Thomas <pault@gcc.gnu.org>
PR fortran/57284
* resolve.c (find_array_spec): If this is a class expression
and the symbol and component array specs are the same, this is
not an error.
*trans-intrinsic.c (gfc_conv_intrinsic_size): If a class symbol
argument, has no namespace, it has come from the interface
mapping and the _data component must be accessed directly.
2019-04-17 Thomas Schwinge <thomas@codesourcery.com>
PR fortran/90048
* openmp.c (gfc_resolve_do_iterator): Handle sharing_clauses for
OpenACC, too.
(gfc_resolve_oacc_blocks): Populate sharing_clauses with private
clauses.
2019-04-14 Paul Thomas <pault@gcc.gnu.org>
PR fortran/89843
* trans-decl.c (gfc_get_symbol_decl): Assumed shape and assumed
rank dummies of bind C procs require deferred initialization.
(convert_CFI_desc): New procedure to convert incoming CFI
descriptors to gfc types and back again.
(gfc_trans_deferred_vars): Call it.
* trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Null the CFI
descriptor pointer. Free the descriptor in all cases.
PR fortran/89846
* expr.c (is_CFI_desc): New function.
(is_subref_array): Tidy up by referencing the symbol directly.
* gfortran.h : Prototype for is_CFI_desc.
* trans_array.c (get_CFI_desc): New function.
(gfc_get_array_span, gfc_conv_scalarized_array_ref,
gfc_conv_array_ref): Use it.
* trans.c (get_array_span): Extract the span from descriptors
that are indirect references.
PR fortran/90022
* trans-decl.c (gfc_get_symbol_decl): Make sure that the se
expression is a pointer type before converting it to the symbol
backend_decl type.
* trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Eliminate
temporary creation for intent(in).
2019-04-13 Dominique d'Humieres <dominiq@gcc.gnu.org>
PR fortran/79842
* module.c (gfc_use_module): use complete sentences.
2019-04-11 Thomas Koenig <tkoenig@gcc.gnu.org>
PR translation/89939
* frontend-passes.c (B_ERROR): Delete macro.
(C_ERROR): Delete macro.
(B_ERROR_1): New macro.
(C_ERROR_1): New macro.
(C_ERROR_2): New macro.
(inline_matmul_assign): Use new macros.
(call_external_blas): Likewise.
2019-04-06 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/87352
* 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-06 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/89981
* resolve.c (resolve_global_procedure): If the global symbol is an
ENTRY, also look up its name among the entries.
2019-04-04 Harald Anlauf <anlauf@gmx.de>
PR fortran/89904
* check.c (gfc_check_transfer): Reject procedures as actual
arguments for SOURCE and MOLD of TRANSFER intrinsic.
2019-04-03 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/68567
* expr.c (gfc_reduce_init_expr): Add extra check to avoid
dereferencing a null pointer.
2019-04-03 Dominique d'Humieres <dominiq@gcc.gnu.org>
PR fortran/89375
* expr.c (comp_pointer): Remove redundant condition.
2019-03-31 Harald Anlauf <anlauf@gmx.de>
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-31 Thomas Koenig <tkoenig@gcc.gnu.org>
* dump-parse-tree.c (debug): Add for symbol_attribute *,
symbol_attribute and gfc_ref * arguments.
2019-03-30 Paul Thomas <pault@gcc.gnu.org>
PR fortran/89841
* trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Use the formal
argument attributes rather than those of the actual argument.
PR fortran/89842
* trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Call
'set_dtype_for_unallocated' for any type of arrayspec.
2019-03-27 Janus Weil <janus@gcc.gnu.org>
PR fortran/85537
* expr.c (gfc_check_assign_symbol): Reject internal and dummy procedures
in procedure pointer initialization.
2019-03-27 Paul Thomas <pault@gcc.gnu.org>
PR fortran/88247
* expr.c (is_subref_array): Permit substrings to be detected
as subref arrays.
* trans-array.c (get_array_ctor_var_strlen): Obtain the length
of deferred length strings. Handle substrings with a NULL end
expression.
(trans_array_constructor): Remove an unnecessary blank line.
(gfc_conv_scalarized_array_ref): Skip to label 'done' if 'decl'
is a pointer array.
(get_array_charlen): If the expression is an array, convert the
first element of the constructor and use its string length. Get
a new charlen if necessary.
(gfc_conv_expr_descriptor): Call 'get_array_charlen' for array
constructor expressions. If the ss_info string length is
available, use that to set the span of character arrays.
* trans-expr.c (gfc_get_expr_charlen): Handle substrings
* trans-stmt.c (trans_associate_var): Set the pointer array
flag for variable targets and constant array constructors. Take
care not to reset the string length or the span in the case of
expressions that are not converted as direct by reference.
2019-03-25 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* intrinsic.texi (MINLOC): Fix typo in BACK argument documentation.
(MAXLOC): Likewise.
2019-03-24 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/78865
* interface.c (compare_actual_formal): Change errors about
missing or extra to gfc_error_now to make sure they are issued.
Change "spec" to "specifier" in message.
* resolve.c (resolve_global_procedure): Also check for mismatching
interface with global symbols if the namespace has already been
resolved.
2019-03-21 Thomas Schwinge <thomas@codesourcery.com>
PR fortran/72741
* openmp.c (gfc_match_oacc_routine): Set the level of parallelism
for all variants.
(gfc_resolve_oacc_routines): Call gfc_add_omp_declare_target.
PR fortran/89773
* gfortran.h (gfc_oacc_routine_name): Add loc member.
(gfc_resolve_oacc_routines): Declare.
* openmp.c (gfc_match_oacc_routine): Move some error checking
into...
(gfc_resolve_oacc_routines): ... this new function.
* resolve.c (resolve_codes): Call it.
PR fortran/72741
* openmp.c (gfc_match_oacc_routine): Clarify.
PR fortran/72741
* module.c (verify_OACC_ROUTINE_LOP_NONE): New function.
(enum ab_attribute): Add AB_OACC_ROUTINE_LOP_GANG,
AB_OACC_ROUTINE_LOP_WORKER, AB_OACC_ROUTINE_LOP_VECTOR,
AB_OACC_ROUTINE_LOP_SEQ.
(attr_bits): Add these.
(mio_symbol_attribute): Handle these.
2019-03-20 Janus Weil <janus@gcc.gnu.org>
PR fortran/71861
* symbol.c (check_conflict): ABSTRACT attribute conflicts with
INTRINSIC attribute.
2019-03-18 Thomas Koenig <tkoeng@gcc.gnu.org>
PR fortran/68009
* iresolve.c: Include trans.h.
(gfc_resolve_fe_runtine_error): Set backend_decl on
resolved_sym.
2019-03-17 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/88008
* gfortran.h (expr_t): Add EXPR_UNKNOWN.
* expr.c (gfc_copy_expr): Add EXPR_UNKNOWN to switch statement.
(gfc_simplify_expr): Likewise.
* module.c (mio_expr): Likewise.
* resovle.c (extract_compcall_passed_object): Issue error on
unknown type.
(check_typebound_baseobject): Issue error on wrong type.
* trans-expr.c (gfc_apply_interface_mapping_to_expr): Add
EXPR_UNKNOWN to switch statement.
2019-03-16 Jakub Jelinek <jakub@redhat.com>
PR fortran/89724
* scanner.c (load_line): Remove linenum and current_line static
variables, add warned_tabs automatic variable. Use current_file->line
instead of current_line and warned_tabs boolean to avoid diagnosing
tabs multiple times on the same line.
2019-03-16 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/84394
* 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-15 Harald Anlauf <anlauf@gmx.de>
PR fortran/60091
* expr.c (gfc_check_pointer_assign): Correct and improve error
messages for invalid pointer assignments.
2019-03-14 Thomas Koenig <tkoenig@gcc.gnu.org>
* gfortran.texi: Document Q edit descriptor under
"Extensions not implemented in GNU Fortran".
2019-03-13 Harald Anlauf <anlauf@gmx.de>
PR fortran/87045
* trans-expr.c (gfc_trans_pointer_assignment): Move check for same
string length so that we do not get false errors for deferred
length.
2019-03-13 Janus Weil <janus@gcc.gnu.org>
PR fortran/89601
* decl.c (gfc_match_formal_arglist): Reject empty type parameter lists.
(gfc_match_derived_decl): Mark as PDT only if type parameter list was
matched successfully.
2019-03-13 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/66695
PR fortran/77746
PR fortran/79485
* 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
gfc_get_symbol.
* 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-12 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/87673
* match.c (gfc_match_type_spec): Remove call to
gfc_resolve_expr for character length.
2019-03-12 Martin Liska <mliska@suse.cz>
* decl.c (add_init_expr_to_sym): Replace usage of 'can't'
with 'cannot'.
(variable_decl): Likewise.
(cray_pointer_decl): Likewise.
(match_binding_attributes): Likewise.
* f95-lang.c (gfc_init): Likewise.
* interface.c (gfc_check_typebound_override): Likewise.
* intrinsic.c (make_generic): Likewise.
* module.c (dump_module): Likewise.
(gfc_use_module): Likewise.
* primary.c (gfc_convert_to_structure_constructor): Likewise.
* resolve.c (resolve_entries): Likewise.
(check_generic_tbp_ambiguity): Likewise.
(get_checked_tb_operator_target): Likewise.
* scanner.c (load_file): Likewise.
* trans-expr.c (gfc_conv_intrinsic_to_class): Likewise.
2019-03-12 Paul Thomas <pault@gcc.gnu.org>
PR fortran/89363
PR fortran/89364
* trans-expr.c (set_dtype_for_unallocated): New function.
(gfc_conv_gfc_desc_to_cfi_desc): Call it for allocatable and
pointer arguments.
(gfc_conv_procedure_call): Likewise. Also, set the ubound of
the final dimension to -1 for assumed rank formal args that are
associated with assumed size arrays.
* trans-intrinsic.c (gfc_conv_intrinsic_bound): Return -1 for
the final dimension of assumed rank entities that are argument
associated with assumed size arrays.
(gfc_conv_intrinsic_shape): Likewise return -1 for the final
dimension of the shape intrinsic.
2019-03-11 Jakub Jelinek <jakub@redhat.com>
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-03-11 Martin Liska <mliska@suse.cz>
* decl.c (match_record_decl): Wrap an option name
in a string format message and fix GNU coding style.
(gfc_match_pointer): Likewise.
* expr.c (find_array_section): Likewise.
* intrinsic.c (gfc_is_intrinsic): Likewise.
* options.c (gfc_post_options): Likewise.
* primary.c (match_integer_constant): Likewise.
* trans-common.c (translate_common): Likewise.
2019-03-10 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/66089
* 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-10 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/87734
* symbol.c (gfc_add_procedure): Only throw an error if the
procedure has not been declared either PUBLIC or PRIVATE.
2019-03-09 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/71544
* trans-types.c (gfc_typenode_for_spec) Set ts->is_c_interop of
C_PTR and C_FUNPTR.
(create_fn_spec): Mark argument as escaping if ts->is_c_interop is set.
2019-03-09 Janus Weil <janus@gcc.gnu.org>
PR fortran/84504
* expr.c (gfc_check_assign_symbol): Deal with procedure pointers to
pointer-valued functions.
2019-03-09 Thomas König <tkoenig@gcc.gnu.org>
PR fortran/71203
* decl.c (add_init_expr_to_sym): Add shape if init has none. Add
asserts that it has to be an EXPR_ARRAY in this case.
2019-03-08 Jakub Jelinek <jakub@redhat.com>
PR other/80058
* arith.c (gfc_complex2complex): Avoid two spaces in the middle of
diagnostics.
* resolve.c (resolve_allocate_expr): Likewise.
2019-03-06 Harald Anlauf <anlauf@gmx.de>
PR fortran/71203
* expr.c (simplify_const_ref): Avoid null pointer dereference.
2019-03-03 Harald Anlauf <anlauf@gmx.de>
Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/77583
* symbol.c (check_conflict): Check for valid procedure name
passed to error reporting routine.
2019-03-03 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/72714
* resolve.c (resolve_allocate_expr): Add some tests for coarrays.
2019-03-02 Harald Anlauf <anlauf@gmx.de>
PR fortran/89516
* check.c (gfc_calculate_transfer_sizes): Correct checks for cases
where storage size of elements of MOLD is 0.
2019-02-28 Thomas Schwinge <thomas@codesourcery.com>
Cesar Philippidis <cesar@codesourcery.com>
PR fortran/72741
PR fortran/89433
* openmp.c (gfc_match_oacc_routine): Handle repeated use of the
Fortran OpenACC 'routine' directive.
PR fortran/72741
* gfortran.h (enum oacc_routine_lop): Add OACC_ROUTINE_LOP_ERROR.
* openmp.c (gfc_oacc_routine_lop, gfc_match_oacc_routine): Use it.
* trans-decl.c (add_attributes_to_decl): Likewise.
PR fortran/72741
PR fortran/89433
* openmp.c (gfc_match_oacc_routine): Accept intrinsic symbols.
2019-02-26 Harald Anlauf <anlauf@gmx.de>
PR fortran/89492
* check.c (gfc_calculate_transfer_sizes): Handle cases where
storage size of elements of MOLD is 0.
2019-02-26 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/89496
* trans-types.c (get_formal_from_actual_arglist): If
the actual arglist has no expression, the corresponding
formal arglist is an alternate return.
2019-02-26 Jakub Jelinek <jakub@redhat.com>
PR fortran/43210
* trans-array.c (gfc_conv_array_initializer): Use RANGE_EXPR instead
of duplicating the initializer possibly many times.
2019-02-24 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/89174
* trans-expr.c (gfc_find_and_cut_at_last_class_ref): Add is_mold
to arguments. If we are dealing with a MOLD, call
gfc_expr_to_initialize().
* trans-stmt.c (gfc_trans_allocate): For MOLD, pass is_mold=true
to gfc_find_and_cut_at_last_class_ref.
* trans.h (gfc_find_and_cut_at_last_class_ref): Add optional
argument is_mold with default false.
2019-02-24 Harald Anlauf <anlauf@gmx.de>
PR fortran/89266
PR fortran/88326
* target-memory.c (gfc_element_size): Return false if element size
cannot be determined; element size is returned separately.
(gfc_target_expr_size): Return false if expression size cannot be
determined; expression size is returned separately.
* target-memory.h: Adjust prototypes.
* check.c (gfc_calculate_transfer_sizes): Adjust references to
gfc_target_expr_size, gfc_element_size.
* arith.c (hollerith2representation): Likewise.
* class.c (find_intrinsic_vtab): Likewise.
* simplify.c (gfc_simplify_sizeof): Likewise.
2019-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/84387
* trans-io.c (transfer_expr): Do not return if there are no
components to the derived type or class.
2019-02-23 Paul Thomas <pault@gcc.gnu.org>
PR fortran/88117
* resolve.c (deferred_op_assign): Return if the lhs expression
has the pointer attribute.
* trans-expr.c (gfc_trans_assignment_1): Do not fix the string
length if the lhs expression has the pointer attribute.
2019-02-23 Paul Thomas <pault@gcc.gnu.org>
PR fortran/89385
PR fortran/89366
* decl.c (gfc_verify_c_interop_param): Restriction on string
length being one is lifted for F2018.
* trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): For scalar
characters with intent in, make a temporary and copy the result
of the expression evaluation into it.
(gfc_conv_procedure_call): Set a flag for character formal args
having a character length that is not unity. If the procedure
is bind C, call gfc_conv_gfc_desc_to_cfi_desc in this case.
Also, extend bind C calls to unconditionally convert both
pointers and allocatable expressions.
2019-02-23 David Malcolm <dmalcolm@redhat.com>
Jakub Jelinek <jakub@redhat.com>
PR middle-end/88074
* simplify.c (norm2_do_sqrt, gfc_simplify_norm2): Use
mpfr_number_p && !mpfr_zero_p instead of mpfr_regular_p.
(norm2_add_squared): Likewise. Use mp_exp_t rather than mpfr_exp_t.
2019-02-22 Harald Anlauf <anlauf@gmx.de>
PR fortran/83057
* io.c (gfc_match_open): Fix logic in checks of OPEN statement
when NEWUNIT= is specified.
2019-02-22 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/89431
* gfortran.texi: Fix documentation to match the implementation.
2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
Cesar Philippidis <cesar@codesourcery.com>
PR fortran/72741
* gfortran.h (oacc_routine_lop): New enum.
(symbol_attribute): Use it.
* openmp.c (gfc_oacc_routine_dims): Replace with...
(gfc_oacc_routine_lop): ... this new function.
(gfc_match_oacc_routine): Adjust.
* trans-decl.c (add_attributes_to_decl): Likewise.
2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
* openmp.c (gfc_match_oacc_declare): Revert earlier changes.
2019-02-21 Thomas Koenig <tkoenig@gcc.gnu.org>
* dump-parse-tree.c (debug): Implement for gfc_expr *,
gfc_typespec *, gfc_typespec and gfc_symbol *.
2019-02-21 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/86119
* class.c (gfc_get_len_component): Add argument k for kind.
If the kind of the resulting expression is not equal to k,
convert it.
* gfortran.h (gfc_len_component): Adjust prototype.
* simplify.c (gfc_simplify_len): Pass kind to
gfc_get_len_component.
2019-02-20 Martin Liska <mliska@suse.cz>
* gfortran.texi: Change singular to plural.
2019-02-20 Martin Liska <mliska@suse.cz>
* gfortran.texi: Document Fortran header directive.
2019-02-19 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/89384
* trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): If the dummy
argument is contiguous and the actual argument may not be,
use gfc_conv_subref_array_arg.
2019-02-19 Thomas Schwinge <thomas@codesourcery.com>
PR c/87924
* openmp.c (gfc_match_omp_clauses): Add representation of wait clause
without argument as 'wait (GOMP_ASYNC_NOVAL)'.
2019-02-18 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/87689
* 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-18 Martin Liska <mliska@suse.cz>
* decl.c (gfc_match_gcc_builtin): Add support for filtering
of builtin directive based on multilib ABI name.
2019-02-17 Harald Anlauf <anlauf@gmx.de>
PR fortran/88299
* resolve.c (resolve_common_blocks,resolve_common_vars): Move
check for obsolent COMMON feature in F2018 to better place.
2019-02-17 Harald Anlauf <anlauf@gmx.de>
PR fortran/89077
* decl.c (gfc_set_constant_character_len): Clear original string
representation after padding has been performed to target length.
2019-02-16 Jakub Jelinek <jakub@redhat.com>
PR middle-end/88074
* simplify.c (simplify_transformation_to_array): Run post_op
immediately after processing corresponding row, rather than at the
end.
(norm2_scale): New variable.
(add_squared): Rename to ...
(norm2_add_squared): ... this. Scale down operand and/or result
if needed.
(do_sqrt): Rename to ...
(norm2_do_sqrt): ... this. Handle the result == e case. Scale up
result and clear norm2_scale.
(gfc_simplify_norm2): Clear norm2_scale. Change add_squared to
norm2_add_squared and &do_sqrt to norm2_do_sqrt. Scale up result
and clear norm2_scale again.
2019-02-17 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/71066
* 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-14 Janne Blomqvist <jb@gcc.gnu.org>
PR fortran/81552
* gfortran.h (gfc_option_t): Make flag_init_integer_value a long.
* options.c (gfc_handle_option): Use strtol instead of atoi.
* invoke.texi: Document -finit-integer behavior in more detail.
2019-02-14 Harald Anlauf <anlauf@gmx.de>
PR fortran/88248
* symbol.c: Move check for labeled DO statement from
gfc_define_st_label to gfc_reference_st_label.
2019-02-14 Cesar Philippidis <cesar@codesourcery.com>
PR fortran/72715
* openmp.c (resolve_oacc_nested_loops): Error on do concurrent
loops.
2019-02-13 Martin Liska <mliska@suse.cz>
PR fortran/88649
* resolve.c (resolve_operator): Initialize 't' right
after function entry. Skip switch (e->value.op.op)
for -fdec operands that become function calls.
2019-02-10 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/71723
* 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
is_init_expr.
2019-02-09 Harald Anlauf <anlauf@gmx.de>
PR fortran/89077
* resolve.c (gfc_resolve_substring_charlen): Check substring
length for constantness prior to general calculation of length.
2019-02-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/89200
* trans-array.c (gfc_trans_create_temp_array): Set the 'span'
field for derived types.
2019-02-04 Harald Anlauf <anlauf@gmx.de>
PR fortran/89077
* decl.c (add_init_expr_to_sym): Copy length of string initializer
to declared symbol.
2019-02-04 Martin Liska <mliska@suse.cz>
PR fortran/89185
* resolve.c (resolve_ref): Remove breakout variable as
we need to prevent prev = &(*prev)->next to happen
with *prev == NULL.
2019-02-04 Martin Liska <mliska@suse.cz>
PR fortran/88912
* scanner.c (load_file): Report error for -fpre-include
file and do not ICE.
2019-02-02 Dominique d'Humieres <dominiq@gcc.gnu.org>
PR fortran/81344
* invoke.texi: Document the behavior of repeated -ffpe-trap
and -ffpe-summary.
2019-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/88298
* 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 Paul Thomas <pault@gcc.gnu.org>
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 Paul Thomas <pault@gcc.gnu.org>
PR fortran/88980
* trans-array.c (gfc_array_init_size): Add element_size to the
arguments.
(gfc_array_allocate): Remove the recalculation of the size of
the element and use element_size from the call to the above.
Unconditionally set the span field of the descriptor.
2019-02-02 Paul Thomas <pault@gcc.gnu.org>
PR fortran/88685
* expr.c (is_subref_array): Move the check for class pointer
dummy arrays to after the reference check. If we haven't seen
an array reference other than an element and a component is not
class or derived, return false.
2019-02-01 Jakub Jelinek <jakub@redhat.com>
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-31 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/88669
* resolve.c (resolve_component): If the reference is a BT_CLASS,
copy the contiguous attribute from the reference and use the
correct attributes.
2019-01-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/52564
* io.c (match_io): Add check for comma after '*' without subsequent
IO list.
2019-01-30 Dominique d'Humieres <dominiq@gcc.gnu.org>
PR fortran/52884
* invoke.texi: Document the promotion of double precision
constants.
2019-01-29 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/57048
* 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-26 Harald Anlauf <anlauf@gmx.de>
PR fortran/57553
* expr.c (check_inquiry): Add list of inquiry functions allowed in
constant expressions for F2008+.
2019-01-25 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85780
* decl.c (gfc_match_subroutine): Check for conflict between BIND(C)
and alternative return.
2019-01-24 Paul Thomas <pault@gcc.gnu.org>
PR fortran/88929
* trans-array.c (gfc_conv_descriptor_elem_len): New function.
* trans-array.h : Add prototype for above.
* trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Take account of
assumed rank arrays being flagged by rank = -1 in expressions.
Intent in arrays need a pointer to a copy of the data to be
assigned to the descriptor passed for conversion. This should
then be freed, together with the CFI descriptor on return from
the C call.
2019-01-22 Harald Anlauf <anlauf@gmx.de>
PR fortran/88579
* trans-expr.c (gfc_conv_power_op): Handle cases of (2**e) ** integer
and (- 2**e) ** integer.
2019-01-19 Dominique d'Humieres <dominiq@gcc.gnu.org>
PR fortran/37835
* resolve.c (resolve_types): Add !flag_automatic.
* symbol.c (gfc_add_save): Silence warnings.
2019-01-19 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/77960
* io.c (match_io_element): input-item cannot be an external function.
2018-01-19 Thomas Koenig <tkoenig@gcc.gnu.org>
Paul Thomas <pault@gcc.gnu.org>
PR fortran/56789
* trans-expr.c (gfc_conv_procedure_call): Call
gfc_conv_subref_array_arg if the formal arg is contiguous
and the actual arg may not be.
2019-01-17 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/88871
* resolve.c (resolve_ref): Fix logic for removal of
reference.
2019-01-19 Jakub Jelinek <jakub@redhat.com>
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.
2019-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/43136
* resolve.c (resolve_array_ref): Add equal_length argument; set it
if the length of the substring equals that of the orignal
variable.
(resolve_ref): Remove the substring if it is equal in length to
the original variable, unless it is an EXPR_SUBSTRING).
2019-01-15 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/81849
* resolve.c (resolve_symbol): Host associated varaibles can appear
in the specification statement of a RESULT array.
2019-01-15 Paul Thomas <pault@gcc.gnu.org>
* trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Deal with exprs
that are indirect references; ie. dummy arguments.
2019-01-13 Dominique d'Humieres <dominiq@gcc.gnu.org>
PR fortran/88803
* gfortran.texi: Replace @xref with @ref and adjust the sentence.
2019-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/57992
* trans-array.c (gfc_conv_array_parameter): Do not pack/unpack
functions with contiguous results.
2019-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/59345
* trans-array.c (gfc_conv_array_parameter): Remove TODO. Do not
pack/unpack results of functions which return an explicit-shaped
or allocatable array.
2019-01-12 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/61765
* resolve.c (gfc_verify_binding_labels): Break if-elseif-elseif
structure into independent if's with a return to simplify logic.
Avoid a check for ENTRY name with bind(c).
2019-01-12 Paul Thomas <pault@gcc.gnu.org>
* gfortran.texi: Add description in sections on TS 29113 and
further interoperability with C.
* trans-array.c (gfc_conv_descriptor_attribute): New function.
(gfc_get_dataptr_offset): Remove static function attribute.
* trans-array.h: Add prototypes for above functions.
* trans-decl.c: Add declarations for the library functions
cfi_desc_to_gfc_desc and gfc_desc_to_cfi_desc.
* trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): New function.
(gfc_conv_procedure_call): Call it for scalar and array actual
arguments, when the formal arguments are bind_c with assumed
shape or assumed rank.
* trans.h: External declarations for gfor_fndecl_cfi_to_gfc
and gfor_fndecl_gfc_to_cfi.
2019-01-11 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/35031
* decl.c (gfc_match_entry): Check for F2018:C1546. Fix nearby
mis-indentation.
2019-01-11 Jakub Jelinek <jakub@redhat.com>
PR middle-end/85956
PR lto/88733
* trans-openmp.c: Include attribs.h.
(gfc_walk_alloc_comps, gfc_omp_clause_linear_ctor): Handle
VAR_DECL max bound with "omp dummy var" attribute like NULL or
error_mark_node - recompute number of elts independently.
2019-01-11 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/59345
* trans-array.c (gfc_conv_parameter_array): Temporary
arrays generated for expressions do not need to be repacked.
2019-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/86322
* decl.c (top_var_list): Set locus of expr.
(gfc_match_data): Detect pointer on non-rightmost part-refs.
2019-01-09 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/88376
* resolve.c (is_illegal_recursion): Remove an assert().
2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
PR other/16615
* expr.c: Change "can not" to "cannot".
2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
PR other/16615
* class.c: Mechanically replace "can not" with "cannot".
* decl.c: Likewise.
* expr.c: Likewise.
* gfc-internals.texi: Likewise.
* intrinsic.texi: Likewise.
* invoke.texi: Likewise.
* io.c: Likewise.
* match.c: Likewise.
* parse.c: Likewise.
* primary.c: Likewise.
* resolve.c: Likewise.
* symbol.c: Likewise.
* trans-array.c: Likewise.
* trans-decl.c: Likewise.
* trans-intrinsic.c: Likewise.
* trans-stmt.c: Likewise.
2019-01-09 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/68426
* simplify.c (gfc_simplify_spread): Also simplify if the
type of source is an EXPR_STRUCTURE.
2019-01-08 Janus Weil <janus@gcc.gnu.org>
PR fortran/88047
* class.c (gfc_find_vtab): For polymorphic typespecs, the components of
the class container may not be available (in case of invalid code).
2019-01-08 Richard Biener <rguenther@suse.de>
PR fortran/88611
* trans-expr.c (gfc_conv_initializer): For ISOCBINDING_NULL_*
directly build the expected GENERIC tree.
2019-01-07 Thomas Koenig <tkoenig@gcc.gnu.org>
Harald Anlauf <anlauf@gmx.de>
Tobias Burnus <burnus@gcc.gnu.org>
PR fortran/45424
* check.c (gfc_check_is_contiguous): New function.
* expr.c (gfc_is_not_contiguous): New function.
* gfortran.h (gfc_isym_id): Add GFC_ISYM_IS_CONTIGUOUS.
Add prototype for gfc_is_not_contiguous.
* intrinsic.c (do_ts29113_check): Add GFC_ISYM_IS_CONTIGUOUS.
(add_function): Add is_contiguous.
* intrinsic.h: Add prototypes for gfc_check_is_contiguous,
gfc_simplify_is_contiguous and gfc_resolve_is_contiguous.
* intrinsic.texi: Add IS_CONTIGUOUS.
* iresolve.c (gfc_resolve_is_contiguous): New function.
* simplify.c (gfc_simplify_is_contiguous): New function.
* trans-decl.c (gfor_fncecl_is_contiguous0): New variable.
(gfc_build_intrinsic_function_decl): Add it.
* trans-intrinsic.c (gfc_conv_intrinsic_is_contiguous): New
function.
(gfc_conv_intrinsic_function): Handle GFC_ISYM_IS_CONTIGUOUS.
2019-01-06 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/88658
* gfortran.h: Add macro gfc_real_4_kind
* simplify.c (simplify_min_max): Special case for the types of
AMAX0, AMIN0, MAX1 and MIN1, which actually change the types of
their arguments.
2019-01-05 Janus Weil <janus@gcc.gnu.org>
PR fortran/88009
* class.c (gfc_find_derived_vtab): Mark the _final component as
artificial.
(find_intrinsic_vtab): Ditto. Also add an extra check to avoid
dereferencing a null pointer and adjust indentation.
* resolve.c (resolve_fl_variable): Add extra check to avoid
dereferencing a null pointer. Move variable declarations to local scope.
(resolve_fl_procedure): Add extra check to avoid dereferencing a null
pointer.
* symbol.c (check_conflict): Suppress errors for artificial symbols.
2019-01-01 Steven G. Kargl <kargl@gcc.gnu.org>
* parse.c (decode_statement): Suppress "Unclassifiable statement"
error if previous error messages were emittes.
2019-01-01 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/82743
* primary.c (gfc_convert_to_structure_constructor): If a character
in a constructor is too long, add a warning with
-Wcharacter-truncation.
2019-01-01 Jakub Jelinek <jakub@redhat.com>
Update copyright years.
* gfortranspec.c (lang_specific_driver): Update copyright notice
dates.
* gfc-internals.texi: Bump @copying's copyright year.
* gfortran.texi: Ditto.
* intrinsic.texi: Ditto.
* invoke.texi: Ditto.
Copyright (C) 2019 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.