https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80973
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Thu Jun 22 11:13:29 2017 New Revision: 249510 URL: https://gcc.gnu.org/viewcvs?rev=249510&root=gcc&view=rev Log: Backported from mainline 2017-06-13 Jakub Jelinek <ja...@redhat.com> PR c++/80973 * cp-gimplify.c (cp_genericize_r): Don't instrument MEM_REF second argument even if it has REFERENCE_TYPE. * g++.dg/ubsan/pr80973.C: New test. Added: branches/gcc-6-branch/gcc/testsuite/g++.dg/ubsan/pr80973.C Modified: branches/gcc-6-branch/gcc/cp/ChangeLog branches/gcc-6-branch/gcc/cp/cp-gimplify.c branches/gcc-6-branch/gcc/testsuite/ChangeLog