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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [pr32601.f03] - Blame information for rev 708

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! { dg-options "-std=f2003" }
3
! PR fortran/32601
4
module pr32601
5
use, intrinsic :: iso_c_binding, only: c_int
6
contains
7
  function get_ptr()
8
    integer(c_int), pointer :: get_ptr
9
    integer(c_int), target :: x
10
    get_ptr = x
11
  end function get_ptr
12
end module pr32601
13
 
14
USE ISO_C_BINDING, only: c_null_ptr, c_ptr, c_loc
15
use pr32601
16
implicit none
17
 
18
type(c_ptr) :: t
19
t = c_null_ptr
20
 
21
! Next two lines should be errors if -pedantic or -std=f2003
22
print *, c_null_ptr, t  ! { dg-error "has PRIVATE components" }
23
print *, t ! { dg-error "has PRIVATE components" }
24
 
25
print *, c_loc(get_ptr()) ! { dg-error "has PRIVATE components" }
26
 
27
end
28
! { 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.