diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/pr93524.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/pr93524.f90 | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/pr93524.f90 b/gcc/testsuite/gfortran.dg/pr93524.f90 new file mode 100644 index 00000000000..0cebc8f24a8 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr93524.f90 @@ -0,0 +1,17 @@ +! { dg-additional-sources pr93524.c } +! { dg-do run } +! +! Test the fix for PR93524. The main program is in pr93524.c. + +subroutine my_fortran_sub_1 (A) bind(C) + real :: A(:, :, :) + if (any (lbound(A) /= 1)) stop 1 + if (any (ubound(A) /= [21,6,8])) stop 2 + if (.not. is_contiguous (A)) stop 3 +end +subroutine my_fortran_sub_2 (A) bind(C) + real, ALLOCATABLE :: A(:, :, :) + if (any (lbound(A) /= [-10,0,3])) stop 1 + if (any (ubound(A) /= [10,5,10])) stop 2 + if (.not. is_contiguous (A)) stop 3 +end subroutine my_fortran_sub_2 |