summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/bounds_check_1.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/bounds_check_1.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/bounds_check_1.f9012
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/bounds_check_1.f90 b/gcc/testsuite/gfortran.dg/bounds_check_1.f90
new file mode 100644
index 000000000..c05f4456a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/bounds_check_1.f90
@@ -0,0 +1,12 @@
+! { dg-do run }
+! { dg-options "-fbounds-check" }
+! PR fortran/27524
+ integer :: res(1)
+ res = F()
+ if (res(1) /= 1) call abort
+ contains
+ function F()
+ integer :: F(1)
+ f = 1
+ end function F
+ end