2018-09-30 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / c_size_t_test.f03
blob7325b3df3895476f0c934b2ba9cff91ca91c3ac9
1 ! { dg-do run }
2 ! { dg-additional-sources c_size_t_driver.c }
3 module c_size_t_test
4   use, intrinsic :: iso_c_binding
6 contains
7   subroutine sub0(my_c_size) bind(c)
8     integer(c_int), value :: my_c_size ! value of C's sizeof(size_t)
10     ! if the value of c_size_t isn't equal to the value of C's sizeof(size_t) 
11     ! we call abort.
12     if(c_size_t .ne. my_c_size) then
13        STOP 1
14     end if
15   end subroutine sub0
16 end module c_size_t_test