[Bug c/95699] __builtin_constant_p inconsistencies

vincent-gcc at vinc17 dot net gcc-bugzilla@gcc.gnu.org
Wed Jun 17 10:03:04 GMT 2020


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

--- Comment #5 from Vincent Lefèvre <vincent-gcc at vinc17 dot net> ---
(In reply to Richard Biener from comment #4)
> I'm inclined to close as WONTFIX or INVALID.  There are several other PRs
> which
> show "surprising" behavior with respect to __builtin_constant_p and jump
> threading.

But concerning tst1a and tst1b is there any reason that 0x7fffffffffffffffUL
and 0x8000000000000000UL are handled in a different way, while the only type
involved in these tests is unsigned long? I don't see why the value of the most
significant bit would matter here.

And isn't a missed optimization regarded as a valid bug?


More information about the Gcc-bugs mailing list