]> git.ipfire.org Git - thirdparty/gcc.git/commit
backport: re PR c++/80129 (wrong code with ternary struct assignment to const)
authorJakub Jelinek <jakub@redhat.com>
Tue, 30 May 2017 08:17:18 +0000 (10:17 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 30 May 2017 08:17:18 +0000 (10:17 +0200)
commit108358c7692648b5d4b84ed0877504a208bf5034
tree7fa10e193aa6904a7374844b7b747c56dfae600b
parent61384973125cc0c0c530a2e696cb14deb261931e
backport: re PR c++/80129 (wrong code with ternary struct assignment to const)

Backported from mainline
2017-03-22  Jakub Jelinek  <jakub@redhat.com>

PR c++/80129
* gimplify.c (gimplify_modify_expr_rhs) <case COND_EXPR>: Clear
TREE_READONLY on result if writing it more than once.

* g++.dg/torture/pr80129.C: New test.

From-SVN: r248662
gcc/ChangeLog
gcc/gimplify.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/torture/pr80129.C [new file with mode: 0644]