http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56982



--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-04-16 
16:04:10 UTC ---

At RTL time (besides it being a pessimization), the thing is that _3 is

assigned a pseudo (compared to before the change, where it had only a single

use and thus has been TERed), that pseudo is initialized from *e, and

initialized to 1 in the bb where the PHI had 1, and the pseudo is spilled to

the stack.  So it will initially contain the 0 value (correct), then that is

overwritten with 1 (fine for the first setjmp returning case), but when setjmp

returns second time, the value is still 1 rather than 0.



So the questions are:

- is it desirable that uncprop does anything to SSA_NAME_VAR == NULL phis?

- shouldn't something like that be not performed if current function calls

setjmp (or more narrowly, if there is a returns twice function somewhere in

between the considered setter and user)?

- what other optimizations might be similarly problematic across returns twice

calls?

Reply via email to