summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/expr/cond9.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/expr/cond9.C')
-rw-r--r--gcc/testsuite/g++.dg/expr/cond9.C12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/expr/cond9.C b/gcc/testsuite/g++.dg/expr/cond9.C
new file mode 100644
index 000000000..e8e1397c0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/expr/cond9.C
@@ -0,0 +1,12 @@
+// PR c++/27666
+
+struct A { // { dg-message "A" }
+ A(int); // { dg-message "A" }
+};
+
+void foo(volatile A a) {
+ 1 ? a : 0; // { dg-error "match|temporary" }
+ // { dg-message "candidate" "candidate note" { target *-*-* } 8 }
+ 1 ? 0 : a; // { dg-error "match|temporary" }
+ // { dg-message "candidate" "candidate note" { target *-*-* } 10 }
+}