2017-02-20 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / unlimited_polymorphic_14.f90
blob215b03f64ee7b43b8d0401fe44b20a734b2870c8
1 ! { dg-do run }
3 ! Uncovered in fixing PR fortran/58793
5 ! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
7 ! Barfed on the hollerith argument
9 program test
10 logical l
11 call up("abc", l)
12 if (l) call abort
13 call up(3habc, l) ! { dg-warning "Legacy Extension" }
14 if (.not. l) call abort
15 contains
16 subroutine up(x, l)
17 class(*) :: x
18 logical l
19 select type(x)
20 type is (character(*))
21 l = .false.
22 class default
23 l = .true.
24 end select
25 end subroutine
26 end program test