Debian Codegraph @

gcc/testsuite/gfortran.dg/pr105152.f90

raw
1 ! { dg-do compile }
2 !
3 ! Contributed by Gerhard Steinmetz <[email protected]>
4 !
5 program p
6 use iso_c_binding
7 type, bind(c) :: t
8 integer(c_int) :: a
9 end type
10 interface
11 function f(x) bind(c) result(z)
12 import :: c_int, t
13 type(t) :: x(:)
14 integer(c_int) :: z
15 end
16 end interface
17 class(*), allocatable :: y(:)
18 n = f(y) ! { dg-error "either an unlimited polymorphic or assumed type" }
19 end