diff options
author | Steven Bosscher <steven@gcc.gnu.org> | 2006-09-10 20:08:58 +0000 |
---|---|---|
committer | Steven Bosscher <steven@gcc.gnu.org> | 2006-09-10 20:08:58 +0000 |
commit | 4fe337f67a76d1b8288a3c63dec86dbaed77da4c (patch) | |
tree | 2a5c9f6b9fe4b4a6d75c7244076cbbdc460f588c /gcc/builtins.c | |
parent | 9226543b679c84014627a7bdec0503061b3af43d (diff) | |
download | gcc-4fe337f67a76d1b8288a3c63dec86dbaed77da4c.zip gcc-4fe337f67a76d1b8288a3c63dec86dbaed77da4c.tar.gz gcc-4fe337f67a76d1b8288a3c63dec86dbaed77da4c.tar.bz2 |
re PR middle-end/26983 (Missing label with builtin_setjmp/longjmp)
PR middle-end/26983
gcc/
* builtins.c (expand_builtin_setjmp): Force next_lab to be
preserved.
testsuite/
* gcc.dg/pr26983.c: New test.
From-SVN: r116826
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r-- | gcc/builtins.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c index 1f62dca..5bcba14 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -760,6 +760,12 @@ expand_builtin_setjmp (tree arglist, rtx target) emit_label (next_lab); + /* Because setjmp and longjmp are not represented in the CFG, a cfgcleanup + may find that the basic block starting with NEXT_LAB is unreachable. + The whole block, along with NEXT_LAB, would be removed (see PR26983). + Make sure that never happens. */ + LABEL_PRESERVE_P (next_lab) = 1; + expand_builtin_setjmp_receiver (next_lab); /* Set TARGET to one. */ |