annotate gcc/testsuite/gfortran.dg/associate_19.f03 @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 84e7813d76e9
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 ! Contributed by mrestelli@gmail.com
kono
parents:
diff changeset
4 ! Adapated by Andre Vehreschild <vehre@gcc.gnu.org>
kono
parents:
diff changeset
5 ! Test that fix for PR69296 is working.
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 program p
kono
parents:
diff changeset
8 implicit none
kono
parents:
diff changeset
9
kono
parents:
diff changeset
10 integer :: j, a(2,6), i(3,2)
kono
parents:
diff changeset
11
kono
parents:
diff changeset
12 a(1,:) = (/ ( j , j=1,6) /)
kono
parents:
diff changeset
13 a(2,:) = (/ ( -10*j , j=1,6) /)
kono
parents:
diff changeset
14
kono
parents:
diff changeset
15 i(:,1) = (/ 1 , 3 , 5 /)
kono
parents:
diff changeset
16 i(:,2) = (/ 4 , 5 , 6 /)
kono
parents:
diff changeset
17
kono
parents:
diff changeset
18 associate( ai => a(:,i(:,1)) )
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
19 if (any(shape(ai) /= [2, 3])) STOP 1
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
20 if (any(reshape(ai, [6]) /= [1 , -10, 3, -30, 5, -50])) STOP 2
111
kono
parents:
diff changeset
21 end associate
kono
parents:
diff changeset
22
kono
parents:
diff changeset
23 end program p