diff options
author | Sriraman Tallam <tmsriram@google.com> | 2013-07-18 19:24:22 +0000 |
---|---|---|
committer | Sriraman Tallam <tmsriram@gcc.gnu.org> | 2013-07-18 19:24:22 +0000 |
commit | df9dda2d153cb89ae02d247648e859721b1c38f6 (patch) | |
tree | ef5660a37382eb018b2fb4d5974e27e8cf33ea82 /gcc | |
parent | 0f9cdef43aad61c70a9f838d96c184bdffab7179 (diff) | |
download | gcc-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')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr43791.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr44043.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr57698.c | 19 | ||||
-rw-r--r-- | gcc/tree-inline.c | 4 |
6 files changed, 37 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1486a06..15591e1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +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> * passes.def: New. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1a73f41..370aeac 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +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> PR rtl-optimization/57878 diff --git a/gcc/testsuite/gcc.c-torture/compile/pr43791.c b/gcc/testsuite/gcc.c-torture/compile/pr43791.c index 0d8c94f..2b1d06f 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr43791.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr43791.c @@ -18,5 +18,3 @@ void fasttrylock(void (*slowfn)()) { void trylock(void) { fasttrylock(slowtrylock); } - -/* { dg-prune-output "(inlining failed in call to always_inline.*indirect function call with a yet undetermined callee|called from here)" } */ diff --git a/gcc/testsuite/gcc.c-torture/compile/pr44043.c b/gcc/testsuite/gcc.c-torture/compile/pr44043.c index ea87678..943501b 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr44043.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr44043.c @@ -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); } - -/* { dg-prune-output "(inlining failed in call to always_inline.*indirect function call with a yet undetermined callee|called from here)" } */ diff --git a/gcc/testsuite/gcc.c-torture/compile/pr57698.c b/gcc/testsuite/gcc.c-torture/compile/pr57698.c new file mode 100644 index 0000000..a9efb42 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr57698.c @@ -0,0 +1,19 @@ +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); +} 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)) { |