summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/widechar_select_2.f90
blob: 2eea9aed72d11acadb49fd7d91ade70fb78cc1f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
! { dg-do compile }

  character(kind=1,len=20) :: s1
  character(kind=4,len=20) :: s4

  select case (s1)
    case ("":4_"foo") ! { dg-error "must be of kind" }
      test = 1
    case (4_"gee") ! { dg-error "must be of kind" }
      test = 1
    case ("bar")
      test = 1
    case default
      test = 4
  end select

  select case (s4)
    case ("":4_"foo") ! { dg-error "must be of kind" }
      test = 1
    case (4_"gee")
      test = 1
    case ("bar") ! { dg-error "must be of kind" }
      test = 1
    case default
      test = 4
  end select

  select case (s4)
    case (4_"foo":4_"bar")
      test = 1
    case (4_"foo":4_"gee") ! { dg-error "overlaps with CASE label" }
      test = 1
    case (4_"foo") ! { dg-error "overlaps with CASE label" }
      test = 1
  end select

end