aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-inline.c
diff options
context:
space:
mode:
authorSriraman Tallam <tmsriram@google.com>2013-07-18 19:24:22 +0000
committerSriraman Tallam <tmsriram@gcc.gnu.org>2013-07-18 19:24:22 +0000
commitdf9dda2d153cb89ae02d247648e859721b1c38f6 (patch)
treeef5660a37382eb018b2fb4d5974e27e8cf33ea82 /gcc/tree-inline.c
parent0f9cdef43aad61c70a9f838d96c184bdffab7179 (diff)
downloadgcc-df9dda2d153cb89ae02d247648e859721b1c38f6.zip
gcc-df9dda2d153cb89ae02d247648e859721b1c38f6.tar.gz
gcc-df9dda2d153cb89ae02d247648e859721b1c38f6.tar.bz2
PR57698, only report errors from early inlining when optimization is turned
PR57698, only report errors from early inlining when optimization is turned off. PR middle-end/57698 * tree-inline.c (expand_call_inline): Emit errors during early_inlining only if optimization is not turned on. PR middle-end/57698 * gcc.c-torture/compile/pr57698.c: New test. * gcc.c-torture/compile/pr43791.c: Remove prune output directive. * gcc.c-torture/compile/pr44043.c: Ditto. From-SVN: r201039
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r--gcc/tree-inline.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index f524771..cac868a 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -3905,6 +3905,10 @@ 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
+ /* During early inline pass, report only when optimization is
+ not turned on. */
+ && (cgraph_global_info_ready
+ || !optimize)
/* PR 20090218-1_0.c. Body can be provided by another module. */
&& (reason != CIF_BODY_NOT_AVAILABLE || !flag_generate_lto))
{