coarray_41.f90: Add "-latomic" option if libatomic_available.
[official-gcc.git] / gcc / testsuite / gfortran.dg / implicit_actual.f90
blob108c04079676a0e28499dfc4b7c2b36dd6e31633
1 ! { dg-do compile }
2 ! Tests patch for problem that was found whilst investigating
3 ! PR24158. The call to foo would cause an ICE because the
4 ! actual argument was of a type that was not defined. The USE
5 ! GLOBAL was commented out, following the fix for PR29364.
7 ! Contributed by Paul Thomas <pault@gcc.gnu.org>
9 module global
10 type :: t2
11 type(t3), pointer :: d ! { dg-error "has not been declared" }
12 end type t2
13 end module global
15 program snafu
16 ! use global
17 implicit type (t3) (z)
19 call foo (zin) ! { dg-error "defined|Type mismatch" }
21 contains
23 subroutine foo (z)
25 type :: t3
26 integer :: i
27 end type t3
29 type(t3) :: z
30 z%i = 1
32 end subroutine foo
33 end program snafu