re PR c/66341 (Some casts wrongly produce a lvalue)
authorMarek Polacek <polacek@redhat.com>
Thu, 4 Jun 2015 08:17:45 +0000 (08:17 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Thu, 4 Jun 2015 08:17:45 +0000 (08:17 +0000)
commit9482b620d208237366e9d052918757cc5c17f519
tree0ae98c0e9dd440292c437f415548e76661933de5
parent0b98bb4e15faed6a72fa9a0f27a6e973cb8e5e70
re PR c/66341 (Some casts wrongly produce a lvalue)

PR c/66341
* c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
it is a lvalue.

* gcc.dg/lvalue-8.c: New test.

From-SVN: r224115
gcc/c/ChangeLog
gcc/c/c-typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/lvalue-8.c [new file with mode: 0644]