diff options
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/execute/20080813-1.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/20080813-1.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/20080813-1.c b/gcc/testsuite/gcc.c-torture/execute/20080813-1.c new file mode 100644 index 000000000..9ef6bc2e2 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20080813-1.c @@ -0,0 +1,30 @@ +/* PR middle-end/37103 */ + +extern void abort (void); + +void +foo (unsigned short x) +{ + signed char y = -1; + if (x == y) + abort (); +} + +void +bar (unsigned short x) +{ + unsigned char y = -1; + if (x == y) + abort (); +} + +int +main (void) +{ + if (sizeof (int) == sizeof (short)) + return 0; + foo (-1); + if (sizeof (short) > 1) + bar (-1); + return 0; +} |