Update concepts branch to revision 131834
[official-gcc.git] / gcc / testsuite / gfortran.dg / test_only_clause.f90
bloba02a75922bf4e0a03d52d3dc364df7ee5fe4c850
1 ! { dg-do run }
2 ! { dg-additional-sources only_clause_main.c }
3 module testOnlyClause
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
12 call c_f_pointer(cIntPtr, f90IntPtr)
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
22 ! { dg-final { cleanup-modules "testonlyclause" } }