aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr89344.f90
blob: 8749071bd25e1272bf95705dad086e4dc3e53f5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
! { dg-do compile }
program demo_setval
   call setval(value)
   write(*,*)'VALUE=',value
   contains
      subroutine setval(value)
         class(*),intent(in) :: value
         select type(value)
            type is (integer)
               value = 10     ! { dg-error "in variable definition context" }
            type is (real)
               value = 10.20  ! { dg-error "in variable definition context" }
         end select
      end subroutine setval
end program demo_setval