> 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 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. Honza
