This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[fortran,patch] Initial Fortran 2008 support
- From: FX Coudert <fxcoudert at gmail dot com>
- To: Fortran List <fortran at gcc dot gnu dot org>, gcc patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 28 Feb 2008 18:53:30 +0000
- Subject: [fortran,patch] Initial Fortran 2008 support
Hi all,
This patch opens the Fortran 2008 game. It does so by:
-- adding the -std=f2008, handling it and documenting it
-- adding support for .f08 and .F08 file suffixes, documenting
them and adding them to all testsuite drivers (including in libgomp)
-- documenting our Fortran 2008 support in the doc, referring to
the current draft and WG5 webpage; mentioning that, until the final
standard is published (or, at least voted), our F2008 support follows
the drafts and may be expected to change without warnings or
compatibility, if the committee changes their mind about something
-- allowing empty CONTAINS in Fortran 2008 mode, not just as a GNU
extension
-- marking ASINH, ACOSH, ATANH, ERF and ERFC as F2008; same for
GAMMA; adding LOG_GAMMA, HYPOT and ERFC_SCALED intrinsics; provide a
library function for the exponentially-scaled complementary error
function, based on Netlib's; documenting all this
There are limitations to this patch, for which I intend to keep the
PR open and they can be acted upon later by others or myself. This is
a tedious patch already, and I'd like to get it in :) The
limitations are (probably in increasing importance):
-- No front-end simplification for ERFC_SCALED. I believe it
should have one, as it can be used in initialization expressions (or
can it not?). However, it's a long way from trivial. Moreover, ERF
and ERFC don't have one either, so I don't feel so bad :)
-- The new testcases don't check that we accept/reject correctly
the different intrinsics based on the -std option passed by the user.
That's because I discovered that the front-end actually doesn't check
standard compliance of intrinsics in most cases! I supposed it's
something widely known that I had never realized, and there probably
is a PR about it. Daniel, I think at some point you were working on
that, is it still the case?
-- ASINH, ACOSH and ATANH should accept complex arguments; a
number of other intrinsics should as well (ASIN, ACOS, ATAN, etc.). I
haven't implemented that yet, because it's probably easier to do that
at the same time for all intrinsics that have changed status between
F2003 and F2008. It also requires library fallback functions, because
C99 complex functions are not widely available outside the glibc world.
It's not a big patch, but it's rather tedious to put together, so
I've split it into 3 parts : front-end, library and testsuite. It's
regtested on x86_64-linux and includes testcases for all new
features. (They may be expanded upon later, for example when
intrinsics can be checked against the -std option.) OK to commit?
Thanks,
FX
--
François-Xavier Coudert
http://www.homepages.ucl.ac.uk/~uccafco/
Attachment:
2008-fortran.ChangeLog
Description: Binary data
Attachment:
2008-fortran.diff
Description: Binary data
Attachment:
2008-libgfortran.ChangeLog
Description: Binary data
Attachment:
2008-libgfortran.diff
Description: Binary data
Attachment:
2008-testsuite.ChangeLog
Description: Binary data
Attachment:
2008-testsuite.diff
Description: Binary data