coarray_41.f90: Add "-latomic" option if libatomic_available.
[official-gcc.git] / gcc / testsuite / gfortran.dg / shape_8.f90
blob51c6e552b51afadc40e20cc989e552b593d990a0
1 ! { dg-do run }
3 ! Check that we can use SHAPE with optional kind argument
5 program test
6 implicit none
7 real, allocatable :: x(:,:)
9 allocate(x(2,5))
10 if (any(shape(x) /= [ 2, 5 ])) call abort
11 if (any(shape(x,kind=1) /= [ 2, 5 ])) call abort
12 if (any(shape(x,kind=2) /= [ 2, 5 ])) call abort
13 if (any(shape(x,kind=4) /= [ 2, 5 ])) call abort
14 if (any(shape(x,kind=8) /= [ 2, 5 ])) call abort
15 end