aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/expr/cond10.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/expr/cond10.C')
-rw-r--r--gcc/testsuite/g++.dg/expr/cond10.C17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/expr/cond10.C b/gcc/testsuite/g++.dg/expr/cond10.C
new file mode 100644
index 00000000000..892576fa8b8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/expr/cond10.C
@@ -0,0 +1,17 @@
+// PR c++/32019
+
+struct C
+{
+ C(const char *);
+ operator const char *();
+};
+
+extern C c;
+extern const char * s;
+
+void
+foo (bool b)
+{
+ b ? c : s; // { dg-error "?:" }
+ // { dg-message "convert" "" { target *-*-* } 15 }
+}