summaryrefslogtreecommitdiffstats
path: root/gcc/testsuite/gfortran.dg/all_bounds_1.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/all_bounds_1.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/all_bounds_1.f9017
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/all_bounds_1.f90 b/gcc/testsuite/gfortran.dg/all_bounds_1.f90
new file mode 100644
index 00000000000..d8cb07bf0c6
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/all_bounds_1.f90
@@ -0,0 +1,17 @@
+! { dg-do run }
+! { dg-options "-fbounds-check" }
+! { dg-shouldfail "Incorrect extent in return value of ALL intrinsic" }
+program main
+ logical(kind=4), allocatable :: f(:,:)
+ logical(kind=4) :: res(3)
+ character(len=80) line
+ allocate (f(2,2))
+ f = .false.
+ f(1,1) = .true.
+ f(2,1) = .true.
+ res = all(f,dim=1)
+ write(line,fmt='(80L1)') res
+end program main
+! { dg-output "Fortran runtime error: Incorrect extent in return value of ALL intrinsic in dimension 1: is 3, should be 2" }
+
+
OpenPOWER on IntegriCloud