constexpr.c (ensure_literal_type_for_constexpr_object): Use DECL_SOURCE_LOCATION...
[gcc.git] / gcc / testsuite / g++.dg / cpp0x / constexpr-ice19.C
1 // PR c++/81054
2 // { dg-do compile { target c++11 } }
3
4 struct A
5 {
6 volatile int i;
7 constexpr A() : i() {}
8 };
9
10 struct B
11 {
12 static constexpr A a {}; // { dg-error "22:the type .const A. of .constexpr. variable .B::a. is not literal" }
13 // { dg-error "in-class initialization" "" { target c++11 } .-1 }
14 };