diff options
author | Christian Bruel <chrbr@gcc.gnu.org> | 2011-06-21 08:42:05 +0200 |
---|---|---|
committer | Christian Bruel <chrbr@gcc.gnu.org> | 2011-06-21 08:42:05 +0200 |
commit | c9fc06dcdd6568fa4a54d10408098ec51d07234f (patch) | |
tree | 8dd93dc6abd84a32b62b4e2bfae943c2c673d753 /gcc/tree-inline.c | |
parent | f1ee724ceb567af3f1343ceac6d87a69abc9c800 (diff) | |
download | gcc-c9fc06dcdd6568fa4a54d10408098ec51d07234f.zip gcc-c9fc06dcdd6568fa4a54d10408098ec51d07234f.tar.gz gcc-c9fc06dcdd6568fa4a54d10408098ec51d07234f.tar.bz2 |
PR middle-end/49139 fix always_inline diagnostics
From-SVN: r175239
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r-- | gcc/tree-inline.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index dc3288b..c8b9f4c 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -3192,7 +3192,7 @@ tree_inlinable_function_p (tree fn) As a bonus we can now give more details about the reason why a function is not inlinable. */ if (always_inline) - sorry (inline_forbidden_reason, fn); + error (inline_forbidden_reason, fn); else if (do_warning) warning (OPT_Winline, inline_forbidden_reason, fn); @@ -3742,11 +3742,13 @@ expand_call_inline (basic_block bb, gimple stmt, copy_body_data *id) if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn)) /* Avoid warnings during early inline pass. */ - && cgraph_global_info_ready) + && cgraph_global_info_ready + /* PR 20090218-1_0.c. Body can be provided by another module. */ + && (reason != CIF_BODY_NOT_AVAILABLE || !flag_generate_lto)) { - sorry ("inlining failed in call to %q+F: %s", fn, - _(cgraph_inline_failed_string (reason))); - sorry ("called from here"); + error ("inlining failed in call to always_inline %q+F: %s", fn, + cgraph_inline_failed_string (reason)); + error ("called from here"); } else if (warn_inline && DECL_DECLARED_INLINE_P (fn) |