This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [PATCH] PR 16917: Add DFLOAT to gfortran
> 2004-08-11 Steven G. Kargl <kargls@comcast.net>
>
> * check.c (gfc_check_dfloat): New function.
> * gfortran.h (GFC_ISYM_DFLOAT): New symbol.
> * intrinsic.c: Add DFLOAT to list of intrinsic functions.
> * intrinsic.h: Prototypes for gfc_check_dfloat and
> gfc_simplify_dfloat. * simplify.c (gfc_simplify_dfloat): New function.
>
> 2004-08-11 Steven G. Kargl <kargls@comcast.net>
>
> * dfloat.f90: Test case for DFLOAT intrinsic.
Steven B pointed out that it would be simpler to just add dfloat as an alias
for dble. This means we accept a wider range of arguments to dfloat, but I
don't imagine anyone's going to be bothered about that.
For the testsuite you have two options:
- Put it in gfortran.fortran-torture/execute/.
- Add the appropriate { dg-do ... } line and add it to gfortran.dg/
I prefer the latter as it gives more flexibility.
You should also add a short comment saying what it tests, and mention any PRs.
Paul
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.
Index: intrinsic.c
===================================================================
RCS file: /var/cvsroot/gcc-cvs/gcc/gcc/fortran/intrinsic.c,v
retrieving revision 1.14
diff -u -p -r1.14 intrinsic.c
--- intrinsic.c 6 Aug 2004 21:46:56 -0000 1.14
+++ intrinsic.c 11 Aug 2004 15:46:13 -0000
@@ -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,