summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/select_5.f90
blob: 2e2997c9bc42005019a0c0031c639af7ad2630c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
! { dg-do run }
! Test mismatched type kinds in a select statement.
program select_5
  integer(kind=1) i          ! kind = 1, -128 <= i < 127
  do i = 1, 3
    select case (i)     
    case (1_4)         ! kind = 4, reachable
      if (i /=  1_4) call abort
    case (2_8)         ! kind = 8, reachable
      if (i /= 2_8) call abort
    case (200)         ! kind = 4, unreachable because of range of i
      call abort
    case default
      if (i /= 3) call abort
    end select
  end do
end program select_5