Debian Codegraph @

gcc/testsuite/gfortran.dg/pr93524.f90

raw
1 ! { dg-additional-sources pr93524.c }
2 ! { dg-do run }
3 !
4 ! Test the fix for PR93524. The main program is in pr93524.c.
5
6 subroutine my_fortran_sub_1 (A) bind(C)
7 real :: A(:, :, :)
8 if (any (lbound(A) /= 1)) stop 1
9 if (any (ubound(A) /= [21,6,8])) stop 2
10 if (.not. is_contiguous (A)) stop 3
11 end
12 subroutine my_fortran_sub_2 (A) bind(C)
13 real, ALLOCATABLE :: A(:, :, :)
14 if (any (lbound(A) /= [-10,0,3])) stop 1
15 if (any (ubound(A) /= [10,5,10])) stop 2
16 if (.not. is_contiguous (A)) stop 3
17 end subroutine my_fortran_sub_2