This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/81277] New: assert() in multiversioned functions causes copmilation error
- From: "sgunderson at bigfoot dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 02 Jul 2017 12:09:03 +0000
- Subject: [Bug c++/81277] New: assert() in multiversioned functions causes copmilation error
- Auto-submitted: auto-generated
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