Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gfortran.dg/pointer_array_9.f90 @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children | 84e7813d76e9 |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 ! { dg-do run } | |
2 ! | |
3 ! Tests fix for PR82184 | |
4 ! | |
5 ! Contributed by Andrey Guskov <andrey.y.guskov@intel.com) | |
6 ! | |
7 program r187 | |
8 call s() | |
9 call s() | |
10 contains | |
11 subroutine s() | |
12 complex(4), allocatable, save :: a(:, :) | |
13 complex(4), pointer, save :: b(:, :) | |
14 if (.not. associated(b)) then | |
15 allocate(a(2, 2)) | |
16 allocate(b(2, 2)) | |
17 a = reshape ([cmplx(1, 1), cmplx(2, 2), cmplx(1, 2), cmplx(2, 1)], [2,2]) | |
18 else | |
19 b = transpose(a) | |
20 if (merge("PASSED", "FAILED", all (transpose (a) .eq. b)) .eq. "FAILED") call abort | |
21 end if | |
22 end subroutine s | |
23 end program r187 |