Do not inline variadic thunks (PR ipa/83549).
2018-01-03 Martin Liska <mliska@suse.cz> PR ipa/83549 * cif-code.def (VARIADIC_THUNK): New enum value. * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic thunks. 2018-01-03 Martin Liska <mliska@suse.cz> PR ipa/83549 * g++.dg/ipa/pr83549.C: New test. From-SVN: r256177
This commit is contained in:
parent
e164534f16
commit
ca04a532f3
@ -1,3 +1,10 @@
|
||||
2018-01-03 Martin Liska <mliska@suse.cz>
|
||||
|
||||
PR ipa/83549
|
||||
* cif-code.def (VARIADIC_THUNK): New enum value.
|
||||
* ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
|
||||
thunks.
|
||||
|
||||
2018-01-03 Jan Beulich <jbeulich@suse.com>
|
||||
|
||||
* sse.md (mov<mode>_internal): Tighten condition for when to use
|
||||
|
@ -95,6 +95,10 @@ DEFCIFCODE(MISMATCHED_ARGUMENTS, CIF_FINAL_ERROR,
|
||||
DEFCIFCODE(LTO_MISMATCHED_DECLARATIONS, CIF_FINAL_ERROR,
|
||||
N_("mismatched declarations during linktime optimization"))
|
||||
|
||||
/* Caller is variadic thunk. */
|
||||
DEFCIFCODE(VARIADIC_THUNK, CIF_FINAL_ERROR,
|
||||
N_("variadic thunk call"))
|
||||
|
||||
/* Call was originally indirect. */
|
||||
DEFCIFCODE(ORIGINALLY_INDIRECT_CALL, CIF_FINAL_NORMAL,
|
||||
N_("originally indirect function call not considered for inlining"))
|
||||
|
@ -2422,6 +2422,11 @@ compute_fn_summary (struct cgraph_node *node, bool early)
|
||||
info->inlinable = false;
|
||||
node->callees->inline_failed = CIF_CHKP;
|
||||
}
|
||||
else if (stdarg_p (TREE_TYPE (node->decl)))
|
||||
{
|
||||
info->inlinable = false;
|
||||
node->callees->inline_failed = CIF_VARIADIC_THUNK;
|
||||
}
|
||||
else
|
||||
info->inlinable = true;
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
2018-01-03 Martin Liska <mliska@suse.cz>
|
||||
|
||||
PR ipa/83549
|
||||
* g++.dg/ipa/pr83549.C: New test.
|
||||
|
||||
2018-01-03 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR c++/83592
|
||||
|
8
gcc/testsuite/g++.dg/ipa/pr83549.C
Normal file
8
gcc/testsuite/g++.dg/ipa/pr83549.C
Normal file
@ -0,0 +1,8 @@
|
||||
// PR ipa/83549
|
||||
// { dg-do compile }
|
||||
// { dg-options "-O2" }
|
||||
|
||||
struct A { virtual ~A (); };
|
||||
struct B { virtual void foo (...); };
|
||||
struct C : A, B { void foo (...) {} };
|
||||
C c;
|
Loading…
Reference in New Issue
Block a user