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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [generic_actual_arg.f90] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! Tests fix for PR20886 in which the passing of a generic procedure as
3
! an actual argument was not detected.
4
!
5
! The second module and the check that CALCULATION2 is a good actual
6
! argument was added following the fix for PR26374.
7
!
8
! Contributed by Joost VandeVondele  
9
!
10
MODULE TEST
11
INTERFACE CALCULATION
12
  MODULE PROCEDURE C1, C2
13
END INTERFACE
14
CONTAINS
15
SUBROUTINE C1(r)
16
 INTEGER :: r
17
END SUBROUTINE
18
SUBROUTINE C2(r)
19
 REAL :: r
20
END SUBROUTINE
21
END MODULE TEST
22
 
23
MODULE TEST2
24
INTERFACE CALCULATION2
25
  MODULE PROCEDURE CALCULATION2, C3
26
END INTERFACE
27
CONTAINS
28
SUBROUTINE CALCULATION2(r)
29
 INTEGER :: r
30
END SUBROUTINE
31
SUBROUTINE C3(r)
32
 REAL :: r
33
END SUBROUTINE
34
END MODULE TEST2
35
 
36
USE TEST
37
USE TEST2
38
CALL F(CALCULATION)  ! { dg-error "GENERIC procedure" }
39
 
40
CALL F(CALCULATION2) ! OK because there is a same name specific, but: ! { dg-error "More actual than formal arguments" }
41
END
42
 
43
SUBROUTINE F()
44
END SUBROUTINE
45
! { dg-final { cleanup-modules "test test2" } }

powered by: WebSVN 2.1.0

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