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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [sizeof_proc.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 47023: C_Sizeof: Rejects valid code
4
!
5
! Contributed by Janus Weil 
6
 
7
use iso_c_binding
8
procedure(real) :: proc
9
procedure(real), pointer :: pp
10
pp => sin
11
 
12
print *,sizeof(proc)    ! { dg-error "may not be a procedure" }
13
print *,sizeof(pp)      ! { dg-error "may not be a procedure" }
14
print *,sizeof(pp(0.))
15
print *,sizeof(sub)     ! { dg-error "may not be a procedure" }
16
print *,sizeof(func)    ! { dg-error "may not be a procedure" }
17
print *,sizeof(func())
18
 
19
contains
20
 
21
  subroutine sub
22
  end subroutine
23
 
24
  real function func()
25
    func = 0.
26
  end function
27
 
28
end

powered by: WebSVN 2.1.0

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