8sa1-gcc/gcc/testsuite/g++.dg/cpp0x/constexpr-77482.C
Jakub Jelinek 8f03e02f36 re PR c++/77482 (Segfault when compiling ill-formed constexpr code)
PR c++/77482
	* error.c (dump_simple_decl): Only check DECL_DECLARED_CONCEPT_P
	if DECL_LANG_SPECIFIC is non-NULL.  Fix up formatting.

	* g++.dg/cpp0x/constexpr-77482.C: New test.

From-SVN: r240198
2016-09-16 22:25:17 +02:00

7 lines
209 B
C

// PR c++/77482
// { dg-do compile { target c++11 } }
constexpr auto x; // { dg-error "declaration\[^\n\r]*has no initializer" }
extern struct S s;
constexpr auto y = s; // { dg-error "has incomplete type" }