https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80129
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Tue May 30 08:17:18 2017 New Revision: 248662 URL: https://gcc.gnu.org/viewcvs?rev=248662&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-5-branch/gcc/testsuite/g++.dg/torture/pr80129.C Modified: branches/gcc-5-branch/gcc/ChangeLog branches/gcc-5-branch/gcc/gimplify.c branches/gcc-5-branch/gcc/testsuite/ChangeLog