Dead
[official-gcc.git] / gomp-20050608-branch / gcc / testsuite / g++.old-deja / g++.other / cond6.C
blobdb018a4a3014867975b9f015570c95af166aa0b7
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>
5 enum E { a };
7 bool b;
9 int main ()
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