Commit df9dda2d by Sriraman Tallam Committed by Sriraman Tallam

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
parent 0f9cdef4
2013-07-18 Sriraman Tallam <tmsriram@google.com>
PR middle-end/57698
* tree-inline.c (expand_call_inline): Emit errors during
early_inlining only if optimization is not turned on.
2013-07-18 David Malcolm <dmalcolm@redhat.com> 2013-07-18 David Malcolm <dmalcolm@redhat.com>
* passes.def: New. * passes.def: New.
......
2013-07-18 Sriraman Tallam <tmsriram@google.com>
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.
2013-07-18 Wei Mi <wmi@google.com> 2013-07-18 Wei Mi <wmi@google.com>
PR rtl-optimization/57878 PR rtl-optimization/57878
......
...@@ -18,5 +18,3 @@ void fasttrylock(void (*slowfn)()) { ...@@ -18,5 +18,3 @@ void fasttrylock(void (*slowfn)()) {
void trylock(void) { void trylock(void) {
fasttrylock(slowtrylock); fasttrylock(slowtrylock);
} }
/* { dg-prune-output "(inlining failed in call to always_inline.*indirect function call with a yet undetermined callee|called from here)" } */
...@@ -85,5 +85,3 @@ int raw_sendmsg(struct sock *sk, struct msghdr *msg, size_t len) ...@@ -85,5 +85,3 @@ int raw_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
{ {
raw_send_hdrinc(sk, msg->msg_iov, len, (void *)0, msg->msg_flags); raw_send_hdrinc(sk, msg->msg_iov, len, (void *)0, msg->msg_flags);
} }
/* { dg-prune-output "(inlining failed in call to always_inline.*indirect function call with a yet undetermined callee|called from here)" } */
typedef int (*IsAcceptableThis) (const int );
inline int
fn1 (IsAcceptableThis p1)
{
p1 (0);
return 0;
}
__attribute__ ((always_inline))
inline int fn2 (const int a)
{
return 0;
}
void
fn3 ()
{
fn1 (fn2);
}
...@@ -3905,6 +3905,10 @@ expand_call_inline (basic_block bb, gimple stmt, copy_body_data *id) ...@@ -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 for inlining, but we can't do that because frontends overwrite
the body. */ the body. */
&& !cg_edge->callee->local.redefined_extern_inline && !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. */ /* PR 20090218-1_0.c. Body can be provided by another module. */
&& (reason != CIF_BODY_NOT_AVAILABLE || !flag_generate_lto)) && (reason != CIF_BODY_NOT_AVAILABLE || !flag_generate_lto))
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment