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
+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
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
--- /dev/null
+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));
+}
+