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

Subversion Repositories openrisc

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

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! Tests the fix for PR38765 in which the use associated symbol
3
! 'fun' was confused with the contained function in 'mod_b'
4
! because the real name was being used instead of the 'use'
5
! name..
6
!
7
! Contributed by Paul Thomas  
8
! from a report by Marco Restelli.
9
!
10
module mod_a
11
  implicit none
12
  public :: fun
13
  private
14
contains
15
  pure function fun(x) result(mu)
16
    real, intent(in) :: x(:,:)
17
    real :: mu(2,2,size(x,2))
18
    mu = 2.0
19
  end function fun
20
end module mod_a
21
 
22
module mod_b
23
  use mod_a, only: &
24
  a_fun => fun
25
  implicit none
26
  private
27
contains
28
  pure function fun(x) result(mu)
29
    real, intent(in) :: x(:,:)
30
    real :: mu(2,2,size(x,2))
31
    mu = a_fun(x)
32
  end function fun
33
end module mod_b
34
 
35
! { dg-final { cleanup-modules "mod_a mod_b" } }

powered by: WebSVN 2.1.0

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