Commit 8a4a6d2e by Jan Hubicka Committed by Jan Hubicka

re PR ipa/81360 (ice in estimate_edge_growth, at ipa-inline.h:86)

	PR ipa/81360
	* ipa-inline.c (can_inline_edge_p): Also check that caller is optimized
	* gcc.c-torture/compile/pr81360.c: New testcase.

From-SVN: r254937
parent a6b22eea
2017-11-19 Jan Hubicka <hubicka@ucw.cz>
PR ipa/81360
* ipa-inline.c (can_inline_edge_p): Also check that caller is optimized
2017-11-19 Jan Hubicka <hubicka@ucw.cz>
PR ipa/83001
* profile-count.c (profile_count::to_sreal_scale): Fix return value
for uninitialied counts.
......@@ -324,7 +324,8 @@ can_inline_edge_p (struct cgraph_edge *e, bool report,
e->inline_failed = CIF_BODY_NOT_AVAILABLE;
inlinable = false;
}
if (!early && !opt_for_fn (callee->decl, optimize))
if (!early && (!opt_for_fn (callee->decl, optimize)
|| opt_for_fn (caller->decl, optimize)))
{
e->inline_failed = CIF_FUNCTION_NOT_OPTIMIZED;
inlinable = false;
......
2017-11-19 Jan Hubicka <hubicka@ucw.cz>
PR ipa/81360
* gcc.c-torture/compile/pr81360.c: New testcase.
2017-11-19 Paul Thomas <pault@gcc.gnu.org>
PR fortran/78990
......
typedef a;
b(void *c, a d) {
if (c)
e(0, __PRETTY_FUNCTION__);
}
typedef f, g;
__attribute__((optimize(0))) h() {
g i;
b(i, sizeof(f));
}
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