[patch,fortran] Give an error when using non-integers with BOZ edit descriptors with -std=f* (PR29625)

Tobias Burnus burnus@net-b.de
Sat Oct 28 19:42:00 GMT 2006


:ADDPATCH fortran:

Fortran 95 and Fortran 2003 only allow BOZ edit descriptors for
integers. gfortran accepts as extension also OZ edit descriptors for
non-integers, even when using -std=f95/-std=f2003.

See PR29625 and also
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/231b28d62ed52d2b

(Let's see what Fortran 2008 will do. Fortran 2003 gave us real BOZ
(e.g. "real(z'FFFFF')"); it would then only be consequent to allow using
them with BOZ edit descriptors.)

This patch allows to use binary edit descriptors for non-integers (for
octal and hexadecimal it was allowed) and gives an error for -std=f95
and -std=f2003.

The output is actually the same for the real variables as in ifort;
ifort, however, fails with character variables("insufficient virtual
memory"). NAG f95, g95 and sunf95 don't accept BOZ edit descriptors for
reals.

Tobias


2006-10-28  Tobias Burnus  <burnus@net-b.de>

    PR fortran/29625
    * io/transfer.c (formatted_transfer_scalar): Allow binary edit
      descriptors for real variables; give error for BOZ edit
      descriptor for non-integers when using -std=f*.


2006-10-28  Tobias Burnus  <burnus@net-b.de>

    PR fortran/29625
    * gfortran.dg/io_real_boz.f90: Add.
    * gfortran.dg/io_real_boz2.f90: Add.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PR29625-real-boz.diff
Type: text/x-patch
Size: 3337 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20061028/357a2c9d/attachment.bin>


More information about the Gcc-patches mailing list