OSDN Git Service

* config/i386/i386.md (UNSPEC_VSIBADDR): New.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / pr42051.f03
1 ! { dg-do compile }
2 ! { dg-options "-fno-whole-file" }
3 !
4 ! PR fortran/42051
5 ! PR fortran/44064
6 ! Access to freed symbols
7 !
8 ! Testcase provided by Damian Rouson <damian@rouson.net>,
9 ! reduced by Janus Weil <janus@gcc.gnu.org>.
10
11 module grid_module
12   implicit none 
13   type grid
14   end type
15   type field
16     type(grid) :: mesh
17   end type
18 contains
19   real function return_x(this)
20     class(grid) :: this
21   end function
22 end module 
23
24 module field_module
25   use grid_module, only: field,return_x
26   implicit none 
27 contains
28   subroutine output(this)
29     class(field) :: this
30     print *,return_x(this%mesh)
31   end subroutine
32 end module
33
34 end
35
36 ! { dg-final { cleanup-modules "grid_module field_module" } }