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.