OSDN Git Service

2011-09-26 Janus Weil <janus@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / nested_modules_5.f90
1 ! { dg-do compile }
2 ! { dg-options "-std=legacy" }
3 !
4 ! Test for supplementary fix to PR24409 - the name clash between the module
5 ! variable and the interface formal argument would cause an ICE.
6 !
7 ! Contributed by Paul Thomas  <pault@gcc.gnu.org>
8 !
9 module anything 
10   interface
11     function  lc(string )
12       character(len=*), intent(in)  :: string 
13       character(len=len(string ))    :: lc
14     end function lc
15   end interface
16   character(len=12) :: string
17 end module anything
18
19 module serial
20   use anything
21 end module serial
22
23   use serial
24   use anything
25   character*15  :: buffer  
26   buffer = lc ("Have a Nice DAY")
27   end
28
29 ! { dg-final { cleanup-modules "anything serial" } }