------- Comment #5 from hp at gcc dot gnu dot org 2008-12-31 19:13 ------- Glancing at the assembly and simulator trace (no looking at rtl or tree dumps yet), the value of "p" (sp after the first alloca) is somehow lost and after the __builtin_longjmp we effectively strcmp (NULL, "test") which FWIW, doesn't SEGV in the simulator, but nevertheless obviously doesn't match. At the longjmp-receiver, "p" is retrieved for the strcmp call as "move.d [$sp+8],$r10", i.e. $r10 = *((char *) $sp + 8), but that's bogus as nothing was stored there; "move.d $sp,$r10" (just copying the stack-pointer) would have been correct.
I'll look further. HNY. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38609