[Bug c/103887] -fsanitize=shift affects constness of an expression
mike@mk-sys.cz
gcc-bugzilla@gcc.gnu.org
Sun Jan 2 00:25:08 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103887
--- Comment #2 from Michal Kubecek <mike@mk-sys.cz> ---
(In reply to Andrew Pinski from comment #1)
> The problem is rather __builtin_constant_p not resolving to a constant. This
> is a dup of bug 79482.
There is a difference: your modified testcase fails to compile regardless of
-fsanitize=shift while mine fails only with this option and succeeds without
it. If __builtin_constant_p(tr) not being handled as constant were the problem,
the result should not depend on presence of "-fsanitize=shift".
More information about the Gcc-bugs
mailing list