diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-31 23:34:44 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-31 23:34:44 +0000 |
commit | 05fb348da54dfe5d665e375d9986b1e0f910b76b (patch) | |
tree | 7792b0bdd163e128984c1a5dd6701ff7587ff7e3 /gcc/testsuite/gcc.c-torture/compile/struct-non-lval-3.c | |
parent | 17d386e4a66078b713967828c9c265c47317f440 (diff) | |
download | gcc-05fb348da54dfe5d665e375d9986b1e0f910b76b.tar.gz |
PR c/17855
* gimplify.c (gimplify_expr): Create a temporary for lvalue
COND_EXPR and CALL_EXPR.
testsuite:
* gcc.c-torture/compile/struct-non-lval-1.c,
gcc.c-torture/compile/struct-non-lval-2.c,
gcc.c-torture/compile/struct-non-lval-3.c: New tests.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97352 138bc75d-0d04-0410-961f-82ee72b054a4
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 00000000000..3020194cae0 --- /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; +} |