This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/26781] [4.2 Regression] ICE in tree-ssa-pre.c at create_component_ref_by_piec



------- Comment #11 from malitzke at metronets dot com  2006-03-21 18:26 -------
While I have your attention I would propose this more comprehensive patch:

--- tree-ssa-pre.org.c  2006-03-21 12:55:12.000000000 -0500
+++ tree-ssa-pre.c      2006-03-21 13:11:36.000000000 -0500
@@ -2192,11 +2192,10 @@
       tree found = bitmap_find_leader (AVAIL_OUT (block), expr);
       if (found)
        return found;
+      else
+        genop = VALUE_HANDLE_EXPR_SET (expr)->head->expr;
     }

-  if (TREE_CODE (genop) == VALUE_HANDLE)
-    genop = VALUE_HANDLE_EXPR_SET (expr)->head->expr;
-
   switch TREE_CODE (genop)
     {
     case ARRAY_REF:
@@ -2219,6 +2218,7 @@
                              op2, op3);
        return folded;
       }
+      break;
     case COMPONENT_REF:
       {
        tree op0;
@@ -2246,6 +2246,7 @@
     case PARM_DECL:
     case RESULT_DECL:
     case SSA_NAME:
+    case STRING_CST:
       return genop;
     default:
       gcc_unreachable ();      

It contains Andy's plus one simplifying patch and a break for consistency. The
consistency one could be invalidated via side effects from bitmap_find_leader. 
I am am presently rebootstrapping (cc, c++, fortran, objc, java) to verify to
the best of my ability.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26781


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]