diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2017-09-15 07:26:14 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2017-09-15 07:26:14 +0000 |
commit | 22d07ec27814fd83ef9a06c6d69e1095839c9fce (patch) | |
tree | b35a948f728e4b919d3c6d6417522b421d17b853 /gcc | |
parent | b6ab6ef81c11e2353f7ef7b771e4aca774f1be68 (diff) | |
download | gcc-22d07ec27814fd83ef9a06c6d69e1095839c9fce.zip gcc-22d07ec27814fd83ef9a06c6d69e1095839c9fce.tar.gz gcc-22d07ec27814fd83ef9a06c6d69e1095839c9fce.tar.bz2 |
re PR fortran/82184 (187.facerec in SPEC CPU 2000 miscompares)
2017-09-15 Paul Thomas <pault@gcc.gnu.org>
PR fortran/82184
trans-decl.c (gfc_trans_deferred_vars): Do not null the 'span'
field if the symbol is either implicitly or explicitly saved.
2017-09-15 Paul Thomas <pault@gcc.gnu.org>
PR fortran/82184
* gfortran.dg/pointer_array_9.f90: New test.
From-SVN: r252781
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/trans-decl.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/pointer_array_9.f90 | 23 |
4 files changed, 35 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 885fd06..8bdd635 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2017-09-15 Paul Thomas <pault@gcc.gnu.org> + + PR fortran/82184 + trans-decl.c (gfc_trans_deferred_vars): Do not null the 'span' + field if the symbol is either implicitly or explicitly saved. + 2017-09-13 Paul Thomas <pault@gcc.gnu.org> PR fortran/82173 diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index 830c53a..d227d51 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -4342,6 +4342,7 @@ gfc_trans_deferred_vars (gfc_symbol * proc_sym, gfc_wrapped_block * block) } if (sym->attr.pointer && sym->attr.dimension + && sym->attr.save == SAVE_NONE && !sym->attr.use_assoc && !sym->attr.host_assoc && !sym->attr.dummy diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b6d0009..d98cdbf 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-09-15 Paul Thomas <pault@gcc.gnu.org> + + PR fortran/82184 + * gfortran.dg/pointer_array_9.f90: New test. + 2017-09-14 Michael Meissner <meissner@linux.vnet.ibm.com> * gcc.target/powerpc/abs128-1.c: Use __builtin_fabsf128 instead of diff --git a/gcc/testsuite/gfortran.dg/pointer_array_9.f90 b/gcc/testsuite/gfortran.dg/pointer_array_9.f90 new file mode 100644 index 0000000..a54a2b5 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pointer_array_9.f90 @@ -0,0 +1,23 @@ +! { dg-do run } +! +! Tests fix for PR82184 +! +! Contributed by Andrey Guskov <andrey.y.guskov@intel.com) +! +program r187 + call s() + call s() +contains + subroutine s() + complex(4), allocatable, save :: a(:, :) + complex(4), pointer, save :: b(:, :) + if (.not. associated(b)) then + allocate(a(2, 2)) + allocate(b(2, 2)) + a = reshape ([cmplx(1, 1), cmplx(2, 2), cmplx(1, 2), cmplx(2, 1)], [2,2]) + else + b = transpose(a) + if (merge("PASSED", "FAILED", all (transpose (a) .eq. b)) .eq. "FAILED") call abort + end if + end subroutine s +end program r187 |