diff options
author | Steven G. Kargl <kargl@gcc.gnu.org> | 2018-06-13 19:37:50 +0000 |
---|---|---|
committer | Steven G. Kargl <kargl@gcc.gnu.org> | 2018-06-13 19:37:50 +0000 |
commit | 010b9a3ec010d3cf5c76ba98e9a6438ad5bf7a76 (patch) | |
tree | 08e2c886a4310e1d07af582d4702c9e39e01184a /gcc/fortran/array.c | |
parent | de001ec7773be17f0fc44e3d7a6e64b8fee40581 (diff) | |
download | gcc-010b9a3ec010d3cf5c76ba98e9a6438ad5bf7a76.zip gcc-010b9a3ec010d3cf5c76ba98e9a6438ad5bf7a76.tar.gz gcc-010b9a3ec010d3cf5c76ba98e9a6438ad5bf7a76.tar.bz2 |
re PR fortran/86110 (ICE in gfc_resolve_character_array_constructor, at fortran/array.c:2044)
2018-06-13 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/86110
* array.c (gfc_resolve_character_array_constructor): Avoid NULL
pointer dereference.
2018-06-13 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/86110
* gfortran.dg/pr86110.f90: New test.
From-SVN: r261561
Diffstat (limited to 'gcc/fortran/array.c')
-rw-r--r-- | gcc/fortran/array.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/fortran/array.c b/gcc/fortran/array.c index 031ab76..e4926d7 100644 --- a/gcc/fortran/array.c +++ b/gcc/fortran/array.c @@ -2040,7 +2040,9 @@ got_charlen: gfc_ref *ref; for (ref = p->expr->ref; ref; ref = ref->next) if (ref->type == REF_SUBSTRING + && ref->u.ss.start && ref->u.ss.start->expr_type == EXPR_CONSTANT + && ref->u.ss.end && ref->u.ss.end->expr_type == EXPR_CONSTANT) break; |