Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / gcc / testsuite / gfortran.dg / select_2.f90
blob6ece65840f03a06a64a87013890ea1e6ae587437
1 ! { dg-do run }
2 ! Simple test program to see if gfortran eliminates the 'case (3:2)'
3 ! statement. This is an unreachable CASE because the range is empty.
5 program select_3
6 integer i
7 do i = 1, 4
8 select case(i)
9 case (1)
10 if (i /= 1) call abort
11 case (3:2)
12 call abort
13 case (4)
14 if (i /= 4) call abort
15 case default
16 if (i /= 2 .and. i /= 3) call abort
17 end select
18 end do
19 end program select_3