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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [dummy_procedure_2.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 compile }
2
! Checks the fix for the bug exposed in fixing PR25147
3
!
4
! Contributed by Tobias Schlueter  
5
!
6
module integrator
7
  interface
8
     function integrate(f,xmin,xmax)
9
       implicit none
10
       interface
11
          function f(x)
12
            real(8) :: f,x
13
            intent(in) :: x
14
          end function f
15
       end interface
16
       real(8) :: xmin, xmax, integrate
17
     end function integrate
18
  end interface
19
end module integrator
20
 
21
  use integrator
22
  call foo1 ()
23
  call foo2 ()
24
contains
25
  subroutine foo1 ()
26
    real(8) :: f                   ! This was not trapped: PR25147/25098
27
    print *,integrate (f,0d0,3d0) ! { dg-error "Expected a procedure" }
28
  end subroutine foo1
29
  subroutine foo2 ()
30
    real(8), external :: g ! This would give an error, incorrectly.
31
    print *,integrate (g,0d0,3d0)
32
  end subroutine foo2
33
end
34
! { dg-final { cleanup-modules "integrator" } }

powered by: WebSVN 2.1.0

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