OSDN Git Service

707df9c49d243fa990dd82793285fb456f062d7a
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / implicit_actual.f90
1 ! { dg-do compile }
2 ! { dg-options "-O0" }
3 ! Tests patch for problem that was found whilst investigating
4 ! PR24158. The call to foo would cause an ICE because the
5 ! actual argument was of a type that was not defined.
6 !
7 ! Contributed by Paul Thomas <pault@gcc.gnu.org>
8 !
9 module global
10   type :: t2
11     type(t3), pointer :: d
12   end type t2
13 end module global
14
15 program snafu
16   use global
17   implicit type (t3) (z)
18
19   call foo (zin) ! { dg-error "defined|Type/rank" }
20
21 contains
22
23   subroutine foo (z)
24
25     type :: t3
26       integer :: i
27     end type t3
28
29     type(t3)  :: z
30     z%i = 1
31
32   end subroutine foo
33 end program snafu
34