------- Comment #39 from vmakarov at redhat dot com 2009-01-21 15:39 ------- Yes, right. I should have read the standard itself (not gcc manual which states "ISO C says that automatic variables that are not declared `volatile' have undefined values after a `longjmp'"). That is good that Andrew checked and posted what the current standard saying about setjmps.
So the code is actually valid and it is an IRA bug. Working on the PR, I found that GCC even guarantees that modified local variable will have the right values after longjmp because GCC always puts pseudos intersected setjmps on the stack. Probably it is the safest behaviour. In any way the patch solving the PR is ready and I'll submit it today after checking bootstraps on a few machines. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38587