aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorPaul Thomas <pault@gcc.gnu.org>2007-09-27 18:39:55 +0000
committerPaul Thomas <pault@gcc.gnu.org>2007-09-27 18:39:55 +0000
commit74687efe94ad01d8af1f28e607bbeba0d80b6d90 (patch)
tree66a2a58c23f76fabbe4e6bf777ba63d4cc027abc /gcc/testsuite
parent5c13b77cb041e4f56b71448b6ce94b7c98a29812 (diff)
downloadgcc-74687efe94ad01d8af1f28e607bbeba0d80b6d90.zip
gcc-74687efe94ad01d8af1f28e607bbeba0d80b6d90.tar.gz
gcc-74687efe94ad01d8af1f28e607bbeba0d80b6d90.tar.bz2
re PR fortran/33568 (ICE with ANINT (with KIND and an array))
2007-09-27 Paul Thomas <pault@gcc.gnu.org> PR fortran/33568 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Allow for the possibility of the optional KIND argument by making arg an array, counting the number of arguments and using arg[0]. 2007-09-27 Paul Thomas <pault@gcc.gnu.org> PR fortran/33568 * gfortran.dg/anint_1.f90: New test. From-SVN: r128843
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gfortran.dg/anint_1.f9016
2 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 163f80b..4f608d0 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2007-09-27 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/33568
+ * gfortran.dg/anint_1.f90: New test.
+
2007-09-27 Ian Lance Taylor <iant@google.com>
PR tree-optimization/33565
diff --git a/gcc/testsuite/gfortran.dg/anint_1.f90 b/gcc/testsuite/gfortran.dg/anint_1.f90
new file mode 100644
index 0000000..a6b92cb
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/anint_1.f90
@@ -0,0 +1,16 @@
+! { dg-do run }
+! Check the fix for PR33568 in which the optional KIND
+! argument for ANINT, with an array for the first argument
+! would cause an ICE.
+!
+! Contributed by Ignacio Fernández Galván <jellby@yahoo.com>
+!
+PROGRAM Test
+ IMPLICIT NONE
+ INTEGER, PARAMETER :: DP=8
+ REAL(DP), DIMENSION(1:3) :: A = (/1.76,2.32,7.66/), B
+ A = ANINT ( A , DP)
+ B = A
+ A = ANINT ( A)
+ if (any (A .ne. B)) call abort ()
+END PROGRAM Test