On Mon, 15 Dec 2025, Jan Hubicka wrote: > > On Mon, 8 Dec 2025, Richard Biener wrote: > > > > > When we have a speculated edge but we folded the call to > > > __builtin_unreachable () then trying to update the cgraph ICEs > > > in resolve_speculation because there's no symtab node for > > > __builtin_unreachable (). Reject this resolving attempt similar > > > as to when the callees decl were NULL or it were not semantically > > > equivalent. > > > > > > I only have a LTRANS unit as testcase. > > > > > > I've LTO profilebootstrapped this with the config that reproduced > > > the error but I'm now doing a regular bootstrap/regtest as well. > > > > > > OK? > > > > Ping. > > Yes, this looks safe though somewhat symptomatic. > If symtab node is not present, calle_decl must be builtin which is a > result of folding, that is unlikely the call we speculate to. > > I tried to reproduce it with the config options given. configure fails > for me with: > > checking for exported symbols... ../gcc/configure: line 34602: -T: command > not found > yes > checking for -rdynamic... ../gcc/configure: line 34612: -T: command not found > no
That looks odd. > checking for library containing dlopen... (cached) none required > checking for -fPIC -shared... yes > configure: error: > Building GCC with plugin support requires a host that supports > -fPIC, -shared, -ldl and -rdynamic. > > Will need to look into that. > > What seems to be happening is that while inlining we are able to > constant fold the call to __builtin_unreachable (based on inconsistent > type of the OBJ_TYPE_REF and the instance) which we are not able to do > at WPA time. Would be nice to understand when and why that happens. Yes, that's how far I have analyzed it (folding during inlining turning the call to __builtin_unreachable). I suppose the attached LTRANS unit isn't enough to figure what goes missing at WPA. comment#24 lists what I did to produce the LTRANS file, IIRC I reproduced on alberti. I'll push the patch to unblock package builds, so remember to revert if you want to investigate further. Richard. > Honza > -- Richard Biener <[email protected]> SUSE Software Solutions Germany GmbH, Frankenstrasse 146, 90461 Nuernberg, Germany; GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman; HRB 36809 (AG Nuernberg)
