https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119614
--- Comment #22 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Note, I think the IPA-VRP gathered ranges are normally propagated to SSA_NAME_{RANGE,PTR}_INFO (for parameters of default defs of SSA_NAMEs for the PARM_DECLs, for return values into SSA_NAME on the lhs of the calls). This doesn't work in the tailc case because if the range is singleton like for volatile int v; [[gnu::noinline]] static int foo (int) { ++v; return 42; } int bar (int x) { if (!x) return 42; [[gnu::musttail]] return foo (0); } with -O2 -flto -flto-partition=max -shared -fpic, the call has no lhs and we just propagate 42 to where it was used. Unless there is some other pass that would consume this info, all the tailc needs is to have a tree somewhere, NULL_TREE for return types with unsupportable range, or for VARYING or anything that isn't singleton and the particular INTEGER_CST/REAL_CST if it is singleton. For non-LTO, ipa_return_value_range (val, callee) && val.singleton_p (&valr) is what worked for me because nothing drops that info after IPA. But nothing streams it out and back into LTRANS, so for LTO the info isn't available.