re PR target/84014 (ICE in setup_min_max_allocno_live_range_point, at ira-build.c...
authorVladimir Makarov <vmakarov@redhat.com>
Wed, 24 Jan 2018 19:45:55 +0000 (19:45 +0000)
committerVladimir Makarov <vmakarov@gcc.gnu.org>
Wed, 24 Jan 2018 19:45:55 +0000 (19:45 +0000)
2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>

PR target/84014
* ira-build.c (setup_min_max_allocno_live_range_point): Set up
min/max for never referenced object.

2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>

PR target/84014
* gcc.target/powerpc/pr84014.c: New.

From-SVN: r257029

gcc/ChangeLog
gcc/ira-build.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/powerpc/pr84014.c [new file with mode: 0644]

index e52ca7c3d6c07620b2c476d2c5677ab0bbc6ed79..c7b0d8e729a56710724f47c0d849e7a509594c17 100644 (file)
@@ -1,3 +1,9 @@
+2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
+
+       PR target/84014
+       * ira-build.c (setup_min_max_allocno_live_range_point): Set up
+       min/max for never referenced object.
+
 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
 
        PR middle-end/83977
index 9ece3ae1d949de380eab0a4c5795dc45d25212f1..c0fd9384f8bcfe1b17ba00f566863c17a720ef3e 100644 (file)
@@ -2728,7 +2728,13 @@ setup_min_max_allocno_live_range_point (void)
            ira_object_t parent_obj;
 
            if (OBJECT_MAX (obj) < 0)
-             continue;
+             {
+               /* The object is not used and hence does not live.  */
+               ira_assert (OBJECT_LIVE_RANGES (obj) == NULL);
+               OBJECT_MAX (obj) = 0;
+               OBJECT_MIN (obj) = 1;
+               continue;
+             }
            ira_assert (ALLOCNO_CAP_MEMBER (a) == NULL);
            /* Accumulation of range info.  */
            if (ALLOCNO_CAP (a) != NULL)
index e0ee6b0a4385b90838cf40ae6a4ad04ff7796765..8f6d434b3f9877cc5354e6b1c313f1e3784b225c 100644 (file)
@@ -1,3 +1,8 @@
+2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
+
+       PR target/84014
+       * gcc.target/powerpc/pr84014.c: New.
+
 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
 
        PR middle-end/83977
diff --git a/gcc/testsuite/gcc.target/powerpc/pr84014.c b/gcc/testsuite/gcc.target/powerpc/pr84014.c
new file mode 100644 (file)
index 0000000..aab0e97
--- /dev/null
@@ -0,0 +1,20 @@
+/* { dg-do compile { target powerpc*-*-* } }*/
+/* { dg-options "-O1 -fno-split-wide-types -m32 -mcpu=e300c3" } */
+
+int
+nh (void)
+{
+}
+
+long long int
+si (void)
+{
+}
+
+int
+xf (int fg)
+{
+  int y5 = nh ();
+  fg += !!y5 ? y5 : si ();
+  return fg;
+}