On Thu, Jan 2, 2020 at 10:04 AM Martin Liška <mli...@suse.cz> wrote:
>
> Hi.
>
> The patch is about using Optimization for warn_inline as
> it's affected by -O0.
>
> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
>
> Ready to be installed?

Err - Optimization also lists it in some -help section?  It's a Warning
option and certainly we don't handle per-function Warnings in general
(with LTO) even though we have #pragma GCC diagnostic, no?

I'm not sure why we force warn_inline to zero with -O0, it seems much
better to guard false warnings in some other way for -O0?

Richard.

> Thanks,
> Martin
>
> gcc/ChangeLog:
>
> 2019-12-11  Martin Liska  <mli...@suse.cz>
>
>         PR tree-optimization/92860
>         * common.opt: Make in Optimization option
>         as it is affected by -O0, which is an Optimization
>         option.
>         * tree-inline.c (tree_inlinable_function_p):
>         Use opt_for_fn for warn_inline.
>         (expand_call_inline): Likewise.
>
> gcc/testsuite/ChangeLog:
>
> 2019-12-11  Martin Liska  <mli...@suse.cz>
>
>         PR tree-optimization/92860
>         * gcc.dg/pr92860.c: New test.
> ---
>   gcc/common.opt                 |  2 +-
>   gcc/testsuite/gcc.dg/pr92860.c | 13 +++++++++++++
>   gcc/tree-inline.c              |  4 ++--
>   3 files changed, 16 insertions(+), 3 deletions(-)
>   create mode 100644 gcc/testsuite/gcc.dg/pr92860.c
>
>

Reply via email to