Blame SOURCES/gcc32-rh226706.patch

4ac4fd
2007-02-13  Alexandre Oliva  <aoliva@redhat.com>
4ac4fd
4ac4fd
	* reload1.c (fixup_abnormal_edges): Backport relevant portion of
4ac4fd
	fix for PR rtl-optimization/23601.
4ac4fd
4ac4fd
	* g++.dg/eh/bz226706.C: New
4ac4fd
4ac4fd
--- gcc/reload1.c	2006-10-13 04:32:14.000000000 -0300
4ac4fd
+++ gcc/reload1.c	2007-02-13 03:22:08.000000000 -0200
4ac4fd
@@ -9524,7 +9524,10 @@ fixup_abnormal_edges ()
4ac4fd
 		 && insn != bb->head)
4ac4fd
 	    insn = PREV_INSN (insn);
4ac4fd
 	  if (GET_CODE (insn) != CALL_INSN && !can_throw_internal (insn))
4ac4fd
-	    abort ();
4ac4fd
+	    {
4ac4fd
+	      purge_dead_edges (bb);
4ac4fd
+	      continue;
4ac4fd
+	    }
4ac4fd
 	  bb->end = insn;
4ac4fd
 	  inserted = true;
4ac4fd
 	  insn = NEXT_INSN (insn);
4ac4fd
--- gcc/testsuite/g++.dg/eh/bz226706.C	1970-01-01 00:00:00.000000000 +0000
4ac4fd
+++ gcc/testsuite/g++.dg/eh/bz226706.C	2007-02-13 03:30:16.000000000 -0200
4ac4fd
@@ -0,0 +1,13 @@
4ac4fd
+/* { dg-do compile } */
4ac4fd
+/* { dg-options "-fnon-call-exceptions -fPIC -O2" } */
4ac4fd
+
4ac4fd
+void foo() {
4ac4fd
+     try {
4ac4fd
+        float y = 10;
4ac4fd
+        while (y > 0) {
4ac4fd
+            double z = (y / 10);
4ac4fd
+            y = z;
4ac4fd
+        }
4ac4fd
+     }
4ac4fd
+     catch (...) {}
4ac4fd
+}