This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/50726] New: Internal compiler error when specializing template with an Enum Class
- From: "coyotte508 at hotmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 14 Oct 2011 10:03:40 +0000
- Subject: [Bug c++/50726] New: Internal compiler error when specializing template with an Enum Class
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50726
Bug #: 50726
Summary: Internal compiler error when specializing template
with an Enum Class
Classification: Unclassified
Product: gcc
Version: 4.5.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: coyotte508@hotmail.com
Created attachment 25495
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25495
The .ii version of the code in the bug report
gcc version: gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
Compile line: gcc -std="c++0x" test.cpp -save-temps
test.cpp:11:16: internal compiler error: in constructor_name_p, at
cp/name-lookup.c:1809
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.5/README.Bugs> for instructions.
The .ii file is attached, but here is the source code:
enum class Foo {
Val1,
Val2
};
template <Foo val>
void do_something() {
}
template <Foo::Val1> //Error at this line
void do_something() {
}
int main() {
return 0;
}
Possibly a duplicate of this bug:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47627, but the code is still
different.