diff options
author | Steven G. Kargl <kargl@gcc.gnu.org> | 2018-01-09 19:49:25 +0000 |
---|---|---|
committer | Steven G. Kargl <kargl@gcc.gnu.org> | 2018-01-09 19:49:25 +0000 |
commit | d4319ef830cfbbc12965bd1853cfde919bd842ab (patch) | |
tree | 83bcd4c2da434e1545d8d7014652e0c694801d2f /gcc/fortran/expr.c | |
parent | d2dfcf823c0ba2b654f8d25a9ec46f59612cb60c (diff) | |
download | gcc-d4319ef830cfbbc12965bd1853cfde919bd842ab.zip gcc-d4319ef830cfbbc12965bd1853cfde919bd842ab.tar.gz gcc-d4319ef830cfbbc12965bd1853cfde919bd842ab.tar.bz2 |
re PR fortran/83742 (ICE in gfc_is_simply_contiguous, at fortran/expr.c:5323)
2018-01-09 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/83742
* expr.c (gfc_is_simply_contiguous): Check for NULL pointer.
2018-01-09 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/83742
* gfortran.dg/contiguous_6.f90: New test.
From-SVN: r256391
Diffstat (limited to 'gcc/fortran/expr.c')
-rw-r--r-- | gcc/fortran/expr.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index 5be8da1..45ccc18 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -5313,14 +5313,14 @@ gfc_is_simply_contiguous (gfc_expr *expr, bool strict, bool permit_element) sym = expr->symtree->n.sym; if (expr->ts.type != BT_CLASS - && ((part_ref - && !part_ref->u.c.component->attr.contiguous - && part_ref->u.c.component->attr.pointer) - || (!part_ref - && !sym->attr.contiguous - && (sym->attr.pointer - || sym->as->type == AS_ASSUMED_RANK - || sym->as->type == AS_ASSUMED_SHAPE)))) + && ((part_ref + && !part_ref->u.c.component->attr.contiguous + && part_ref->u.c.component->attr.pointer) + || (!part_ref + && !sym->attr.contiguous + && (sym->attr.pointer + || (sym->as && sym->as->type == AS_ASSUMED_RANK) + || (sym->as && sym->as->type == AS_ASSUMED_SHAPE))))) return false; if (!ar || ar->type == AR_FULL) |