Bug#343511: g++-3.4 -O1: wrong code generation
Bill Allombert <ballombe@debian.org> writes:
> Package: g++-3.4
> Version: 3.4.5-1
> Severity: normal
>
> Hello Debian GCC maintainers,
>
> g++-3.4 incorrectly compiles the attached file at -O1 and up by causing
> an infinite loop.
This reduces to:
__attribute__ ((pure)) inline long f(void) {
return 0;
}
void __attribute__ ((noinline)) g(long *e)
{
e[f()] += 1;
}
int main(void)
{
long e[163];
g(e);
return 0;
}
which looks to be the same problem as this:
http://gcc.gnu.org/PR17972
so unfortunately, it looks like this won't be fixed upstream. It looks
pretty nasty, though, maybe we should ask again.
--
Falk
Reply to: