https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80129
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Fri May 5 21:42:51 2017 New Revision: 247688 URL: https://gcc.gnu.org/viewcvs?rev=247688&root=gcc&view=rev Log: Backported from mainline 2017-03-22 Jakub Jelinek <ja...@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. Added: branches/gcc-6-branch/gcc/testsuite/g++.dg/torture/pr80129.C Modified: branches/gcc-6-branch/gcc/ChangeLog branches/gcc-6-branch/gcc/gimplify.c branches/gcc-6-branch/gcc/testsuite/ChangeLog