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

            Bug ID: 66954
           Summary: function multiversioning fails for target "aes"
           Product: gcc
           Version: 5.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jens.maurer at gmx dot net
  Target Milestone: ---

I would like to switch implementations depending on whether the (Intel) CPU has
AES instructions or not.  Simplified testcase:


__attribute__((target("default")))
void foo()
{ }

__attribute__((target("aes")))
void foo()
{ }

int main()
{
  void (*f)() = &foo;
}


yields

> g++ target-aes.cc 
target-aes.cc: In function '<built-in>':
target-aes.cc:7:6: error: No dispatcher found for aes
 void foo()
      ^

Reply via email to