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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [test_only_clause.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-additional-sources only_clause_main.c }
3
module testOnlyClause
4
 
5
  contains
6
    subroutine testOnly(cIntPtr) bind(c, name="testOnly")
7
      use, intrinsic :: iso_c_binding, only: c_ptr, c_int, c_f_pointer
8
      implicit none
9
      type(c_ptr), value :: cIntPtr
10
      integer(c_int), pointer :: f90IntPtr
11
 
12
      call c_f_pointer(cIntPtr, f90IntPtr)
13
 
14
      ! f90IntPtr coming in has value of -11; this will make it -12
15
      f90IntPtr = f90IntPtr - 1
16
      if(f90IntPtr .ne. -12) then
17
         call abort()
18
      endif
19
    end subroutine testOnly
20
end module testOnlyClause
21
 
22
! { dg-final { cleanup-modules "testonlyclause" } }

powered by: WebSVN 2.1.0

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