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/] [impure_actual_1.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 }
! Tests the fix for PR25056 in which a non-PURE procedure could be
! Tests the fix for PR25056 in which a non-PURE procedure could be
! passed as the actual argument to a PURE procedure.
! passed as the actual argument to a PURE procedure.
!
!
! Contributed by Joost VandeVondele  
! Contributed by Joost VandeVondele  
!
!
MODULE M1
MODULE M1
CONTAINS
CONTAINS
 FUNCTION L()
 FUNCTION L()
  L=1
  L=1
 END FUNCTION L
 END FUNCTION L
 PURE FUNCTION J(K)
 PURE FUNCTION J(K)
   INTERFACE
   INTERFACE
     PURE FUNCTION K()
     PURE FUNCTION K()
     END FUNCTION K
     END FUNCTION K
   END INTERFACE
   END INTERFACE
   J=K()
   J=K()
 END FUNCTION J
 END FUNCTION J
END MODULE M1
END MODULE M1
USE M1
USE M1
 write(6,*) J(L) ! { dg-error "Expected a PURE procedure for argument" }
 write(6,*) J(L) ! { dg-error "Expected a PURE procedure for argument" }
END
END
! { dg-final { cleanup-modules "M1" } }
! { dg-final { cleanup-modules "M1" } }
 
 

powered by: WebSVN 2.1.0

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