OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [interface_9.f90] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
! { dg-do compile }
2
! Test of the patch for PR30096, in which gfortran incorrectly.
3
! compared local with host associated interfaces.
4
!
5
! Based on contribution by Harald Anlauf 
6
!
7
module module1
8
  interface inverse
9
     module procedure A, B
10
  end interface
11
contains
12
  function A (X) result (Y)
13
    real                        :: X, Y
14
    Y = 1.0
15
  end function A
16
  function B (X) result (Y)
17
    integer                     :: X, Y
18
    Y = 3
19
  end function B
20
end module module1
21
 
22
module module2
23
  interface inverse
24
     module procedure C
25
  end interface
26
contains
27
  function C (X) result (Y)
28
    real                        :: X, Y
29
    Y = 2.0
30
  end function C
31
end module module2
32
 
33
program gfcbug48
34
  use module1, only : inverse
35
  call sub ()
36
  if (inverse(1.0_4) /= 1.0_4) call abort ()
37
  if (inverse(1_4) /= 3_4) call abort ()
38
contains
39
  subroutine sub ()
40
    use module2, only : inverse
41
    if (inverse(1.0_4) /= 2.0_4) call abort ()
42
    if (inverse(1_4) /= 3_4) call abort ()
43
  end subroutine sub
44
end program gfcbug48
45
 
46
! { dg-final { cleanup-modules "module1 module2" } }
47
 

powered by: WebSVN 2.1.0

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