RISC-V: Regenerate opt urls.
[official-gcc.git] / gcc / testsuite / gfortran.dg / bind_c_optional-1.f90
blob99409205b6f1466b8e25da96a50ff5bdea427674
1 ! { dg-do run }
3 ! PR fortran/92872
5 ! Contributed by G. Steinmetz
7 module m
8 contains
9 subroutine s(x) bind(c)
10 integer, allocatable, optional :: x(:)
11 x = [1, 2, 3]
12 end
13 end
15 use m
16 integer, allocatable :: y(:)
17 ! NOTE: starting at 0, otherwise it will fail due to PR 92189
18 allocate(y(0:2))
19 y = [9, 8, 7]
20 call s(y)
21 if (any (y /= [1, 2, 3])) stop 1
22 end