re PR rtl-optimization/85431 (UBSAN: ../../gcc/dse.c:303:15: runtime error: shift...
authorJakub Jelinek <jakub@redhat.com>
Tue, 17 Apr 2018 21:38:45 +0000 (23:38 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 17 Apr 2018 21:38:45 +0000 (23:38 +0200)
PR rtl-optimization/85431
* dse.c (record_store): Ignore zero width stores.

From-SVN: r259448

gcc/ChangeLog
gcc/dse.c

index cce4d3d..1fba2d9 100644 (file)
@@ -1,5 +1,8 @@
 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
 
+       PR rtl-optimization/85431
+       * dse.c (record_store): Ignore zero width stores.
+
        PR sanitizer/85230
        * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
        __asan_allocas_unpoison call and last_alloca_addr = new_sp before
index 1ef8f64..26c6007 100644 (file)
--- a/gcc/dse.c
+++ b/gcc/dse.c
@@ -1417,6 +1417,9 @@ record_store (rtx body, bb_info_t bb_info)
       return 0;
     }
 
+  if (known_eq (width, 0))
+    return 0;
+
   if (group_id >= 0)
     {
       /* In the restrictive case where the base is a constant or the