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

Subversion Repositories openrisc_me

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
! { dg-do compile }
2
! Tests the fix for PR29464, in which the second USE of the generic
3
! interface caused an error.
4
!
5
! Contributed by Vivek Rao 
6
!
7
module foo_mod
8
  implicit none
9
  interface twice
10
     module procedure twice_real
11
  end interface twice
12
contains
13
  real function twice_real(x)
14
    real :: x
15
    twice_real = 2*x
16
  end function twice_real
17
end module foo_mod
18
 
19
  subroutine foobar ()
20
    use foo_mod, only: twice, twice
21
    print *, twice (99.0)
22
  end subroutine foobar
23
 
24
  program xfoo
25
  use foo_mod, only: two => twice, dbl => twice
26
  implicit none
27
  call foobar ()
28
  print *, two (2.3)
29
  print *, dbl (2.3)
30
end program xfoo
31
! { dg-final { cleanup-modules "foo_mod" } }
32
 

powered by: WebSVN 2.1.0

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