[Bug c++/49514] New: Crashes on valid use of constexpr constructor
schaub.johannes at googlemail dot com
gcc-bugzilla@gcc.gnu.org
Thu Jun 23 10:52:00 GMT 2011
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.
More information about the Gcc-bugs
mailing list