This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix hang in inline_small_functions (PR ipa/84425)


On 02/16/2018 03:49 PM, Jakub Jelinek wrote:
> Hi!
> 
> When debugging a wrong-code in miniruby on aarch64, I've noticed a hang
> in inline_small_functions when adding __attribute__((optimize(0)))
> to one of the functions.
> 
> I don't know what exactly the code is doing, but it feels like a typo for
> me, at least I'd expect the intent is for n2 to walk the whole chain,
> rather than just the first 2 elements of it and then hope something changes
> the ((struct ipa_dfs_info *) node->aux)->next_cycle to something different,
> when the loop body is
>                   if (opt_for_fn (n2->decl, optimize))
>                     {
>                       struct ipa_fn_summary *info2 = ipa_fn_summaries->get (n2);
>                       if (info2->scc_no)
>                         break;
>                       info2->scc_no = id;
>                     }
> and so for some n2's isn't doing anything and at least the method name get
> doesn't suggest it would update something.
> While the regression on this testcase is recent, I think the bug is latent
> since 2012 when this code has been introduced.
> 
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
> 
> 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.
Looks like a typo to me too.

OK.
jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]