]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR ipa/84425 (Hang in ipa-inline.c starting with r250048)
authorJakub Jelinek <jakub@redhat.com>
Fri, 16 Feb 2018 23:05:00 +0000 (00:05 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 16 Feb 2018 23:05:00 +0000 (00:05 +0100)
PR ipa/84425
* ipa-inline.c (inline_small_functions): Fix a typo.

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

From-SVN: r257772

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

index a2199d9e1178a4448bb1ad5242ab7c97b220fe21..f41bb401377fd945b758f0e8c0afe60b3c4a0259 100644 (file)
@@ -1,3 +1,8 @@
+2018-02-16  Jakub Jelinek  <jakub@redhat.com>
+
+       PR ipa/84425
+       * ipa-inline.c (inline_small_functions): Fix a typo.
+
 2018-02-16  Nathan Sidwell  <nathan@acm.org>
 
        * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
index f56a1a69107c703fd942d43f7f4b62bc7ef4487a..b7f213f2eb70861685355233c51a6f0d85cbbd1f 100644 (file)
@@ -1782,7 +1782,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)
                  if (opt_for_fn (n2->decl, optimize))
                    {
                      struct ipa_fn_summary *info2 = ipa_fn_summaries->get (n2);
index 79259637f213eab6727a4105b4074d8e26a68780..9a156a6abb5be32ec7cc39910d040fce0fcdd5be 100644 (file)
@@ -1,3 +1,8 @@
+2018-02-16  Jakub Jelinek  <jakub@redhat.com>
+
+       PR ipa/84425
+       * gcc.c-torture/compile/pr84425.c: New test.
+
 2018-02-16  Marek Polacek  <polacek@redhat.com>
            Jakub Jelinek  <jakub@redhat.com>
 
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);
+}