From: Paul Brook Date: Wed, 11 Aug 2004 16:05:14 +0000 (+0000) Subject: [multiple changes] X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3ec0f302092e35b9c52cc2156c548ed04fc84b21;p=gcc.git [multiple changes] 2004-08-11 Paul Brook PR fortran/16917 * intrinsic.c (add_functions): Add dfloat as an alias for dble. 2004-08-11 Steven G. Kargl * gfortran.dg/dfloat_1.f90: New test. From-SVN: r85805 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index b45197dd191..7e3d5131d81 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2004-08-11 Paul Brook + + PR fortran/16917 + * intrinsic.c (add_functions): Add dfloat as an alias for dble. + 2004-08-10 Richard Henderson * f95-lang.c (gfc_init_builtin_functions): Remove diff --git a/gcc/fortran/intrinsic.c b/gcc/fortran/intrinsic.c index c80909f8f6c..14014a007a6 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 459f7b50cc7..e99a8cc825f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2004-08-11 Steven G. Kargl + + PR fortran/16917 + * gfortran.dg/dfloat_1.f90: New test. + 2004-08-09 Mark Mitchell * 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 00000000000..098f22e2876 --- /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