2010-11-30 Tobias Burnus <burnus@net-b.de>
[official-gcc.git] / gcc / testsuite / gfortran.dg / whole_file_13.f90
blob99e3ceecb7d3df430034ab67a475f00590c4f210
1 ! { dg-do run }
2 ! { dg-options "-fwhole-file -O3" }
3 ! Check that the TYPE_CANONICAL is being correctly set
4 ! for the derived types, when whole file compiling.
5 ! (based on import.f90)
7 subroutine test(x)
8 type myType3
9 sequence
10 integer :: i
11 end type myType3
12 type(myType3) :: x
13 if(x%i /= 7) call abort()
14 x%i = 1
15 end subroutine test
18 program foo
19 type myType3
20 sequence
21 integer :: i
22 end type myType3
24 type(myType3) :: z
25 z%i = 7
26 call test(z)
27 if(z%i /= 1) call abort
28 end program foo