[Bug tree-optimization/90020] [7/8/9 regression] -O2 -Os x86-64 wrong code generated for GNU Emacs
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Apr 9 11:43:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90020
--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
/* { dg-do run } */
/* { dg-require-weak "" } */
void __attribute__((noinline,noclone))
check (int i)
{
if (i == 0)
__builtin_exit (0);
}
int i;
extern int x __attribute__((weak));
int main(int argc, char **argv)
{
if (argc)
{
check (i);
return x;
}
else
{
check (i);
return x-1;
}
return 0;
}
FAILs at -O2 due to GIMPLE PRE and at -Os due to RTL hoist (if GIMPLE PRE
is fixed).
More information about the Gcc-bugs
mailing list