2010-12-07 Jakub Jelinek <jakub@redhat.com>
Backport from mainline
+ 2010-11-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/46440
+ * combine.c (update_cfg_for_uncondjump): When changing
+ an indirect jump into unconditional jump, remove BARRIERs
+ from bb's footer.
+
2010-11-16 Jakub Jelinek <jakub@redhat.com>
PR c++/46401
delete_insn (insn);
if (at_end && EDGE_COUNT (bb->succs) == 1)
- single_succ_edge (bb)->flags |= EDGE_FALLTHRU;
+ {
+ rtx insn;
+
+ single_succ_edge (bb)->flags |= EDGE_FALLTHRU;
+
+ /* Remove barriers from the footer if there are any. */
+ for (insn = bb->il.rtl->footer; insn; insn = NEXT_INSN (insn))
+ if (BARRIER_P (insn))
+ {
+ if (PREV_INSN (insn))
+ NEXT_INSN (PREV_INSN (insn)) = NEXT_INSN (insn);
+ else
+ bb->il.rtl->footer = NEXT_INSN (insn);
+ if (NEXT_INSN (insn))
+ PREV_INSN (NEXT_INSN (insn)) = PREV_INSN (insn);
+ }
+ else if (LABEL_P (insn))
+ break;
+ }
}
2010-12-07 Jakub Jelinek <jakub@redhat.com>
Backport from mainline
+ 2010-11-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/46440
+ * gcc.dg/pr46440.c: New test.
+
2010-11-16 Jakub Jelinek <jakub@redhat.com>
PR c++/46401
--- /dev/null
+/* PR rtl-optimization/46440 */
+/* { dg-do compile } */
+/* { dg-options "-O -fstack-protector -fno-tree-dominator-opts -fno-tree-fre" } */
+/* { dg-require-effective-target fstack_protector } */
+
+int i;
+
+void bar (char *);
+
+void
+foo (void)
+{
+ void *l;
+ char c[64];
+ bar (c);
+ i = 1;
+ if (i)
+ l = &&l1;
+ else
+ l = &&l2;
+ goto *l;
+l2:
+ __builtin_abort ();
+l1:;
+}