+2013-05-06 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/57147
+ * tree-cfg.c (gimple_purge_dead_abnormal_call_edges): If
+ the edge is also fallthru, preserve it and just clear the
+ abnormal flag.
+ * tree-cfgcleanup.c (remove_fallthru_edge): If the edge is
+ also complex, preserve that and just clear the fallthru flag.
+ * tree-inline.c (update_ssa_across_abnormal_edges): Also
+ update virtual operands.
+
2013-05-06 Alan Modra <amodra@gmail.com>
* config/rs6000/linux.h (DEFAULT_ASM_ENDIAN): Define.
+2013-05-06 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/57147
+ * gcc.dg/torture/pr57147-1.c: New testcase.
+ * gcc.dg/torture/pr57147-2.c: Likewise.
+ * gcc.dg/torture/pr57147-3.c: Likewise.
+
2013-05-06 Oleg Endo <olegendo@gcc.gnu.org>
PR target/55303
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-fdump-tree-optimized" } */
+/* { dg-skip-if "" { *-*-* } { "-fno-fat-lto-objects" } { "" } } */
+
+struct __jmp_buf_tag {};
+typedef struct __jmp_buf_tag jmp_buf[1];
+extern int _setjmp (struct __jmp_buf_tag __env[1]);
+
+jmp_buf g_return_jmp_buf;
+
+void SetNaClSwitchExpectations (void)
+{
+}
+void TestSyscall(void)
+{
+ SetNaClSwitchExpectations();
+ _setjmp (g_return_jmp_buf);
+}
+
+/* { dg-final { scan-tree-dump-not "builtin_unreachable" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-fdump-tree-optimized" } */
+/* { dg-skip-if "" { *-*-* } { "-fno-fat-lto-objects" } { "" } } */
+
+struct __jmp_buf_tag {};
+typedef struct __jmp_buf_tag jmp_buf[1];
+extern int _setjmp (struct __jmp_buf_tag __env[1]);
+
+jmp_buf g_return_jmp_buf;
+
+void SetNaClSwitchExpectations (void)
+{
+ __builtin_longjmp (g_return_jmp_buf, 1);
+}
+void TestSyscall(void)
+{
+ SetNaClSwitchExpectations();
+ _setjmp (g_return_jmp_buf);
+}
+
+/* { dg-final { scan-tree-dump "setjmp" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
--- /dev/null
+/* { dg-do compile } */
+
+typedef char * ptr_t;
+struct __jmp_buf_tag {
+};
+typedef struct __jmp_buf_tag sigjmp_buf[1];
+sigjmp_buf GC_jmp_buf;
+void GC_fault_handler(int sig)
+{
+}
+void GC_setup_temporary_fault_handler() {
+ GC_set_and_save_fault_handler(GC_fault_handler);
+}
+ptr_t GC_find_limit(ptr_t p)
+{
+ GC_setup_temporary_fault_handler();
+ if (__sigsetjmp (GC_jmp_buf, 1) == 0)
+ for (;;)
+ ;
+}
{
if (e->flags & EDGE_ABNORMAL)
{
- remove_edge_and_dominated_blocks (e);
+ if (e->flags & EDGE_FALLTHRU)
+ e->flags &= ~EDGE_ABNORMAL;
+ else
+ remove_edge_and_dominated_blocks (e);
changed = true;
}
else
FOR_EACH_EDGE (e, ei, ev)
if ((e->flags & EDGE_FALLTHRU) != 0)
{
- remove_edge_and_dominated_blocks (e);
+ if (e->flags & EDGE_COMPLEX)
+ e->flags &= ~EDGE_FALLTHRU;
+ else
+ remove_edge_and_dominated_blocks (e);
return true;
}
return false;
gcc_assert ((e->flags & EDGE_EH)
|| SSA_NAME_OCCURS_IN_ABNORMAL_PHI (PHI_RESULT (phi)));
- if (virtual_operand_p (PHI_RESULT (phi)))
- {
- mark_virtual_operands_for_renaming (cfun);
- continue;
- }
-
re = find_edge (ret_bb, e->dest);
- gcc_assert (re);
+ gcc_checking_assert (re);
gcc_assert ((re->flags & (EDGE_EH | EDGE_ABNORMAL))
== (e->flags & (EDGE_EH | EDGE_ABNORMAL)));