From 15e3956e406ebeed5e5e9d3f27047e31d4d53411 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Fri, 10 Jul 2015 17:32:48 +0200 Subject: [PATCH] re PR target/66703 ([4.9/5/6] gcc.target/i386/readeflags-1.c aborts on -march=i586 or on -miamcu) PR target/66703 * gcc.target/i386/readeflags-1.c (readeflags_test): Declare with __attribute__((noinline, noclone)). Change "x" to "volatile char" type to prevent possible flag-clobbering zero-extensions. From-SVN: r225680 --- gcc/testsuite/ChangeLog | 7 +++++++ gcc/testsuite/gcc.target/i386/readeflags-1.c | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c21e3d83f96..61456046997 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2015-07-10 Uros Bizjak + + PR target/66703 + * gcc.target/i386/readeflags-1.c (readeflags_test): Declare with + __attribute__((noinline, noclone)). Change "x" to "volatile char" + type to prevent possible flag-clobbering zero-extensions. + 2015-07-10 Paolo Carlini PR c++/60842 diff --git a/gcc/testsuite/gcc.target/i386/readeflags-1.c b/gcc/testsuite/gcc.target/i386/readeflags-1.c index 363a895e704..d0dd0da4555 100644 --- a/gcc/testsuite/gcc.target/i386/readeflags-1.c +++ b/gcc/testsuite/gcc.target/i386/readeflags-1.c @@ -11,10 +11,11 @@ extern void abort (void); #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 (); } -- 2.30.2