re PR c/17855 (modification of function struct return not diagnosed)
authorJoseph Myers <joseph@codesourcery.com>
Thu, 31 Mar 2005 23:34:44 +0000 (00:34 +0100)
committerJoseph Myers <jsm28@gcc.gnu.org>
Thu, 31 Mar 2005 23:34:44 +0000 (00:34 +0100)
commit0223e4f514d36b505bf23ae213b99886bebe0dad
tree7792b0bdd163e128984c1a5dd6701ff7587ff7e3
parent96ddf8ef2326b2da28955873ff0b5ab921f481c0
re PR c/17855 (modification of function struct return not diagnosed)

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.

From-SVN: r97352
gcc/ChangeLog
gcc/gimplify.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/struct-non-lval-1.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/compile/struct-non-lval-2.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/compile/struct-non-lval-3.c [new file with mode: 0644]