[fortran,patch] Initial Fortran 2008 support

FX Coudert fxcoudert@gmail.com
Thu Feb 28 20:01:00 GMT 2008


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/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2008-fortran.ChangeLog
Type: application/octet-stream
Size: 1359 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080228/25ddbd02/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2008-fortran.diff
Type: application/octet-stream
Size: 54923 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080228/25ddbd02/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2008-libgfortran.ChangeLog
Type: application/octet-stream
Size: 353 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080228/25ddbd02/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2008-libgfortran.diff
Type: application/octet-stream
Size: 8723 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080228/25ddbd02/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2008-testsuite.ChangeLog
Type: application/octet-stream
Size: 1375 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080228/25ddbd02/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2008-testsuite.diff
Type: application/octet-stream
Size: 21243 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080228/25ddbd02/attachment-0005.obj>


More information about the Gcc-patches mailing list