summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr105152.f90
blob: 561b2a6c75d60012b6d7b660fd8c71e741622218 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
! { dg-do compile }
!
! Contributed by Gerhard Steinmetz  <gscfq@t-online.de>
!
program p
   use iso_c_binding
   type, bind(c) :: t
      integer(c_int) :: a
   end type
   interface
      function f(x) bind(c) result(z)
         import :: c_int, t
         type(t) :: x(:)
         integer(c_int) :: z
      end
   end interface
   class(*), allocatable :: y(:)
   n = f(y) ! { dg-error "either an unlimited polymorphic or assumed type" }
end