diff options
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile/struct-non-lval-3.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/struct-non-lval-3.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/struct-non-lval-3.c b/gcc/testsuite/gcc.c-torture/compile/struct-non-lval-3.c new file mode 100644 index 000000000..3020194ca --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/struct-non-lval-3.c @@ -0,0 +1,7 @@ +/* Bug c/17855, using assignment for non-lvalue. */ +struct foo {char x, y, z[2];}; +struct foo p, q; +void bar(int baz) +{ + (p = q).z[baz] = 1; +} |