diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr52533.c')
-rw-r--r-- | gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr52533.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr52533.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr52533.c new file mode 100644 index 000000000..82753cd73 --- /dev/null +++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr52533.c @@ -0,0 +1,19 @@ +/* PR tree-optimization/52533 */ + +int +foo (unsigned char x) +{ + if (x <= 9) + return '0' + x; + else if (x <= 15) + return 'a' + (x - 10); + else + return 0; +} + +void +bar (unsigned char x, unsigned char *y) +{ + y[0] = foo ((unsigned char) (x >> 4)); + y[1] = foo ((unsigned char) (x & 0x0f)); +} |