https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26724
Matthijs Kooijman changed:
What|Removed |Added
CC||matthijs at stdin dot nl
---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26724
--- Comment #4 from Marc Glisse ---
(In reply to pskocik from comment #3)
> I don't know if this is related,
It isn't, please file a separate bug report. memcmp is optimized to an integer
comparison in strlen, much later than the lowering of
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
---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26724
--- Comment #2 from Anton Blanchard ---
This issue is still present. The workaround Andrew suggests is good:
static inline int baz(void)
{
return 0;
}
void bad()
{
int i = baz();
if (!__builtin_constant_p(i))
--- Comment #1 from pinskia at gcc dot gnu dot org 2006-03-17 15:20 ---
Confirmed, the problem is:
/* If this expression has side effects, show we don't know it to be a
constant. Likewise if it's a pointer or aggregate type since in
those case we only want literals, since