URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [entry_9.f90] - Rev 694
Compare with Previous | Blame | View Log
! { dg-do run }
! Check whether RESULT of ENTRY defaults to entry-name.
! PR fortran/30873
!
! Contributed by Joost VandeVondele <jv244@cam.ac.uk>
!
MODULE M1
CONTAINS
FUNCTION F2(K)
INTEGER :: F2,K
F2=E1(K)
END FUNCTION F2
RECURSIVE FUNCTION F1(I)
INTEGER :: F1,I,E1
F1=F2(I)
RETURN
ENTRY E1(I)
E1=-I
RETURN
END FUNCTION F1
END MODULE M1
program main
use m1
if (E1(5) /= -5) call abort()
if (F2(4) /= -4) call abort()
if (F1(1) /= -1) call abort()
end program main
! { dg-final { cleanup-modules "m1" } }