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

            Bug ID: 86435
           Summary: -fsemantic-interposition does not appear to have any
                    effect
           Product: gcc
           Version: 8.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: fw at gcc dot gnu.org
  Target Milestone: ---
            Target: x86_64

Consider this program:

int a;

int
f1 (int a)
{
  return a;
}

int
f2 (void)
{
  return f1 (a) - a;
}

Compiling it with -O2 -fsemantic-interposition or -O2
-fno-semantic-interposition (in case the sense of the options in the
documentation is reversed) both results in this:

        .globl  f2
        .type   f2, @function
f2:
.LFB1:
        .cfi_startproc
        xorl    %eax, %eax
        ret
        .cfi_endproc

So interposition of f1 is not possible.

-fno-inline-functions does not make a difference.

Reply via email to