diff options
author | pault <pault@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-09-27 18:39:55 +0000 |
---|---|---|
committer | pault <pault@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-09-27 18:39:55 +0000 |
commit | ea8ac4ce32d8064846b764f6421bf78a113b8899 (patch) | |
tree | 66a2a58c23f76fabbe4e6bf777ba63d4cc027abc /gcc/testsuite/gfortran.dg/anint_1.f90 | |
parent | 46284b1cb4ca906cdf5a0f269c858425249b68fd (diff) | |
download | gcc-ea8ac4ce32d8064846b764f6421bf78a113b8899.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128843 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gfortran.dg/anint_1.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/anint_1.f90 | 16 |
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 00000000000..a6b92cbcd3a --- /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 |