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_3.f90] - Blame information for rev 801

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! Tests the fix for the bug PR33233, in which the reference to 'x'
3
! in 'inner' wrongly host-associated with the variable 'x' rather
4
! than the function.
5
!
6
! Contributed by Tobias Burnus 
7
!
8
MODULE m
9
  REAL :: x(3) = (/ 1.5, 2.5, 3.5 /)
10
CONTAINS
11
  SUBROUTINE s
12
    if (x(2) .eq. 2.5) call abort ()
13
  CONTAINS
14
    FUNCTION x(n, m)
15
      integer, optional :: m
16
      if (present(m)) then
17
        x = REAL(n)**m
18
      else
19
        x = 0.0
20
      end if
21
    END FUNCTION
22
  END SUBROUTINE s
23
END MODULE m
24
  use m
25
  call s
26
end
27
! { dg-final { cleanup-modules "m" } }

powered by: WebSVN 2.1.0

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