[Bug c++/54532] New: [C++0x][constexpr] internal error when initializing static constexpr with pointer to non-static member variable
cvs at cs dot utoronto.ca
gcc-bugzilla@gcc.gnu.org
Sun Sep 9 02:23:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54532
Bug #: 54532
Summary: [C++0x][constexpr] internal error when initializing
static constexpr with pointer to non-static member
variable
Classification: Unclassified
Product: gcc
Version: 4.7.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: cvs@cs.utoronto.ca
Created attachment 28154
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28154
output of g++ -v
The following code triggers a segfault.
struct reg {
template <typename CLS, typename T>
constexpr reg(T CLS::*) {}
};
struct foo {
};
struct bar {
foo a;
// both of these trigger internal error
static constexpr foo bar::*reg_a = &bar::a;
static constexpr reg reg_a = &bar::a;
};
g++ --version
g++ (Debian 4.7.1-7) 4.7.1
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
4.6 seems to have the same problem.
More information about the Gcc-bugs
mailing list