111
|
1 ! { dg-do run }
|
|
2 !
|
|
3 ! Contributed by mrestelli@gmail.com
|
|
4 ! Adapated by Andre Vehreschild <vehre@gcc.gnu.org>
|
|
5 ! Test that fix for PR69296 is working.
|
|
6
|
|
7 program p
|
|
8 implicit none
|
|
9
|
|
10 integer :: j, a(2,6), i(3,2)
|
|
11
|
|
12 a(1,:) = (/ ( j , j=1,6) /)
|
|
13 a(2,:) = (/ ( -10*j , j=1,6) /)
|
|
14
|
|
15 i(:,1) = (/ 1 , 3 , 5 /)
|
|
16 i(:,2) = (/ 4 , 5 , 6 /)
|
|
17
|
|
18 associate( ai => a(:,i(:,1)) )
|
131
|
19 if (any(shape(ai) /= [2, 3])) STOP 1
|
|
20 if (any(reshape(ai, [6]) /= [1 , -10, 3, -30, 5, -50])) STOP 2
|
111
|
21 end associate
|
|
22
|
|
23 end program p
|