[Bug c++/79095] [7 regression] spurious stringop-overflow warning
glisse at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Jan 22 09:38:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79095
--- Comment #5 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Jeffrey A. Law from comment #4)
> So the simplified tests are interesting, but ultimately too simplified. The
> VRP prototype which works on the simplified testcases doesn't work on the
> real testcase for this BZ.
>
> The key sequences look like:
>
> _13 = (long unsigned int) _12;
> _121 = ADD_OVERFLOW (_13, 18446744073709551615);
> _1 = REALPART_EXPR <_121>;
> _39 = IMAGPART_EXPR <_121>;
> if (_1 > _13)
> goto <bb 4>; [29.56%]
> else
> goto <bb 18>; [70.44%]
>
>
> Which defeat the simplistic prototype for VRP. It's essentially still the
> same construct, but we'd have to extract stuff out of the COMPLEX_EXPR and
> recognize the ADD_OVERFLOW.
I thought ADD_OVERFLOW would appear in the widening_mul pass, i.e. after all
the VRP passes are done? On the other hand, teaching VRP about *_OVERFLOW
sounds like a good idea.
More information about the Gcc-bugs
mailing list