diff options
Diffstat (limited to 'SingleSource/Regression/C/gcc-c-torture/execute/pr78720.c')
-rw-r--r-- | SingleSource/Regression/C/gcc-c-torture/execute/pr78720.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/SingleSource/Regression/C/gcc-c-torture/execute/pr78720.c b/SingleSource/Regression/C/gcc-c-torture/execute/pr78720.c new file mode 100644 index 00000000..b99c232a --- /dev/null +++ b/SingleSource/Regression/C/gcc-c-torture/execute/pr78720.c @@ -0,0 +1,29 @@ +/* PR tree-optimization/78720 */ + +__attribute__((noinline, noclone)) long int +foo (signed char x) +{ + return x < 0 ? 0x80000L : 0L; +} + +__attribute__((noinline, noclone)) long int +bar (signed char x) +{ + return x < 0 ? 0x80L : 0L; +} + +__attribute__((noinline, noclone)) long int +baz (signed char x) +{ + return x < 0 ? 0x20L : 0L; +} + +int +main () +{ + if (foo (-1) != 0x80000L || bar (-1) != 0x80L || baz (-1) != 0x20L + || foo (0) != 0L || bar (0) != 0L || baz (0) != 0L + || foo (31) != 0L || bar (31) != 0L || baz (31) != 0L) + __builtin_abort (); + return 0; +} |