[PATCH, testsuite]: Fix g++.dg/lto/pr79671 execute failure
Uros Bizjak
ubizjak@gmail.com
Tue May 2 15:39:00 GMT 2017
Hello!
We have to match input and output operand (or use "+") of an empty asm
to move the value to a register.
2017-05-02 Uros Bizjak <ubizjak@gmail.com>
* g++.dg/lto/pr79671_0.C (foo): Fix asm constraints.
Tested on alphaev68-linux-gnu (where the unpatched testcase fails) and
x86_64-linux-gnu.
OK for mailine?
Uros.
-------------- next part --------------
Index: g++.dg/lto/pr79671_0.C
===================================================================
--- g++.dg/lto/pr79671_0.C (revision 247497)
+++ g++.dg/lto/pr79671_0.C (working copy)
@@ -13,7 +13,7 @@ int __attribute__((noinline)) foo()
new (&x) B (0);
y = x;
B *q = reinterpret_cast <B *>(&y);
- asm volatile ("" : "=r" (q) : "r" (q));
+ asm volatile ("" : "+r" (q));
return q->i;
}
extern "C" void bar ();
More information about the Gcc-patches
mailing list