PR c++/71828 * constexpr.c (cxx_eval_constant_expression) <case REALPART_EXPR>: For lval don't use cxx_eval_unary_expression and instead recurse and if needed rebuild the reference. * g++.dg/cpp0x/constexpr-71828.C: New test. From-SVN: r238442
6 lines
135 B
C
6 lines
135 B
C
// PR c++/71828
|
|
// { dg-do compile { target c++11 } }
|
|
|
|
constexpr _Complex int a { 1, 2 };
|
|
static_assert (& __imag a != &__real a, "");
|