[Bug fortran/47613] [4.6 Regression] namelist read with -static

janus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Feb 5 10:33:00 GMT 2011


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

--- Comment #2 from janus at gcc dot gnu.org 2011-02-05 10:32:44 UTC ---
(In reply to comment #1)
> So, this is target specific.  What target are 
> you using?

x86_64-unknown-linux-gnu


> I'll also note that in ios = -1 and 5010 are
> 
>   LIBERROR_END = -1,            /* End of file, must be negative.  */
>   LIBERROR_READ_VALUE,
> 
> which are both possible errors for reading from an
> unconnected number.

Well, I won't argue about the specific value that IOSTAT returns, since the
standard specifies that this is processor-dependent. (Therefore also gfortran
could take the freedom to change these values.)

The problem for me really is the change of sign of this value when adding the
-static flag (or moving from 4.5 to 4.6). The F08 standard says explicitly that
IOSTAT_END and IOSTAT_EOR are negative, while all other error values are
positive.

And -static should not really make a difference in terms of the returned error
value.



More information about the Gcc-bugs mailing list