8sa1-gcc/gcc/testsuite/g++.dg/cpp0x/constexpr-complex2.C
Jason Merrill dc8d2d00c5 Fix constexpr lvalue use of __real and __imag.
* constexpr.c (potential_constant_expression_1): REALPART_EXPR and
	IMAGPART_EXPR can be lvalues.

From-SVN: r242349
2016-11-13 01:52:15 -05:00

6 lines
127 B
C

// { dg-do compile { target c++11 } }
// { dg-options "" }
static _Complex int i;
static_assert (&__imag i == &__imag i, "");