summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr62135.f90
blob: d5e674b2b814e8e500602ac333e4b16c8011404c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
! { dg-do compile }
! { dg-options -Wsurprising }

   PROGRAM PR62135
      IMPLICIT NONE
      CHARACTER*1 :: choice
      choice = 'x'
      SELECT CASE (choice)
         ! This triggered an ICE: an unreachable case clause
         ! as the last of a list.
         CASE ('2':'7','9':'0') ! { dg-warning "can never be matched" }
            WRITE(*,*) "barf"
         CASE DEFAULT
            CONTINUE
      END SELECT
   END PROGRAM PR62135