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
This commit is contained in:
Uros Bizjak 2015-07-10 17:32:48 +02:00 committed by Uros Bizjak
parent f3ae5c0cea
commit 15e3956e40
2 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2015-07-10 Uros Bizjak <ubizjak@gmail.com>
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 <paolo.carlini@oracle.com>
PR c++/60842

View File

@ -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 ();
}