This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug ipa/67368] Inlining failed due to no_sanitize_address and always_inline conflict


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]