OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gfortran.dg/] [pr32601.f03] - Diff between revs 302 and 384

Only display areas with differences | Details | Blame | View Log

Rev 302 Rev 384
! { dg-do compile }
! { dg-do compile }
! { dg-options "-std=f2003" }
! { dg-options "-std=f2003" }
! PR fortran/32601
! PR fortran/32601
module pr32601
module pr32601
use, intrinsic :: iso_c_binding, only: c_int
use, intrinsic :: iso_c_binding, only: c_int
contains
contains
  function get_ptr()
  function get_ptr()
    integer(c_int), pointer :: get_ptr
    integer(c_int), pointer :: get_ptr
    integer(c_int), target :: x
    integer(c_int), target :: x
    get_ptr = x
    get_ptr = x
  end function get_ptr
  end function get_ptr
end module pr32601
end module pr32601
USE ISO_C_BINDING, only: c_null_ptr, c_ptr, c_loc
USE ISO_C_BINDING, only: c_null_ptr, c_ptr, c_loc
use pr32601
use pr32601
implicit none
implicit none
type(c_ptr) :: t
type(c_ptr) :: t
t = c_null_ptr
t = c_null_ptr
! Next two lines should be errors if -pedantic or -std=f2003
! Next two lines should be errors if -pedantic or -std=f2003
print *, c_null_ptr, t  ! { dg-error "has PRIVATE components" }
print *, c_null_ptr, t  ! { dg-error "has PRIVATE components" }
print *, t ! { dg-error "has PRIVATE components" }
print *, t ! { dg-error "has PRIVATE components" }
print *, c_loc(get_ptr()) ! { dg-error "has PRIVATE components" }
print *, c_loc(get_ptr()) ! { dg-error "has PRIVATE components" }
end
end
! { dg-final { cleanup-modules "pr32601" } }
! { dg-final { cleanup-modules "pr32601" } }
 
 

powered by: WebSVN 2.1.0

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