diff options
Diffstat (limited to 'gcc/fortran/expr.cc')
| -rw-r--r-- | gcc/fortran/expr.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/fortran/expr.cc b/gcc/fortran/expr.cc index 00abd9e..054276e 100644 --- a/gcc/fortran/expr.cc +++ b/gcc/fortran/expr.cc @@ -6406,6 +6406,14 @@ gfc_is_simply_contiguous (gfc_expr *expr, bool strict, bool permit_element) || (sym->as && sym->as->type == AS_ASSUMED_SHAPE)))) return false; + /* An associate variable may point to a non-contiguous target. */ + if (ar && ar->type == AR_FULL + && sym->attr.associate_var && !sym->attr.contiguous + && sym->assoc + && sym->assoc->target) + return gfc_is_simply_contiguous (sym->assoc->target, strict, + permit_element); + if (!ar || ar->type == AR_FULL) return true; |
