[patch,fortran] Accept noninteger exponents in initialization expressions for Fortran 2003 (PR29962)

Tobias Burnus burnus@net-b.de
Mon Nov 27 10:30:00 GMT 2006


:ADDPATCH fortran:

Fortran 2003 allows much more in initialization expressions than Fortran
95 (cf. PR29962), some of which are support in STD_GNU.

This patch allows noninteger exponents in initialization expressions.
The relevant parts of the standard are:

"7.1.7 Initialization expression" in Fortran 2003 and in the Section
"7.1.6.1 Constant expression" in Fortran 95.

F95: "An initialization expression is a constant expression in which the
exponentiation operation is
permitted only with an integer power"

In F2003 this clause is gone.

Regression tested on x86_64-unknown-linux-gnu.

Tobias

2006-11-27  Tobias Burnus  <burnus@net-b.de>

    PR fortran/29962
    * expr.c (check_intrinsic_op): Allow noninteger exponents for F2003.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: init_exp1.diff
Type: text/x-patch
Size: 635 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20061127/3a35444b/attachment.bin>


More information about the Gcc-patches mailing list