From fcd1625387a5e51d2ed2a21cabdd0b0efdb7ca97 Mon Sep 17 00:00:00 2001 From: pbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4> Date: Wed, 11 Aug 2004 16:05:14 +0000 Subject: [PATCH] 2004-08-11 Paul Brook <paul@codeourcery.com> PR fortran/16917 * intrinsic.c (add_functions): Add dfloat as an alias for dble. 2004-08-11 Steven G. Kargl <kargls@comcast.net> * gfortran.dg/dfloat_1.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85805 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/ChangeLog | 5 +++++ gcc/fortran/intrinsic.c | 2 ++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/dfloat_1.f90 | 15 +++++++++++++++ 4 files changed, 27 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/dfloat_1.f90 diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index b45197dd191b..7e3d5131d814 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2004-08-11 Paul Brook <paul@codeourcery.com> + + PR fortran/16917 + * intrinsic.c (add_functions): Add dfloat as an alias for dble. + 2004-08-10 Richard Henderson <rth@redhat.com> * f95-lang.c (gfc_init_builtin_functions): Remove diff --git a/gcc/fortran/intrinsic.c b/gcc/fortran/intrinsic.c index c80909f8f6ce..14014a007a62 100644 --- a/gcc/fortran/intrinsic.c +++ b/gcc/fortran/intrinsic.c @@ -1048,6 +1048,8 @@ add_functions (void) gfc_check_dble, gfc_simplify_dble, gfc_resolve_dble, a, BT_REAL, dr, 0); + make_alias ("dfloat"); + make_generic ("dble", GFC_ISYM_DBLE); add_sym_1 ("digits", 0, 1, BT_INTEGER, di, diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 459f7b50cc7d..e99a8cc825f3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2004-08-11 Steven G. Kargl <kargls@comcast.net> + + PR fortran/16917 + * gfortran.dg/dfloat_1.f90: New test. + 2004-08-09 Mark Mitchell <mark@codesourcery.com> * gcc.dg/testsuite/gcc.dg/arm-eabi1.c: New test. diff --git a/gcc/testsuite/gfortran.dg/dfloat_1.f90 b/gcc/testsuite/gfortran.dg/dfloat_1.f90 new file mode 100644 index 000000000000..098f22e28762 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/dfloat_1.f90 @@ -0,0 +1,15 @@ +! { dg-do run } +! Progam to test the dfloat intrinsic. +program dfloat_1 + implicit none + integer(2) i2 + integer(4) i4 + integer(8) i8 + i2 = -4_2 + i4 = 4_4 + i8 = 10_8 + if (dfloat(i2) /= -4.d0) call abort() + if (dfloat(i4) /= 4.d0) call abort() + if (dfloat(i8) /= 10.d0) call abort() + if (dfloat(i4*i2) /= -16.d0) call abort() +end program dfloat_1 -- GitLab