OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [impure_assignment_1.f90] - Rev 827

Go to most recent revision | Compare with Previous | Blame | View Log

! { dg-do compile }
! Tests fix for PR25059, which gave and ICE after error message  
! Contributed by Joost VandeVondele  <jv244@cam.ac.uk>
MODULE M1
 TYPE T1
  INTEGER :: I
 END TYPE T1
 INTERFACE ASSIGNMENT(=)
   MODULE PROCEDURE S1
 END INTERFACE
CONTAINS
   SUBROUTINE S1(I,J)
     TYPE(T1), INTENT(OUT):: I
     TYPE(T1), INTENT(IN) :: J
     I%I=J%I**2
   END SUBROUTINE S1
END MODULE M1

USE M1
CONTAINS
PURE SUBROUTINE S2(I,J)
     TYPE(T1), INTENT(OUT):: I
     TYPE(T1), INTENT(IN) :: J
     I=J                      ! { dg-error "must be PURE" }
END SUBROUTINE S2
END

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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