This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/81355] New: SegFault when using attribute target dispatch with empty parameter
- From: "erich.keane at intel dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 08 Jul 2017 01:37:56 +0000
- Subject: [Bug c++/81355] New: SegFault when using attribute target dispatch with empty parameter
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81355
Bug ID: 81355
Summary: SegFault when using attribute target dispatch with
empty parameter
Product: gcc
Version: 7.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: erich.keane at intel dot com
Target Milestone: ---
This very simple repro causes a segfault:
__attribute__((target("default")))
int foo() {return 99;}
__attribute__((target("sse4.2","")))
int foo() {return 1;}
int main() {
return foo();
}
As you can see, this does dispatch, and should otherwise be valid. However,
the blank string causes a segfault: https://godbolt.org/g/dmuCaZ
Additionally of interest, ONLY the 1st parameter to target participates in
dispatch.