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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [proc_ptr_33.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
!
3
! PR 41733: Proc-pointer conformance checks: Elemental-proc-ptr => non-elemental-procedure
4
!
5
! Contributed by James Van Buskirk
6
 
7
module funcs
8
   implicit none
9
   abstract interface
10
      real elemental function fun(x)
11
         real, intent(in) :: x
12
      end function
13
   end interface
14
contains
15
  function my_dcos(x)
16
    real, intent(in) :: x
17
    real :: my_dcos
18
    my_dcos = cos(x)
19
  end function
20
end module
21
 
22
program start
23
   use funcs
24
   implicit none
25
   procedure(fun), pointer :: f
26
   real x(3)
27
   x = [1,2,3]
28
   f => my_dcos     ! { dg-error "Mismatch in PURE attribute" }
29
   write(*,*) f(x)
30
end program start
31
 
32
! { dg-final { cleanup-modules "funcs" } }

powered by: WebSVN 2.1.0

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