The following code struct Foo { constexpr Foo() = default; }; int main() { constexpr Foo foo; } should not compile. Unfortunately it compiles with all g++ versions (that support c++11) up to and including 5.1 From [decl.constexpr]: A constexpr specifier used in an object declaration declares the object as const. Such an object shall have literal type and shall be initialized. Therefore the correct way of usage should be constexpr Foo foo{};
Actually the `constexpr` ctor is not even necessary here to reproduce the bug.
More details at http://stackoverflow.com/q/30172483/3093378
Dup of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60284