[Bug middle-end/59470] [4.8 Regression] libstdc++ miscompilation after r205709
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Dec 11 19:46:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59470
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Re: the #c7 second testcase, rth thinks it is undefined behavior since there is
no sequence point. So here is a better testcase that should have defined
behavior, still before r205709 we miscompile it at -O2:
int a, b, d[1024];
int
main ()
{
int c = a;
asm ("movl $6, (%2); movl $1, %0" : "=r" (d[c])
: "rm" (b), "r" (&a) : "memory");
if (d[0] != 1 || d[6] != 0)
__builtin_abort ();
return 0;
}
More information about the Gcc-bugs
mailing list