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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [use_rename_3.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 the fix for PR35997, in which the use association of renamed
3
! valid2 and flag2 was treated as if the renaming were done on use
4
! association in the main program.  Thus, the following, direct use
5
! association of valid and flag did not occur.
6
!
7
! Contributed by Drew McCormack 
8
!
9
module funcinterfacemod
10
  interface
11
    logical function valid ()
12
    end function
13
  end interface
14
  logical :: flag = .true.
15
end module
16
 
17
module secondmod
18
  use funcinterfacemod, valid2 => valid, flag2 => flag
19
end module
20
 
21
logical function valid ()
22
  valid = .true.
23
end function
24
 
25
program main
26
  use secondmod
27
  use funcinterfacemod
28
  if (valid ()) then
29
    print *, 'Is Valid'
30
  endif
31
  if (flag) then
32
    print *, 'Is flag'
33
  endif
34
end program
35
! { dg-final { cleanup-modules "funcinterfacemod secondmod" } }

powered by: WebSVN 2.1.0

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