URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [elemental_subroutine_4.f90] - Rev 816
Compare with Previous | Blame | View Log
! { dg-do compile }! Test the fix for PR25099, in which conformance checking was not being! done for elemental subroutines and therefore for interface assignments.!! Contributed by Joost VandeVondele <jv244@cam.ac.uk>!module elem_assignimplicit nonetype mytypeinteger xend type mytypeinterface assignment(=)module procedure myassignend interface assignment(=)containselemental subroutine myassign(x,y)type(mytype), intent(out) :: xtype(mytype), intent(in) :: yx%x = y%xend subroutine myassignend module elem_assignuse elem_assigninteger :: I(2,2),J(2)type (mytype) :: w(2,2), x(4), y(5), z(4)! The original PRCALL S(I,J) ! { dg-error "Incompatible ranks in elemental subroutine" }! Check interface assignmentsx = w ! { dg-error "Incompatible ranks in elemental subroutine" }x = y ! { dg-error "different shape for elemental subroutine" }x = zCONTAINSELEMENTAL SUBROUTINE S(I,J)INTEGER, INTENT(IN) :: I,JEND SUBROUTINE SEND! { dg-final { cleanup-modules "elem_assign" } }
