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/30840] [4.3 Regression] ice for legal code with flags -O3 -fno-strict-aliasing



------- Comment #5 from rguenth at gcc dot gnu dot org  2007-02-19 12:56 -------
We can also simply check before the fact like

Index: tree-ssa-ccp.c
===================================================================
*** tree-ssa-ccp.c      (revision 122127)
--- tree-ssa-ccp.c      (working copy)
*************** visit_assignment (tree stmt, tree *outpu
*** 1212,1218 ****
          && operand_equal_p (nval->mem_ref, rhs, 0))
        val = *nval;
        else
!       val = evaluate_stmt (stmt);
      }
    else
      /* Evaluate the statement.  */
--- 1212,1226 ----
          && operand_equal_p (nval->mem_ref, rhs, 0))
        val = *nval;
        else
!       {
!         val = evaluate_stmt (stmt);
!         /* We need to be careful not to drop back to UNDEFINED from
!            VARYING.  This can happen because we only re-process the
!            first virtual operand of a store.  */
!         if (val.lattice_val == UNDEFINED
!             && get_value (lhs)->lattice_val > UNDEFINED)
!           val.lattice_val = VARYING;
!       }
      }
    else
      /* Evaluate the statement.  */

still not simulating the ssa edges for the other virtual operands does not
seem to be the best approach.


-- 


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


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