This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/49514] New: Crashes on valid use of constexpr constructor
- From: "schaub.johannes at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 23 Jun 2011 10:52:13 +0000
- Subject: [Bug c++/49514] New: Crashes on valid use of constexpr constructor
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49514
Summary: Crashes on valid use of constexpr constructor
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: schaub.johannes@googlemail.com
GCC crashes on this code:
/// snip
struct Vector4D {
constexpr Vector4D(double x=0, double y=0, double z=0, double t=0)
:components{x, y, z, t},
x(components[0]), y(components[1]), z(components[2]), t(components[3])
{ }
double components[4];
double &x, &y, &z, &t;
};
Vector4D a{1, 2, 3};
/// snap
Error:
main1.cpp:11:19: in constexpr expansion of âa.Vector4D::Vector4D(1.0e+0,
2.0e+0, 3.0e+0, 0.0)â
main1.cpp:11:19: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.archlinux.org/> for instructions.