nvptx, libgfortran: Switch out of "minimal" mode
[official-gcc.git] / gcc / testsuite / gfortran.dg / c_sizeof_8.f90
blob0ae284436d034a65ec1eb0f492b99ed6120c215f
1 ! { dg-do run }
3 ! PR fortran/103496
5 ! Test that C_SIZEOF returns the expected results
7 program pr103496
8 use iso_c_binding
9 implicit none
10 integer :: a(6)
11 integer, pointer :: p(:)
13 if (c_sizeof(a) /= 6*4) stop 1
14 if (c_sizeof(a(1)) /= 4) stop 2
15 if (c_sizeof(a(:)) /= 6*4) stop 3
16 if (c_sizeof(a(2::2)) /= 3*4) stop 4
18 allocate(p(5))
19 if (c_sizeof(p) /= 5*4) stop 5
20 if (c_sizeof(p(1)) /= 4) stop 6
21 if (c_sizeof(p(:)) /= 5*4) stop 7
22 if (c_sizeof(p(2::2)) /= 2*4) stop 8
23 end