[Bug fortran/79929] [7 Regression] Bogus Warning: '__builtin_memset': specified size 4294967291 exceeds maximum object size 2147483647
law at redhat dot com
gcc-bugzilla@gcc.gnu.org
Wed Apr 19 16:25:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79929
Jeffrey A. Law <law at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
Component|middle-end |fortran
--- Comment #16 from Jeffrey A. Law <law at redhat dot com> ---
So WRT c#4, that is not an equivalent testcase in C AFAICT.
The reduced fortran testcase fails at -O2, the C testcase does not. The fact
that the C testcase fails at -O1 is simply uninteresting.
If we go back to the Fortran testcases I don't see anything that would allow us
to determine statically that the problematical block can not be reached.
Working with the reduced Fortran testcase we have this in the dumps:
sizetype _1;
integer(kind=4) _2;
unsigned long _3;
_1 = (sizetype) _yerrmsg_9(D);
[ ... ]
_2 = _yerrmsg_9(D) + 5;
_3 = (unsigned long) _2;
[ ... ]
if (_1 > _3)
goto <bb 6>; [36.64%]
else
goto <bb 7>; [63.36%]
We're dealing with unsigned types here, so overflow has well defined semantics.
Thus we can not statically determine the result of that conditional.
This really is a Fortran problem AFAICT.
More information about the Gcc-bugs
mailing list