From 22d07ec27814fd83ef9a06c6d69e1095839c9fce Mon Sep 17 00:00:00 2001 From: Paul Thomas Date: Fri, 15 Sep 2017 07:26:14 +0000 Subject: [PATCH] re PR fortran/82184 (187.facerec in SPEC CPU 2000 miscompares) 2017-09-15 Paul Thomas 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 PR fortran/82184 * gfortran.dg/pointer_array_9.f90: New test. From-SVN: r252781 --- gcc/fortran/ChangeLog | 6 +++++ gcc/fortran/trans-decl.c | 1 + gcc/testsuite/ChangeLog | 5 ++++ gcc/testsuite/gfortran.dg/pointer_array_9.f90 | 23 +++++++++++++++++++ 4 files changed, 35 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/pointer_array_9.f90 diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 885fd06ef44..8bdd6357af1 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2017-09-15 Paul Thomas + + 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 PR fortran/82173 diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index 830c53ac384..d227d519c63 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 b6d0009b29c..d98cdbf33cb 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-09-15 Paul Thomas + + PR fortran/82184 + * gfortran.dg/pointer_array_9.f90: New test. + 2017-09-14 Michael Meissner * 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 00000000000..a54a2b54f21 --- /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