diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2018-03-01 08:56:31 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2018-03-01 08:56:31 +0000 |
commit | b120c8b207d33f00b34fad9256740d6483839d2b (patch) | |
tree | db01cf2ce08c07b6688a46595701b58ab7d140b0 /gcc/fortran/class.c | |
parent | 2514222436ea242510fd6457c0d42e60af4d3535 (diff) | |
download | gcc-b120c8b207d33f00b34fad9256740d6483839d2b.zip gcc-b120c8b207d33f00b34fad9256740d6483839d2b.tar.gz gcc-b120c8b207d33f00b34fad9256740d6483839d2b.tar.bz2 |
re PR fortran/84538 (Array of derived type elements incorrectly accessed in function)
2018-03-01 Paul Thomas <pault@gcc.gnu.org>
PR fortran/84538
* class.c (class_array_ref_detected): Remove the condition that
there be no reference after the array reference.
(find_intrinsic_vtab): Remove excess whitespace.
* trans-array.c (gfc_conv_scalarized_array_ref): Rename 'tmp'
as 'base and call build_class_array_ref earlier.
2018-03-01 Paul Thomas <pault@gcc.gnu.org>
PR fortran/84538
* gfortran.dg/class_array_23.f03: New test.
From-SVN: r258097
Diffstat (limited to 'gcc/fortran/class.c')
-rw-r--r-- | gcc/fortran/class.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/fortran/class.c b/gcc/fortran/class.c index 50d25b5..2eae7f0 100644 --- a/gcc/fortran/class.c +++ b/gcc/fortran/class.c @@ -308,7 +308,6 @@ class_array_ref_detected (gfc_ref *ref, bool *full_array) *full_array = true; } else if (ref->next && ref->next->type == REF_ARRAY - && !ref->next->next && ref->type == REF_COMPONENT && ref->next->u.ar.type != AR_ELEMENT) { @@ -2630,7 +2629,7 @@ find_intrinsic_vtab (gfc_typespec *ts) { char tname[GFC_MAX_SYMBOL_LEN+1]; char *name; - + /* Encode all types as TYPENAME_KIND_ including especially character arrays, whose length is now consistently stored in the _len component of the class-variable. */ |