aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/select_2.f90
blob: 6ece65840f03a06a64a87013890ea1e6ae587437 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
! { dg-do run }
!  Simple test program to see if gfortran eliminates the 'case (3:2)'
!  statement.  This is an unreachable CASE because the range is empty.
!
program select_3
  integer i
  do i = 1, 4
     select case(i)
     case (1)
       if (i /= 1) call abort
     case (3:2)
       call abort
     case (4)
       if (i /= 4) call abort
     case default
       if (i /= 2 .and. i /= 3) call abort
     end select
  end do
end program select_3