* ipa-inline.c (ipa_inline): Check that function is defined before
flattening.
* gcc.c-torture/compile/flatten.c: New testcase.
From-SVN: r278139
+2019-11-13 Jan Hubicka <hubicka@ucw.cz>
+
+ * ipa-inline.c (ipa_inline): Check that function is defined before
+ flattening.
+
2019-11-13 Andrew Stubbs <ams@codesourcery.com>
Julian Brown <julian@codesourcery.com>
for (i = nnodes - 1, j = i; i >= 0; i--)
{
node = order[i];
- if (lookup_attribute ("flatten",
- DECL_ATTRIBUTES (node->decl)) != NULL)
+ if (node->definition
+ && lookup_attribute ("flatten",
+ DECL_ATTRIBUTES (node->decl)) != NULL)
order[j--] = order[i];
}
+2019-11-13 Jan Hubicka <hubicka@ucw.cz>
+
+ * gcc.c-torture/compile/flatten.c: New testcase.
+
2019-11-13 Tobias Burnus <tobias@codesourcery.com>
PR fortran/92470
--- /dev/null
+int you_shall_not_flatten_me () __attribute__ ((flatten));
+main()
+{
+ you_shall_not_flatten_me ();
+}