[Bug fortran/102685] [12 Regression] ICE in output_constructor_regular_field, at varasm.c:5514 since r12-4278-g74ccca380cde5e79
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Oct 15 19:23:36 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102685
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Harald Anlauf <anlauf@gcc.gnu.org>:
https://gcc.gnu.org/g:1e819bd95ebeefc1dc469daa1855ce005cb77822
commit r12-4452-g1e819bd95ebeefc1dc469daa1855ce005cb77822
Author: Harald Anlauf <anlauf@gmx.de>
Date: Fri Oct 15 21:23:17 2021 +0200
Fortran: validate shape of arrays in constructors against declarations
gcc/fortran/ChangeLog:
PR fortran/102685
* decl.c (match_clist_expr): Set rank/shape of clist initializer
to match LHS.
* resolve.c (resolve_structure_cons): In a structure constructor,
compare shapes of array components against declared shape.
gcc/testsuite/ChangeLog:
PR fortran/102685
* gfortran.dg/derived_constructor_char_1.f90: Fix invalid code.
* gfortran.dg/pr70931.f90: Likewise.
* gfortran.dg/transfer_simplify_2.f90: Likewise.
* gfortran.dg/pr102685.f90: New test.
Co-authored-by: Tobias Burnus <tobias@codesourcery.com>
More information about the Gcc-bugs
mailing list