https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118198

ak at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|tail merge should not merge |tail merge/cross jump
                   |abort                       |should not merge abort
         Resolution|INVALID                     |---
             Status|RESOLVED                    |NEW

--- Comment #10 from ak at gcc dot gnu.org ---

cfgcleanup special cases sanitizer calls too. 

again the same could be done for __builtin_abort.
Probably both should use a common function to check.

      /* For address sanitizer, never crossjump __asan_report_* builtins,
         otherwise errors might be reported on incorrect lines.  */
      if (flag_sanitize & SANITIZE_ADDRESS)
        {
          rtx call = get_call_rtx_from (i1);
          if (call && GET_CODE (XEXP (XEXP (call, 0), 0)) == SYMBOL_REF)
            {
              rtx symbol = XEXP (XEXP (call, 0), 0);
              if (SYMBOL_REF_DECL (symbol)
                  && TREE_CODE (SYMBOL_REF_DECL (symbol)) == FUNCTION_DECL)
                {
                  if ((DECL_BUILT_IN_CLASS (SYMBOL_REF_DECL (symbol))
                       == BUILT_IN_NORMAL)
                      && DECL_FUNCTION_CODE (SYMBOL_REF_DECL (symbol))
                         >= BUILT_IN_ASAN_REPORT_LOAD1
                      && DECL_FUNCTION_CODE (SYMBOL_REF_DECL (symbol))
                         <= BUILT_IN_ASAN_STOREN)
                    return dir_none;
                }
            }
        }

Reply via email to