aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/float_1.f90
diff options
context:
space:
mode:
authorDaniel Franke <franke.daniel@gmail.com>2010-05-19 07:43:53 -0400
committerDaniel Franke <dfranke@gcc.gnu.org>2010-05-19 07:43:53 -0400
commitc9018c71d3cbb2929ab53fa7a762ba43934785f5 (patch)
treef42d8a016dbee6c93a1f1d422d13a0837cba65d8 /gcc/testsuite/gfortran.dg/float_1.f90
parent81f3232690f1ad1fea044d6e6b60930acd7f16e7 (diff)
downloadgcc-c9018c71d3cbb2929ab53fa7a762ba43934785f5.zip
gcc-c9018c71d3cbb2929ab53fa7a762ba43934785f5.tar.gz
gcc-c9018c71d3cbb2929ab53fa7a762ba43934785f5.tar.bz2
re PR fortran/34505 (FLOAT/SNGL: Not accepted as actual argument; diagnostics problems)
gcc/fortran/: 2010-05-19 Daniel Franke <franke.daniel@gmail.com> PR fortran/34505 * intrinsic.h (gfc_check_float): New prototype. (gfc_check_sngl): New prototype. * check.c (gfc_check_float): New. (gfc_check_sngl): New. * intrinsic.c (add_functions): Moved DFLOAT from aliasing DBLE to be a specific for REAL. Added check routines for FLOAT, DFLOAT and SNGL. * intrinsic.texi: Removed individual nodes of FLOAT, DFLOAT and SNGL, added them to the list of specifics of REAL instead. gcc/testsuite/: 2010-05-19 Daniel Franke <franke.daniel@gmail.com> PR fortran/34505 * gfortran.dg/dfloat_1.f90: Add warnings for non-default kind arguments; add check for return value kind. * gfortran.dg/float_1.f90: Likewise. From-SVN: r159558
Diffstat (limited to 'gcc/testsuite/gfortran.dg/float_1.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/float_1.f909
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/testsuite/gfortran.dg/float_1.f90 b/gcc/testsuite/gfortran.dg/float_1.f90
index 224d31d..0f3c062 100644
--- a/gcc/testsuite/gfortran.dg/float_1.f90
+++ b/gcc/testsuite/gfortran.dg/float_1.f90
@@ -5,8 +5,11 @@ program test_float
integer(2) :: i2 = 1
integer(4) :: i4 = 1
integer(8) :: i8 = 1
- if (float(i1) /= 1.) call abort
- if (float(i2) /= 1.) call abort
+ if (float(i1) /= 1.) call abort ! { dg-warning "non-default INTEGER" }
+ if (float(i2) /= 1.) call abort ! { dg-warning "non-default INTEGER" }
if (float(i4) /= 1.) call abort
- if (float(i8) /= 1.) call abort
+ if (float(i8) /= 1.) call abort ! { dg-warning "non-default INTEGER" }
+
+ if (kind(float(i4)) /= kind(1.0)) call abort
+ if (kind(float(i8)) /= kind(1.0)) call abort ! { dg-warning "non-default INTEGER" }
end program test_float