From e0fc29fc5fae6385ff238d5e3c2dadabac5dbba3 Mon Sep 17 00:00:00 2001 From: jakub Date: Fri, 16 Feb 2018 23:05:00 +0000 Subject: [PATCH] PR ipa/84425 * ipa-inline.c (inline_small_functions): Fix a typo. * gcc.c-torture/compile/pr84425.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257772 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/ipa-inline.c | 2 +- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.c-torture/compile/pr84425.c | 17 +++++++++++++++++ 4 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.c-torture/compile/pr84425.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a2199d9e117..f41bb401377 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-02-16 Jakub Jelinek + + PR ipa/84425 + * ipa-inline.c (inline_small_functions): Fix a typo. + 2018-02-16 Nathan Sidwell * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'. diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index f56a1a69107..b7f213f2eb7 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -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); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 79259637f21..9a156a6abb5 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-02-16 Jakub Jelinek + + PR ipa/84425 + * gcc.c-torture/compile/pr84425.c: New test. + 2018-02-16 Marek Polacek Jakub Jelinek diff --git a/gcc/testsuite/gcc.c-torture/compile/pr84425.c b/gcc/testsuite/gcc.c-torture/compile/pr84425.c new file mode 100644 index 00000000000..5d3d325aa23 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr84425.c @@ -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); +} -- 2.11.4.GIT