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

            Bug ID: 108470
           Summary: Missing documentation for alternate uses of
                    __attribute__((noinline))
           Product: gcc
           Version: 12.2.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rth at gcc dot gnu.org
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

The noinline attribute affects decisions made by ipa-split.cc
and ipa-icf.cc that are not immediately obvious.

At least the ipa-split choice affects code correctness for QEMU
(in that we expect __builtin_return_address to be used in very
specific contexts, and the transformation done by ipa-split
invalidates that).  Using noinline on the affected functions
prevents the ipa-split optimization and restores functionality.

It would be nice to document the effect, so that the workaround
is not affected in future gcc versions.

Reply via email to