]> 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>
Mon, 25 Jun 2018 17:48:47 +0000 (19:48 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 25 Jun 2018 17:48:47 +0000 (19:48 +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: r262097

gcc/ChangeLog
gcc/dse.c

index c204f20647ab7ce3a22c915aa2e7c3b5d133bd5f..6bafb746d894a50fee15281ba20f884b20c270ef 100644 (file)
@@ -1,6 +1,11 @@
 2018-06-25  Jakub Jelinek  <jakub@redhat.com>
 
        Backported from mainline
+       2018-04-17  Jakub Jelinek  <jakub@redhat.com>
+
+       PR rtl-optimization/85431
+       * dse.c (record_store): Ignore zero width stores.
+
        2018-04-10  Jakub Jelinek  <jakub@redhat.com>
 
        PR rtl-optimization/85300
index 48046ca46485eca9d265d90aed1e93150cf48a45..4eddcd1cf2afd38650a5cef02bf51a0a0365a5c1 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