[llvm-bugs] [Bug 50477] New: -fsemantic-interposition breaks extern inline

via llvm-bugs llvm-bugs at lists.llvm.org
Wed May 26 02:09:52 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=50477

            Bug ID: 50477
           Summary: -fsemantic-interposition breaks extern inline
           Product: clang
           Version: trunk
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: szabolcs.nagy at arm.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

consider

void foo_good();
extern inline void foo()
{
    foo_good();
}
void bar()
{
    foo();
}

using: -fsemantic-interposition -fPIC -O2
expected: no reference to foo, only to foo_good.
got: interposable call to foo.

with -O0 i expect a local call to foo that is not interposable.

(i don't think iso c requires either way, but
gcc implements it the described way on elf
platforms and existing software relies on it.
at least on linux targets clang should follow.)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210526/a73fe0c2/attachment.html>


More information about the llvm-bugs mailing list