[Bug fortran/56149] New: 64 bit gFortran-C interop hidden character argument length passed as 32 bit value

paul.laidler at ntlworld dot com gcc-bugzilla@gcc.gnu.org
Wed Jan 30 14:04:00 GMT 2013


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

             Bug #: 56149
           Summary: 64 bit gFortran-C interop hidden character argument
                    length passed as 32 bit value
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: paul.laidler@ntlworld.com


This is not so much a bug but a significant gFortran limitation in my project
to port ClearWin+ to gFortran. Users will not want to edit all their "printf"
calls so that format strings become null terminated. This could be avoided if
the format string length where passed as a 64 bit integer. At the moment
gFortran passes a 32 bit value and allows garbage to remain in the HIDWORD so
the argument cannot safely be distinguished from a 64 bit address.

It would appear that there is no advantage in passing a 32 bit value in this
context.

As an aside, I would also suggest that interop programming would be much
simpler if literal character strings were stored in memory as null-terminated
strings.



More information about the Gcc-bugs mailing list