From: Steven G. Kargl Date: Sat, 3 Mar 2018 19:59:54 +0000 (+0000) Subject: re PR fortran/66128 (ICE for some intrinsics with zero sized array parameter) X-Git-Tag: upstream/12.2.0~33055 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=42ce31c577360ba74265e1347493028e3cb6175f;p=platform%2Fupstream%2Fgcc.git re PR fortran/66128 (ICE for some intrinsics with zero sized array parameter) 2018-03-03 Steven G. Kargl PR fortran/66128 * gfortran.dg/zero_sized_8.f90: Really commit new test. From-SVN: r258224 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1df6a18..45b72e5 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,7 +1,7 @@ 2018-03-03 Steven G. Kargl PR fortran/66128 - * gfortran.dg/zero_sized_8.f90: New test. + * gfortran.dg/zero_sized_8.f90: Really commit New test. 2018-03-03 Steven G. Kargl diff --git a/gcc/testsuite/gfortran.dg/zero_sized_8.f90 b/gcc/testsuite/gfortran.dg/zero_sized_8.f90 new file mode 100644 index 0000000..6faea88 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/zero_sized_8.f90 @@ -0,0 +1,50 @@ +! { dg-do run } +program p + complex, parameter :: a(0) = 0 + real, parameter :: x(0) = 0 + integer, parameter :: z(0) = 0 + if (any(z > 0) .neqv. .false.) stop 1 + if (all(z > 0) .neqv. .true.) stop 2 + if (count(z > 0) /= 0) stop 3 + if (kind(count(z > 0, kind=1)) /= 1) stop 4 + if (iall(z) /= not(int(0, kind(z)))) stop 5 + if (iany(z) /= 0) stop 6 + if (iparity(z) /= 0) stop 7 + if (maxval(z) /= -huge(0) - 1) stop 8 + if (maxval(x) /= -huge(x)) stop 9 + if (minval(z) /= huge(0)) stop 10 + if (minval(x) /= huge(x)) stop 11 + if (norm2(x) /= 0) stop 12 + if (real(product(a)) /= 1 .and. aimag(product(a)) /= 0) stop 13 + if (product(x) /= 1) stop 14 + if (product(z) /= 1) stop 15 + if (real(sum(a)) /= 0 .and. aimag(sum(a)) /= 0) stop 13 + if (sum(x) /= 0) stop 14 + if (sum(z) /= 0) stop 15 + call q +end + +subroutine q + complex, parameter :: a(0) = 0 + real, parameter :: x(3,4,0) = 0 + integer, parameter :: z(3,4,0) = 0 + if (any(z > 0) .neqv. .false.) stop 101 + if (all(z > 0) .neqv. .true.) stop 102 + if (count(z > 0) /= 0) stop 103 + if (kind(count(z > 0, kind=1)) /= 1) stop 104 + if (iall(z) /= not(int(0, kind(z)))) stop 105 + if (iany(z) /= 0) stop 106 + if (iparity(z) /= 0) stop 107 + if (maxval(z) /= -huge(0) - 1) stop 108 + if (maxval(x) /= -huge(x)) stop 109 + if (minval(z) /= huge(0)) stop 110 + if (minval(x) /= huge(x)) stop 111 + if (norm2(x) /= 0) stop 112 + if (real(product(a)) /= 1 .and. aimag(product(a)) /= 0) stop 113 + if (product(x) /= 1) stop 114 + if (product(z) /= 1) stop 115 + if (real(sum(a)) /= 0 .and. aimag(sum(a)) /= 0) stop 13 + if (sum(x) /= 0) stop 14 + if (sum(z) /= 0) stop 15 +end +! { dg-prune-output "symmetric range implied by Standard" }