On Thu, Jan 04, 2018 at 09:55:10AM +0100, Rainer Orth wrote: > Hi Nathan, > > > This fixes a tree dumping ICE involving static thunk fns. Copying the > > thunked-to fn's context suffices. > > the new test FAILs on Solaris/SPARC: > > FAIL: g++.dg/ipa/pr83667.C -std=gnu++11 scan-ipa-dump inline "summary for > void c::\\\\*.LTHUNK0" > FAIL: g++.dg/ipa/pr83667.C -std=gnu++14 scan-ipa-dump inline "summary for > void c::\\\\*.LTHUNK0" > FAIL: g++.dg/ipa/pr83667.C -std=gnu++98 scan-ipa-dump inline "summary for > void c::\\\\*.LTHUNK0" > > The dump has > > IPA function summary for void c::*.LLTHUNK0(...)/1
Note, it will also fail on all targets where TARGET_USE_LOCAL_THUNK_ALIAS_P isn't true. The reason it fails on solaris/sparc is: #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ sprintf ((LABEL), "*.L%s%lu", (PREFIX), (unsigned long)(NUM)) where it adds yet another L, unlike say standard config/elfos.h #define ASM_GENERATE_INTERNAL_LABEL(LABEL, PREFIX, NUM) \ do \ { \ char *__p; \ (LABEL)[0] = '*'; \ (LABEL)[1] = '.'; \ __p = stpcpy (&(LABEL)[2], PREFIX); \ sprint_ul (__p, (unsigned long) (NUM)); \ } \ while (0) Perhaps guard the test with a couple of selected targets known to have TARGET_USE_LOCAL_THUNK_ALIAS_P support as well as standard elfos.h ASM_GENERATE_INTERNAL_LABEL ? Jakub