This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: possible bug in fortran compiler


>The following simple fortran code compiled in egcs (egcs-2.90.22 971220 
>(egcs-1.01 beta)) :
>
>integer I
>read(5,*) I
>stop
>end
>
>would not generate an error code if the variable read is in real format 
>(i.e. 123.45 would be read 123 without error generated). This is (I think) 
>an anomalous behaviour that is not common to other fortran compilers. Luca

This is a libf2c issue, and we generally avoid trying to make g77's
(or egcs g77's) version of libf2c any more different from netlib's
(the source of libf2c) than it needs to be.

I suggest you report this to <dmg@bell-labs.com>, who (IIRC) is the
official maintainer of libf2c.  Changes he makes to libf2c eventually
make their way into g77 and egcs-g77.  In fact, I need to pick up
some fresh changes he's made (haven't looked at them yet) and bring
them forward (I'm usually the one who does this).

But I'm not sure offhand whether dmg will view this as a bug or a
feature!  Or just a wart that must be preserved due to compatibility.
He might add the code to reject it, but conditional on some macro that
you can then define before building libf2c to get the behavior (though
that level of control over how a library behaves certainly isn't
ideal :).

        tq vm, (burley)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]