OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [module_proc_external_dummy.f90] - Diff between revs 149 and 154

Only display areas with differences | Details | Blame | View Log

Rev 149 Rev 154
! { dg-do compile }
! { dg-do compile }
! This tests the fix for PR24866 in which the reference to the external str, in
! This tests the fix for PR24866 in which the reference to the external str, in
! sub_module, would get mixed up with the module procedure, str, thus
! sub_module, would get mixed up with the module procedure, str, thus
! causing an ICE.  This is a completed version of the reporter's testcase; ie
! causing an ICE.  This is a completed version of the reporter's testcase; ie
! it adds a main program and working subroutines to allow a check for
! it adds a main program and working subroutines to allow a check for
! correct functioning.
! correct functioning.
!
!
! Contributed by Uttam Pawar  
! Contributed by Uttam Pawar  
!
!
   subroutine sub()
   subroutine sub()
     print *, "external sub"
     print *, "external sub"
   end subroutine sub
   end subroutine sub
module test_module
module test_module
 contains
 contains
   subroutine sub_module(str)
   subroutine sub_module(str)
     external :: str
     external :: str
     call str ()
     call str ()
   end subroutine sub_module
   end subroutine sub_module
   subroutine str()
   subroutine str()
     print *, "module str"
     print *, "module str"
   end subroutine str
   end subroutine str
end module test_module
end module test_module
   use test_module
   use test_module
   external sub
   external sub
   call sub_module (sub)
   call sub_module (sub)
   call sub_module (str)
   call sub_module (str)
end
end
! { dg-final { cleanup-modules "test_module" } }
! { dg-final { cleanup-modules "test_module" } }
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.