PR c++/65896 * constexpr.c (cxx_eval_store_expression): Don't try to actually store an empty class. From-SVN: r222549
19 lines
273 B
C
19 lines
273 B
C
// PR c++/65896
|
|
// { dg-do compile { target c++11 } }
|
|
|
|
struct base {};
|
|
|
|
struct derived : base {
|
|
constexpr derived():
|
|
base{},
|
|
m_value(0) {
|
|
}
|
|
int m_value;
|
|
};
|
|
|
|
constexpr int by_ref(derived && value) {
|
|
return value.m_value;
|
|
}
|
|
|
|
constexpr int value = by_ref(derived{});
|