https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113466
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rguenth at gcc dot gnu.org --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- The question is what we can do about it. bitint_large_huge::lower_call wants for the large/huge BITINT_TYPE SSA_NAME call arguments (with the exception of uninitialized ones) add a load before the call, which loads the argument from some VAR_DECL or PARM_DECL etc. And the CFG requirements for returns_twice calls is that there is an abnormal edge from the .ABNORMAL_DISPATCHER block to the start of the call, so we can't insert anything before the call. Now, in fixes like PR109410 this was easy because reassoc is adding those statements to the start of the function, so we can easily split the ENTRY -> bb2 edge and insert stuff there. But here it is much more complicated. In the easier case, we have just one EDGE_FALLTHRU predecessor edge plus the EDGE_ABNORMAL edge. I guess we can in that case insert on that EDGE_FALLTHRU edge, but then there is a question if one can just use the SSA_NAME in the return argument or not. If there is just one call like in the #c0 case, that is most likely the case, but what about say: void foo (_BitInt(6321)) __attribute__((returns_twice)); void baz (void); void bar (_BitInt(6321) x) { foo (x); baz (); foo (x + 1); baz (); } One can insert the load from x on the entry edge because that dominates the .ABNORMAL_DISPATCHER bb, but guess for the _1 (x + 1) load we need some PHI and it isn't clear to me what to use on the edge from the abnormal dispatcher (and whether to use some PHI on the .ABNORMAL_DISPATCHER bb as well). And, if the bb with returns_twice call contains multiple predecessor edges and even worse say next to the .ABNORMAL_DISPATCHER abnormal edge some EDGE_EH or similar incoming edges, probably need to add some bb before the returns_twice bb but then no idea what to do with PHIs etc. Or we could for the time being just sorry on returns_twice calls with large/huge _BitInt arguments.