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

            Bug ID: 118313
           Summary: Incorrect calls to versioned function rather than
                    multiversioned dispatched symbol.
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: Alfie.Richards at arm dot com
  Target Milestone: ---

```cpp
__attribute__ ((target_version ("dotprod"))) int foo ();

int bar () {
  return foo();
}

int foo ();
```

GCC currently generates:
```asm
_Z3barv:
  stp x29, x30, [sp, -16]!
  mov x29, sp
  bl _Z3foov._Mdotprod
  ldp x29, x30, [sp], 16
  ret
```
(https://godbolt.org/z/TrrMdoEqK)

This is wrong. Not only is it bypassing the dispatched symbol which should be
called, it also calls a function that is
  • [Bug c++/118313] New: Incorrect... Alfie.Richards at arm dot com via Gcc-bugs

Reply via email to