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
This commit is contained in:
Paul Thomas 2017-09-15 07:26:14 +00:00
parent b6ab6ef81c
commit 22d07ec278
4 changed files with 35 additions and 0 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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