aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/primary.c
diff options
context:
space:
mode:
authorThomas Koenig <tkoenig@gcc.gnu.org>2018-03-27 17:28:35 +0000
committerThomas Koenig <tkoenig@gcc.gnu.org>2018-03-27 17:28:35 +0000
commit13a7688fb902adb314679a2ffe64d80186632224 (patch)
treea049c882fae34daa94adcf65ee9555e470d33f69 /gcc/fortran/primary.c
parentd555040fc4c7e7b023c23e5c0f4889936a154ca9 (diff)
downloadgcc-13a7688fb902adb314679a2ffe64d80186632224.zip
gcc-13a7688fb902adb314679a2ffe64d80186632224.tar.gz
gcc-13a7688fb902adb314679a2ffe64d80186632224.tar.bz2
re PR fortran/85083 (ICE in gfc_convert_to_structure_constructor, at fortran/primary.c:2915)
2018-03-27 Thomas Koenig <tkoenig@gcc.gnu.org> Harald Anlauf <anlauf@gmx.de> PR fortran/85083 * primary.c (gfc_convert_to_structure_constructor): Check conformance of argument types in structure constructor. 2018-03-27 Thomas Koenig <tkoenig@gcc.gnu.org> Harald Anlauf <anlauf@gmx.de> * gfortran.dg/structure_constructor_15.f90: New test. Co-Authored-By: Harald Anlauf <anlauf@gmx.de> From-SVN: r258899
Diffstat (limited to 'gcc/fortran/primary.c')
-rw-r--r--gcc/fortran/primary.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c
index 702010a..094f210 100644
--- a/gcc/fortran/primary.c
+++ b/gcc/fortran/primary.c
@@ -2898,6 +2898,7 @@ gfc_convert_to_structure_constructor (gfc_expr *e, gfc_symbol *sym, gfc_expr **c
if (this_comp->ts.type == BT_CHARACTER && !this_comp->attr.allocatable
&& this_comp->ts.u.cl && this_comp->ts.u.cl->length
&& this_comp->ts.u.cl->length->expr_type == EXPR_CONSTANT
+ && actual->expr->ts.type == BT_CHARACTER
&& actual->expr->expr_type == EXPR_CONSTANT)
{
ptrdiff_t c, e;