http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46854
--- Comment #1 from joakim.tjernlund at transmode dot se <joakim.tjernlund at
transmode dot se> 2010-12-09 09:10:50 UTC ---
Somewhat related observation:
It would be nice if gcc could optimize
static inline const char *test(int i)
{
const char *p = "abc\0def\0gef";
for(; i; --i)
while(*++p);
return p;
}
const char * myfun(void)
{
return test(2);
}
into
const char * myfun(void)
{
return "gef";
}
