This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/57888] New: using non-type template parameter in constexpr function for non static data member intializer segfaults
- From: "plasmahh at gmx dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 12 Jul 2013 13:11:09 +0000
- Subject: [Bug c++/57888] New: using non-type template parameter in constexpr function for non static data member intializer segfaults
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57888
Bug ID: 57888
Summary: using non-type template parameter in constexpr
function for non static data member intializer
segfaults
Product: gcc
Version: 4.8.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: plasmahh at gmx dot net
While trying to find workaronuds for Bug #57887 I tried the following code:
struct B
{
template<int N>
struct A
{
constexpr int get_N() { return N; }
// int X = N;
int X = get_N();
void foo( )
{
int x = N;
}
};
};
Which made gcc segfault. Whatever the validity of #57887 is, I don't think it
should segfault here...