From 24bafc562a240e91aac0af8390729a257bf57a08 Mon Sep 17 00:00:00 2001 From: Thomas Koenig Date: Sun, 24 Sep 2017 13:51:39 +0000 Subject: [PATCH] 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 --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gfortran.dg/intrinsic_bounds_1.f90 | 7 +++++++ gcc/testsuite/gfortran.dg/intrinsic_param_1.f90 | 6 ++++++ 3 files changed, 19 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/intrinsic_bounds_1.f90 create mode 100644 gcc/testsuite/gfortran.dg/intrinsic_param_1.f90 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 -- 2.30.2