https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26724
pskocik at gmail dot com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pskocik at gmail dot com --- Comment #3 from pskocik at gmail dot com --- I don't know if this is related, but what's been bugging me is that gcc's __builtin_constant_p (clang's also, but in different situations) fails to recognize the constness/non-constness of a `memcmp` call when it's used for equality comparisons. In such situations, I would like to use __builtin_constant_p(!memcmp(...))?!memcmp(...):!my_memcmp(...) to call a custom backend function (one not named `memcmp`) if real `memcmp` would be called, but inline a constant otherwise. Unfortunately there seem to be edge cases where this doesn't work and while the assembly for a !memcmp(...) expression shows it's been folded to a constant, a __builtin_constant_p around such an expression doesn't reflect that. E.g., in functions eq_eh{2,3}_cexprEh in https://gcc.godbolt.org/z/6oefRX (on clang the correspondence breaks in eq_eh1_cexprEh).