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

Subversion Repositories openrisc

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

Go to most recent revision | 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" } }

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.