https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81277
Bug ID: 81277 Summary: assert() in multiversioned functions causes copmilation error Product: gcc Version: 7.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: sgunderson at bigfoot dot com Target Milestone: --- As the bug title says: #include <stdio.h> #include <assert.h> __attribute__((target("default"))) void foo(int x) { assert(x >= 0); } __attribute__((target("arch=haswell"))) void foo(int x) { assert(x >= 0); } When compiled: /tmp/ccCQK5gF.s: Assembler messages: /tmp/ccCQK5gF.s:71: Error: symbol `_ZZ3fooiE19__PRETTY_FUNCTION__' is already defined