https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80973
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Wed Jun 21 22:15:55 2017 New Revision: 249479 URL: https://gcc.gnu.org/viewcvs?rev=249479&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-7-branch/gcc/testsuite/g++.dg/ubsan/pr80973.C Modified: branches/gcc-7-branch/gcc/cp/ChangeLog branches/gcc-7-branch/gcc/cp/cp-gimplify.c branches/gcc-7-branch/gcc/testsuite/ChangeLog