[Bug fortran/48303] New: [Legacy] Support Character constants in DATA statement for non-character variables

burnus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Mar 27 20:08:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48303

           Summary: [Legacy] Support Character constants in DATA statement
                    for non-character variables
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org


Reported on freenode's #fortran.

The following program uses:
      DATA ZERO,ONE,TWO,THREE,FOUR,FIVE,SIX,SEVEN,EIGHT,
     & RNINE,TEN/'-','1','2','3','4','5','6','7','8','9','T'/

which almost all my compilers accept as vendor extension; however, gfortran
only accepts Hollerith constants (even more common vendor extension) in DATA:

      DATA ZERO,ONE,TWO,THREE,FOUR,FIVE,SIX,SEVEN,EIGHT,
     & RNINE,TEN/1H-,1H1,1H2,1H3,1H4,1H5,1H6,1H7,1H8,1H9,1HT/

Expected: As -std=legacy extension, also accept in DATA character literals.

The full program is the first one in the list at
http://www.netl.doe.gov/technologies/oil-gas/software/simulat.html



More information about the Gcc-bugs mailing list