On Fri, Aug 24, 2018 at 10:44:22AM +0000, Segher Boessenkool wrote: > There currently is nothing that prevents replacing the TOC_REGISTER in > a TOCREL unspec with something else, like a pseudo, or a memory ref. > This of course does not work. Fix that.
I backported this to 7 and 8 now. Segher > PR target/86989 > * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is > the TOC register.