[Bug target/66703] [4.9/5/6] gcc.target/i386/readeflags-1.c aborts on -march=i586 or on -miamcu
ubizjak at gmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Jul 10 08:49:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66703
--- Comment #4 from Uroš Bizjak <ubizjak at gmail dot com> ---
This patch makes testcase more robust:
--cut here--
Index: readeflags-1.c
===================================================================
--- readeflags-1.c (revision 225648)
+++ readeflags-1.c (working copy)
@@ -11,10 +11,11 @@
#define EFLAGS_TYPE unsigned int
#endif
-static EFLAGS_TYPE
+__attribute__((noinline, noclone))
+EFLAGS_TYPE
readeflags_test (unsigned int a, unsigned int b)
{
- unsigned x = (a == b);
+ volatile char x = (a == b);
return __readeflags ();
}
--cut here--
More information about the Gcc-bugs
mailing list