From: Jason Merrill Date: Sat, 2 Oct 1999 00:41:00 +0000 (-0400) Subject: new X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1bd83869f2434d184202618f1d086068d4a01bb6;p=gcc.git new From-SVN: r29761 --- diff --git a/gcc/testsuite/g++.old-deja/g++.other/cond6.C b/gcc/testsuite/g++.old-deja/g++.other/cond6.C new file mode 100644 index 00000000000..a462c4069bd --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/cond6.C @@ -0,0 +1,14 @@ +// Test that the result of `x ? const E : E' is an E rvalue. +// Contributed by Jason Merrill + +enum E { a }; + +bool b; + +int main () +{ + E e1 = a; + const E &er = e1; + E e2 = b ? er : a; // OK + const E* ep = &(b ? er : a); // ERROR - non-lvalue +}