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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [repack_arrays_1.f90] - Blame information for rev 774

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! { dg-options "-frepack-arrays" }
3
!
4
! Check that arrays marked with TARGET attribute are not repacked.
5
!
6
program test2
7
   use iso_c_binding
8
   implicit none
9
   real, target :: x(7)
10
   type(c_ptr) cp1, cp2
11
 
12
   x = 42
13
   if (.not. c_associated(c_loc(x(3)),point(x(::2)))) call abort
14
contains
15
  function point(x)
16
    use iso_c_binding
17
    real, intent(in), target :: x(:)
18
    type(c_ptr) point
19
    real, pointer :: p
20
 
21
    p => x(2)
22
    point = c_loc(p)
23
  end function point
24
end program test2

powered by: WebSVN 2.1.0

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