]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR ipa/84425 (Hang in ipa-inline.c starting with r250048)
authorJakub Jelinek <jakub@redhat.com>
Mon, 25 Jun 2018 17:22:32 +0000 (19:22 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 25 Jun 2018 17:22:32 +0000 (19:22 +0200)
Backported from mainline
2018-02-16  Jakub Jelinek  <jakub@redhat.com>

PR ipa/84425
* ipa-inline.c (inline_small_functions): Fix a typo.

* gcc.c-torture/compile/pr84425.c: New test.

From-SVN: r262064

gcc/ChangeLog
gcc/ipa-inline.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr84425.c [new file with mode: 0644]

index 88eabb9420ba4a96911bf4de65830283da5886a1..fb2454f7e3146b7f3c514bb677c4ede914ef0984 100644 (file)
@@ -1,6 +1,11 @@
 2018-06-25  Jakub Jelinek  <jakub@redhat.com>
 
        Backported from mainline
+       2018-02-16  Jakub Jelinek  <jakub@redhat.com>
+
+       PR ipa/84425
+       * ipa-inline.c (inline_small_functions): Fix a typo.
+
        2018-02-13  Jakub Jelinek  <jakub@redhat.com>
 
        PR c/82210
index 83f772949118d5c71b2147d8de5c4098ec0e5cb6..ab94499c9dcf9c5193b0fb72c3841e9c3f519ab1 100644 (file)
@@ -1771,7 +1771,7 @@ inline_small_functions (void)
                struct cgraph_node *n2;
                int id = dfs->scc_no + 1;
                for (n2 = node; n2;
-                    n2 = ((struct ipa_dfs_info *) node->aux)->next_cycle)
+                    n2 = ((struct ipa_dfs_info *) n2->aux)->next_cycle)
                  {
                    struct inline_summary *info2 = inline_summaries->get (n2);
                    if (info2->scc_no)
index 029e88d43fed2e04665b78919710a357b053063d..1063fa095dffafbbf7ef6e50bd7c1ac59aa8a3fe 100644 (file)
@@ -1,6 +1,11 @@
 2018-06-25  Jakub Jelinek  <jakub@redhat.com>
 
        Backported from mainline
+       2018-02-16  Jakub Jelinek  <jakub@redhat.com>
+
+       PR ipa/84425
+       * gcc.c-torture/compile/pr84425.c: New test.
+
        2018-02-13  Jakub Jelinek  <jakub@redhat.com>
 
        PR c/82210
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr84425.c b/gcc/testsuite/gcc.c-torture/compile/pr84425.c
new file mode 100644 (file)
index 0000000..5d3d325
--- /dev/null
@@ -0,0 +1,17 @@
+/* PR ipa/84425 */
+
+void bar (int);
+
+void
+foo (int x)
+{
+  if (x < 5)
+    bar (x);
+}
+
+__attribute__((optimize(0))) void
+bar (int x)
+{
+  if (x > 10)
+    foo (x);
+}