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: unassig...@gcc.gnu.org ReportedBy: schaub.johan...@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.