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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gfortran.dg/] [host_assoc_function_6.f90] - Diff between revs 302 and 384

Only display areas with differences | Details | Blame | View Log

Rev 302 Rev 384
! { dg-do compile }
! { dg-do compile }
! Tests the fix for PR38765 in which the use associated symbol
! Tests the fix for PR38765 in which the use associated symbol
! 'fun' was confused with the contained function in 'mod_b'
! 'fun' was confused with the contained function in 'mod_b'
! because the real name was being used instead of the 'use'
! because the real name was being used instead of the 'use'
! name..
! name..
!
!
! Contributed by Paul Thomas  
! Contributed by Paul Thomas  
! from a report by Marco Restelli.
! from a report by Marco Restelli.
!
!
module mod_a
module mod_a
  implicit none
  implicit none
  public :: fun
  public :: fun
  private
  private
contains
contains
  pure function fun(x) result(mu)
  pure function fun(x) result(mu)
    real, intent(in) :: x(:,:)
    real, intent(in) :: x(:,:)
    real :: mu(2,2,size(x,2))
    real :: mu(2,2,size(x,2))
    mu = 2.0
    mu = 2.0
  end function fun
  end function fun
end module mod_a
end module mod_a
module mod_b
module mod_b
  use mod_a, only: &
  use mod_a, only: &
  a_fun => fun
  a_fun => fun
  implicit none
  implicit none
  private
  private
contains
contains
  pure function fun(x) result(mu)
  pure function fun(x) result(mu)
    real, intent(in) :: x(:,:)
    real, intent(in) :: x(:,:)
    real :: mu(2,2,size(x,2))
    real :: mu(2,2,size(x,2))
    mu = a_fun(x)
    mu = a_fun(x)
  end function fun
  end function fun
end module mod_b
end module mod_b
! { dg-final { cleanup-modules "mod_a mod_b" } }
! { 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.