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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [c_loc_tests_14.f90] - 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
!
3
! PR fortran/38536
4
! Accept as argument to C_LOC a subcomponent accessed through a pointer.
5
 
6
  USE ISO_C_BINDING
7
 
8
  IMPLICIT NONE
9
  TYPE test3
10
          INTEGER, DIMENSION(5) :: b
11
  END TYPE test3
12
 
13
  TYPE test2
14
          TYPE(test3), DIMENSION(:), POINTER :: a
15
  END TYPE test2
16
 
17
  TYPE test
18
          TYPE(test2), DIMENSION(2) :: c
19
  END TYPE test
20
 
21
  TYPE(test) :: chrScalar
22
  TYPE(C_PTR) :: f_ptr
23
  TYPE(test3), TARGET :: d(3)
24
 
25
 
26
  chrScalar%c(1)%a => d
27
  f_ptr = C_LOC(chrScalar%c(1)%a(1)%b(1))
28
  end
29
 

powered by: WebSVN 2.1.0

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