diff options
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile/20060419-1.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/20060419-1.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/20060419-1.c b/gcc/testsuite/gcc.c-torture/compile/20060419-1.c new file mode 100644 index 000000000..dc346ae02 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20060419-1.c @@ -0,0 +1,21 @@ +/* This failed because if conversion didn't handle insv patterns properly. */ + +union y +{ + int a; + unsigned short b; +}; + +extern void bar (unsigned short u, union y v); + +void +foo (int check) +{ + union y x; + + if (check != 0) + x.b = 1; + else + x.b = 2; + bar (x.b, x); +} |