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] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
! { dg-do "run" }
2
! Check whether RESULT of ENTRY defaults to entry-name.
3
! PR fortran/30873
4
!
5
! Contributed by Joost VandeVondele 
6
!
7
MODULE M1
8
  CONTAINS
9
    FUNCTION F2(K)
10
      INTEGER :: F2,K
11
      F2=E1(K)
12
    END FUNCTION F2
13
 
14
    RECURSIVE FUNCTION F1(I)
15
      INTEGER :: F1,I,E1
16
      F1=F2(I)
17
      RETURN
18
     ENTRY E1(I)
19
      E1=-I
20
      RETURN
21
    END FUNCTION F1
22
END  MODULE M1
23
 
24
program main
25
  use m1
26
  if (E1(5) /= -5) call abort()
27
  if (F2(4) /= -4) call abort()
28
  if (F1(1) /= -1) call abort()
29
end program main
30
 
31
! { 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.