aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorThomas Koenig <tkoenig@gcc.gnu.org>2017-09-24 13:51:39 +0000
committerThomas Koenig <tkoenig@gcc.gnu.org>2017-09-24 13:51:39 +0000
commit24bafc562a240e91aac0af8390729a257bf57a08 (patch)
treee451feae630d4f2e2b12c8ec828bd9aee74406d1 /gcc/testsuite
parent02fdb1306ceb0aec22273beaa01057e3bed80255 (diff)
downloadgcc-24bafc562a240e91aac0af8390729a257bf57a08.zip
gcc-24bafc562a240e91aac0af8390729a257bf57a08.tar.gz
gcc-24bafc562a240e91aac0af8390729a257bf57a08.tar.bz2
re PR fortran/54633 (ICEs and reject valid with MINLOC/MINVAL (MAXLOC/MAXVAL) due to lacking compile-time simplification)
2017-09-24 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/54633 * gfortran.dg/intrinsic_bounds_1.f90: New test. * gfortran.dg/intrinsic_param_1.f90: New test. From-SVN: r253125
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/gfortran.dg/intrinsic_bounds_1.f907
-rw-r--r--gcc/testsuite/gfortran.dg/intrinsic_param_1.f906
3 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index bc23562..3502b3a 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,4 +1,10 @@
2017-09-24 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/54633
+ * gfortran.dg/intrinsic_bounds_1.f90: New test.
+ * gfortran.dg/intrinsic_param_1.f90: New test.
+
+2017-09-24 Thomas Koenig <tkoenig@gcc.gnu.org>
Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/80118
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 0000000..a9586fb
--- /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 0000000..7c168a7
--- /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