https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88410
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Tue Jan 8 10:22:44 2019 New Revision: 267710 URL: https://gcc.gnu.org/viewcvs?rev=267710&root=gcc&view=rev Log: Backported from mainline 2018-12-17 Jakub Jelinek <ja...@redhat.com> PR c++/88410 * cp-gimplify.c (cp_fold) <case ADDR_EXPR>: For offsetof-like folding, call maybe_constant_value on val to see if it is INTEGER_CST. * g++.dg/cpp0x/pr88410.C: New test. Added: branches/gcc-8-branch/gcc/testsuite/g++.dg/cpp0x/pr88410.C Modified: branches/gcc-8-branch/gcc/cp/ChangeLog branches/gcc-8-branch/gcc/cp/cp-gimplify.c branches/gcc-8-branch/gcc/testsuite/ChangeLog