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

            Bug ID: 119801
           Summary: [15 Regression] Rejects-valid with musttail attribute
                    and -fsanitize=thread
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: sanitizer
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jakub at gcc dot gnu.org
                CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
                    jakub at gcc dot gnu.org, kcc at gcc dot gnu.org
  Target Milestone: ---

int bar (int *);

int
foo (int *p)
{
  ++*p;
  [[clang::musttail]] return bar (p);
}

is accepted by GCC 14 and clang but rejected by GCC 15.
Without the attribute, both GCC and clang don't emit a tail call which is
reasonable as there is __tsan_func_exit call after the call to bar.
For musttail clang emits it before the musttail call instead.

Reply via email to