From bef8491a658de9e8920acaeff6cb76ef4e946e2c Mon Sep 17 00:00:00 2001 From: Sriraman Tallam Date: Tue, 18 Jun 2013 22:45:03 +0000 Subject: Emit errors when always_inline functions cannot be inlined in -O0 mode. * tree-inline.c (expand_call_inline): Allow the error to be flagged in early inline pass. * ipa-inline.c (inline_always_inline_functions): Pretend always_inline functions are inlined during failures to flag an error. * gcc.target/i386/inline_error.c: New test. * gcc.c-torture/compile/pr44043.c: Fix test to expect an error. * gcc.c-torture/compile/pr43791.c: Fix test to expect an error. From-SVN: r200179 --- gcc/tree-inline.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'gcc/tree-inline.c') diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index bee7766..f524771 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -3905,8 +3905,6 @@ expand_call_inline (basic_block bb, gimple stmt, copy_body_data *id) for inlining, but we can't do that because frontends overwrite the body. */ && !cg_edge->callee->local.redefined_extern_inline - /* Avoid warnings during early inline pass. */ - && cgraph_global_info_ready /* PR 20090218-1_0.c. Body can be provided by another module. */ && (reason != CIF_BODY_NOT_AVAILABLE || !flag_generate_lto)) { -- cgit v1.1