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] - Rev 694

Compare with Previous | Blame | View Log

! { dg-do compile }
!
! PR 47023: C_Sizeof: Rejects valid code
!
! Contributed by Janus Weil <janus@gcc.gnu.org>

use iso_c_binding
procedure(real) :: proc
procedure(real), pointer :: pp
pp => sin

print *,sizeof(proc)    ! { dg-error "may not be a procedure" }
print *,sizeof(pp)      ! { dg-error "may not be a procedure" }
print *,sizeof(pp(0.))
print *,sizeof(sub)     ! { dg-error "may not be a procedure" }
print *,sizeof(func)    ! { dg-error "may not be a procedure" }
print *,sizeof(func())

contains

  subroutine sub
  end subroutine

  real function func()
    func = 0.
  end function

end

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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