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/82389] [8 Regression] ICE on valid code on x86_64-linux-gnu: Segmentation fault


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82389

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
So the fix is very easy:
--- gcc/tree-ssa-dse.c.jj       2017-09-29 23:05:40.000000000 +0200
+++ gcc/tree-ssa-dse.c  2017-10-02 10:40:21.962488571 +0200
@@ -577,10 +577,10 @@ dse_classify_store (ao_ref *ref, gimple
          /* If the statement is a use the store is not dead.  */
          else if (ref_maybe_used_by_stmt_p (use_stmt, ref))
            {
-             /* Handle common cases where we can easily build a ao_ref
+             /* Handle common cases where we can easily build an ao_ref
                 structure for USE_STMT and in doing so we find that the
                 references hit non-live bytes and thus can be ignored.  */
-             if (live_bytes && (!gimple_vdef (use_stmt) || !temp))
+             if (byte_tracking_enabled && (!gimple_vdef (use_stmt) || !temp))
                {
                  if (is_gimple_assign (use_stmt))
                    {
But I want to also think about overflows in the case where ref has small size
(otherwise byte_tracking_enabled is false), but use_ref has huge size.

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