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/38661] [4.4 Regression] ICE: vector VEC(constructor_elt,base) push domain error, in build_constructors at tree-switch-conversion.c:450



------- Comment #2 from pinskia at gcc dot gnu dot org  2008-12-29 19:41 -------
I think I have a simple fix:
Index: ../../gcc/tree-switch-conversion.c
===================================================================
--- ../../gcc/tree-switch-conversion.c  (revision 142944)
+++ ../../gcc/tree-switch-conversion.c  (working copy)
@@ -440,9 +440,10 @@ build_constructors (gimple swtch)
        {
          gimple phi = gsi_stmt (gsi);
          tree val = PHI_ARG_DEF_FROM_EDGE (phi, e);
+         tree low = CASE_LOW (cs);
          pos = CASE_LOW (cs);

-         while (!tree_int_cst_lt (high, pos))
+         do 
            {
              constructor_elt *elt;

@@ -452,7 +453,7 @@ build_constructors (gimple swtch)
              elt->value = val;

              pos = int_const_binop (PLUS_EXPR, pos, integer_one_node, 0);
-           }
+           } while (!tree_int_cst_lt (high, pos) && tree_int_cst_lt (low,
pos));
          j++;
        }
     }


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pinskia at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED


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


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