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
This commit is contained in:
parent
9226543b67
commit
4fe337f67a
@ -1,3 +1,9 @@
|
|||||||
|
2006-09-10 Steven Bosscher <steven@gcc.gnu.org>
|
||||||
|
|
||||||
|
PR middle-end/26983
|
||||||
|
* builtins.c (expand_builtin_setjmp): Force next_lab to be
|
||||||
|
preserved.
|
||||||
|
|
||||||
2006-09-10 Richard Sandiford <richard@codesourcery.com>
|
2006-09-10 Richard Sandiford <richard@codesourcery.com>
|
||||||
|
|
||||||
PR target/29006
|
PR target/29006
|
||||||
|
@ -760,6 +760,12 @@ expand_builtin_setjmp (tree arglist, rtx target)
|
|||||||
|
|
||||||
emit_label (next_lab);
|
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);
|
expand_builtin_setjmp_receiver (next_lab);
|
||||||
|
|
||||||
/* Set TARGET to one. */
|
/* Set TARGET to one. */
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2006-09-10 Steven Bosscher <steven@gcc.gnu.org>
|
||||||
|
|
||||||
|
PR middle-end/26983
|
||||||
|
* gcc.dg/pr26983.c: New test.
|
||||||
|
|
||||||
2006-09-10 Richard Sandiford <richard@codesourcery.com>
|
2006-09-10 Richard Sandiford <richard@codesourcery.com>
|
||||||
|
|
||||||
PR target/29006
|
PR target/29006
|
||||||
|
19
gcc/testsuite/gcc.dg/pr26983.c
Normal file
19
gcc/testsuite/gcc.dg/pr26983.c
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
/* { dg-do link } */
|
||||||
|
|
||||||
|
/* This used to cause a linker failure because GCC would output
|
||||||
|
assembler code referencing labels that it had not output. */
|
||||||
|
|
||||||
|
void *jmpbuf[6];
|
||||||
|
|
||||||
|
void
|
||||||
|
foo (void)
|
||||||
|
{
|
||||||
|
__builtin_setjmp (jmpbuf);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
main (void)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user