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

            Bug ID: 107727
           Summary: error: multiversioning needs 'ifunc' which is not
                    supported on this target (x86_64-w64-mingw32 target)
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: unlvsur at live dot com
  Target Milestone: ---

#include<cstdio>

[[__gnu__::__target__("avx2")]]
inline void foo()
{
        puts("avx2\n");
}

[[__gnu__::__target__("default")]]
inline void foo()
{
        puts("default\n");
}

int main()
{
        foo();
}

$ clang++ -o a a.cc --target=x86_64-windows-gnu -s -flto=thin -fuse-ld=lld
$ wine a.exe
avx2


$ x86_64-w64-mingw32-g++ -o a a.cc -s -flto
a.cc: In function 'int main()':
a.cc:10:13: error: multiversioning needs 'ifunc' which is not supported on this
target
   10 | inline void foo()
      |             ^~~
a.cc:18:1: error: use of multiversioned function without a default
   18 | }
      | ^

Reply via email to