[Bug libfortran/89696] A potential bug with read() when parsing number from string

kevin at fai dot host gcc-bugzilla@gcc.gnu.org
Wed Mar 13 17:59:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89696

--- Comment #3 from Khang H. Nguyen <kevin at fai dot host> ---
Sorry, I just have one more quick question.

Bug 1:
Nonetheless, for read(), I was just wondering, if you read from a list input
then it should be like that. 

However, if it is just a raw string and it acted like that, then how do you
tell if a string is an invalid integer string?

Do you have to build a check for that then? Shouldn't read() be able to detect
that because if you build a check on top of that, you would have to go through
all the character one and then read would then goes through all the characters
again.

Bug 2:
As you said that it is not a bug. I just suggested that for -2147483648, it is
still assignable with range check on, you just have to assign -2147483647 - 1


More information about the Gcc-bugs mailing list