https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91173
--- Comment #6 from Matthew Beliveau <mbelivea at gcc dot gnu.org> --- Author: mbelivea Date: Tue Jul 23 15:52:48 2019 New Revision: 273740 URL: https://gcc.gnu.org/viewcvs?rev=273740&root=gcc&view=rev Log: PR rtl-optimization/91173 Backported from mainline 2019-07-16 Jeff Law <l...@redhat.com> PR rtl-optimization/91173 * tree-ssa-address.c (addr_for_mem_ref): If the base is an SSA_NAME with a constant value, fold its value into the offset and clear the base before calling gen_addr_rtx. * g++.dg/pr91173.C: New test. Added: branches/gcc-8-branch/gcc/testsuite/g++.dg/pr91173.C Modified: branches/gcc-8-branch/gcc/ChangeLog branches/gcc-8-branch/gcc/tree-ssa-address.c