Commit b0408f13 by Georg-Johann Lay Committed by Georg-Johann Lay

pr52286.c: Fix FAIL on 16-bit int platforms.

	* gcc.c-torture/execute/pr52286.c: Fix FAIL on 16-bit int platforms.

From-SVN: r184394
parent ba641b7e
2012-02-20 Georg-Johann Lay <avr@gjlay.de> 2012-02-20 Georg-Johann Lay <avr@gjlay.de>
* gcc.dg/pr52132.c: Fix FAIL on 16-bit int platforms. * gcc.dg/pr52132.c: Fix FAIL on 16-bit int platforms.
* gcc.c-torture/execute/pr52286.c: Ditto.
2012-02-20 Jakub Jelinek <jakub@redhat.com> 2012-02-20 Jakub Jelinek <jakub@redhat.com>
......
...@@ -5,9 +5,15 @@ extern void abort (void); ...@@ -5,9 +5,15 @@ extern void abort (void);
int int
main () main ()
{ {
#if __SIZEOF_INT__ > 2
int a, b; int a, b;
asm ("" : "=r" (a) : "0" (0)); asm ("" : "=r" (a) : "0" (0));
b = (~a | 1) & -2038094497; b = (~a | 1) & -2038094497;
#else
long a, b;
asm ("" : "=r" (a) : "0" (0));
b = (~a | 1) & -2038094497L;
#endif
if (b >= 0) if (b >= 0)
abort (); abort ();
return 0; return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment