1// { dg-do assemble } 2// Test that the result of `x ? const E : E' is an E rvalue. 3// Contributed by Jason Merrill <jason@cygnus.com> 4 5enum E { a }; 6 7bool b; 8 9int main () 10{ 11 E e1 = a; 12 const E &er = e1; 13 E e2 = b ? er : a; // OK 14 const E* ep = &(b ? er : a); // { dg-error "" } non-lvalue 15} 16