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
+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>
PR target/29006
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. */
+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>
PR target/29006
--- /dev/null
+/* { 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;
+}
+