aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorHarald Anlauf <anlauf@gmx.de>2019-02-04 20:44:22 +0000
committerHarald Anlauf <anlauf@gcc.gnu.org>2019-02-04 20:44:22 +0000
commitbc1efcb737bc372cc46db8a57430e623da222508 (patch)
treebae736aeae056322e22298629088e6c886dfd193 /gcc/fortran
parent0058a283e1bfe9130f04a0aef76b9ab863a6b22e (diff)
downloadgcc-bc1efcb737bc372cc46db8a57430e623da222508.zip
gcc-bc1efcb737bc372cc46db8a57430e623da222508.tar.gz
gcc-bc1efcb737bc372cc46db8a57430e623da222508.tar.bz2
re PR fortran/89077 (ICE using * as len specifier for character parameter)
2019-02-04 Harald Anlauf <anlauf@gmx.de> PR fortran/89077 * gfortran.dg/pr89077.f90: New test. 2019-02-04 Harald Anlauf <anlauf@gmx.de> PR fortran/89077 * gfortran.dg/pr89077.f90: New test. From-SVN: r268525
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/decl.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 1bd851a..0327865 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,9 @@
+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
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index e798381..4393287 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -1921,7 +1921,7 @@ add_init_expr_to_sym (const char *name, gfc_expr **initp, locus *var_locus)
}
else if (init->ts.u.cl && init->ts.u.cl->length)
sym->ts.u.cl->length =
- gfc_copy_expr (sym->value->ts.u.cl->length);
+ gfc_copy_expr (init->ts.u.cl->length);
}
}
/* Update initializer character length according symbol. */