summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/anint_1.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/anint_1.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/anint_1.f9016
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/anint_1.f90 b/gcc/testsuite/gfortran.dg/anint_1.f90
new file mode 100644
index 000000000..a6b92cbcd
--- /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