annotate gcc/testsuite/gfortran.dg/pointer_array_9.f90 @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ! { dg-do run }
kono
parents:
diff changeset
2 !
kono
parents:
diff changeset
3 ! Tests fix for PR82184
kono
parents:
diff changeset
4 !
kono
parents:
diff changeset
5 ! Contributed by Andrey Guskov <andrey.y.guskov@intel.com)
kono
parents:
diff changeset
6 !
kono
parents:
diff changeset
7 program r187
kono
parents:
diff changeset
8 call s()
kono
parents:
diff changeset
9 call s()
kono
parents:
diff changeset
10 contains
kono
parents:
diff changeset
11 subroutine s()
kono
parents:
diff changeset
12 complex(4), allocatable, save :: a(:, :)
kono
parents:
diff changeset
13 complex(4), pointer, save :: b(:, :)
kono
parents:
diff changeset
14 if (.not. associated(b)) then
kono
parents:
diff changeset
15 allocate(a(2, 2))
kono
parents:
diff changeset
16 allocate(b(2, 2))
kono
parents:
diff changeset
17 a = reshape ([cmplx(1, 1), cmplx(2, 2), cmplx(1, 2), cmplx(2, 1)], [2,2])
kono
parents:
diff changeset
18 else
kono
parents:
diff changeset
19 b = transpose(a)
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
20 if (merge("PASSED", "FAILED", all (transpose (a) .eq. b)) .eq. "FAILED") STOP 1
111
kono
parents:
diff changeset
21 end if
kono
parents:
diff changeset
22 end subroutine s
kono
parents:
diff changeset
23 end program r187