]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR rtl-optimization/85431 (UBSAN: ../../gcc/dse.c:303:15: runtime error...
authorJakub Jelinek <jakub@redhat.com>
Fri, 22 Jun 2018 21:11:28 +0000 (23:11 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 22 Jun 2018 21:11:28 +0000 (23:11 +0200)
Backported from mainline
2018-04-17  Jakub Jelinek  <jakub@redhat.com>

PR rtl-optimization/85431
* dse.c (record_store): Ignore zero width stores.

From-SVN: r261955

gcc/ChangeLog
gcc/dse.c

index 52232caf7a143ca3d9b584da36e3ccf2b5dc4dba..6be713635848e3e1e3049240394e42923f8229b8 100644 (file)
@@ -3,6 +3,9 @@
        Backported from mainline
        2018-04-17  Jakub Jelinek  <jakub@redhat.com>
 
+       PR rtl-optimization/85431
+       * dse.c (record_store): Ignore zero width stores.
+
        PR target/85430
        * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
 
index f87dd50024e8ba17c7c9deca9f127a042f954094..174865bbc40bc0243406aad65514c32474b6dbba 100644 (file)
--- a/gcc/dse.c
+++ b/gcc/dse.c
@@ -1342,6 +1342,9 @@ record_store (rtx body, bb_info_t bb_info)
   else
     width = GET_MODE_SIZE (GET_MODE (mem));
 
+  if (width == 0)
+    return 0;
+
   if (group_id >= 0)
     {
       /* In the restrictive case where the base is a constant or the