From: Thomas Koenig Date: Sun, 24 Sep 2017 13:51:39 +0000 (+0000) Subject: re PR fortran/54633 (ICEs and reject valid with MINLOC/MINVAL (MAXLOC/MAXVAL) due... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=24bafc562a240e91aac0af8390729a257bf57a08;p=gcc.git re PR fortran/54633 (ICEs and reject valid with MINLOC/MINVAL (MAXLOC/MAXVAL) due to lacking compile-time simplification) 2017-09-24 Thomas Koenig PR fortran/54633 * gfortran.dg/intrinsic_bounds_1.f90: New test. * gfortran.dg/intrinsic_param_1.f90: New test. From-SVN: r253125 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index bc23562b1b9..3502b3ac805 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2017-09-24 Thomas Koenig + + PR fortran/54633 + * gfortran.dg/intrinsic_bounds_1.f90: New test. + * gfortran.dg/intrinsic_param_1.f90: New test. + 2017-09-24 Thomas Koenig Steven G. Kargl diff --git a/gcc/testsuite/gfortran.dg/intrinsic_bounds_1.f90 b/gcc/testsuite/gfortran.dg/intrinsic_bounds_1.f90 new file mode 100644 index 00000000000..a9586fb1d12 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/intrinsic_bounds_1.f90 @@ -0,0 +1,7 @@ +! { dg-do compile } +! PR 54633 - this used to be rejected +program main + integer :: x(minval((/1/),mask=(/.TRUE./))) + integer, parameter :: m = minval((/1/)) + integer :: y(minval((/1/),mask=(/.TRUE./))) +end diff --git a/gcc/testsuite/gfortran.dg/intrinsic_param_1.f90 b/gcc/testsuite/gfortran.dg/intrinsic_param_1.f90 new file mode 100644 index 00000000000..7c168a71fe9 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/intrinsic_param_1.f90 @@ -0,0 +1,6 @@ +! { dg-do compile } +! { dg-additional-options "-std=f95" } +! PR 54633 - this used to be accepted +program main + integer, parameter :: m = minval((/1/)) ! { dg-error "Transformational function" } +end