This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ipa/67368] Inlining failed due to no_sanitize_address and always_inline conflict
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 27 Aug 2015 11:02:19 +0000
- Subject: [Bug ipa/67368] Inlining failed due to no_sanitize_address and always_inline conflict
- Auto-submitted: auto-generated
- References: <bug-67368-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67368
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-08-27
CC| |hubicka at gcc dot gnu.org,
| |y.gribov at samsung dot com
Component|c++ |ipa
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
/* Don't inline a function with mismatched sanitization attributes. */
else if (!sanitize_attrs_match_for_inline_p (caller->decl, callee->decl))
{
e->inline_failed = CIF_ATTRIBUTE_MISMATCH;
inlinable = false;
static bool
sanitize_attrs_match_for_inline_p (const_tree caller, const_tree callee)
{
/* Don't care if sanitizer is disabled */
if (!(flag_sanitize & SANITIZE_ADDRESS))
return true;
if (!caller || !callee)
return true;
return !!lookup_attribute ("no_sanitize_address",
DECL_ATTRIBUTES (caller)) ==
!!lookup_attribute ("no_sanitize_address",
DECL_ATTRIBUTES (callee));
so it fails on purpose (not sure why though). And it ignores always-inline.
I wonder if we should, for always-inline functions, inline anyway and output
a warning instead.