summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/other/error30.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/other/error30.C')
-rw-r--r--gcc/testsuite/g++.dg/other/error30.C14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/other/error30.C b/gcc/testsuite/g++.dg/other/error30.C
new file mode 100644
index 000000000..2df0e6407
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/error30.C
@@ -0,0 +1,14 @@
+// PR c++/35336
+// { dg-do compile }
+// { dg-bogus "not supported by" "" { target *-*-* } 0 }
+
+struct A
+{
+ int i : 2;
+};
+
+void foo (bool b)
+{
+ A a;
+ (a.i || b) (); // { dg-error "cannot be used as" }
+}