aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/unlimited_polymorphic_14.f90
blob: 215b03f64ee7b43b8d0401fe44b20a734b2870c8 (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
! { dg-do run }
!
! Uncovered in fixing PR fortran/58793
!
! Contributed by Tobias Burnus  <burnus@gcc.gnu.org>
!
! Barfed on the hollerith argument
!
program test
  logical l
  call up("abc", l)
  if (l) call abort
  call up(3habc, l) ! { dg-warning "Legacy Extension" }
  if (.not. l) call abort
contains
  subroutine up(x, l)
    class(*) :: x
    logical l
    select type(x)
     type is (character(*))
      l = .false.
     class default
      l = .true.
    end select
  end subroutine
end program test