https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82159
--- Comment #17 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Fri Oct 27 20:35:06 2017 New Revision: 254181 URL: https://gcc.gnu.org/viewcvs?rev=254181&root=gcc&view=rev Log: Backported from mainline 2017-10-12 Jakub Jelinek <ja...@redhat.com> PR c++/82159 * expr.c (store_field): Don't optimize away bitsize == 0 store from CALL_EXPR with addressable return type. * g++.dg/opt/pr82159-2.C: New test. Added: branches/gcc-7-branch/gcc/testsuite/g++.dg/opt/pr82159-2.C Modified: branches/gcc-7-branch/gcc/ChangeLog branches/gcc-7-branch/gcc/expr.c branches/gcc-7-branch/gcc/testsuite/ChangeLog