summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/conversion/bitfield5.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/conversion/bitfield5.C')
-rw-r--r--gcc/testsuite/g++.dg/conversion/bitfield5.C14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/conversion/bitfield5.C b/gcc/testsuite/g++.dg/conversion/bitfield5.C
new file mode 100644
index 000000000..b931ec97c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/conversion/bitfield5.C
@@ -0,0 +1,14 @@
+// PR c++/27506
+
+enum EBorderStyle
+ {
+ BNATIVE, BHIDDEN
+ };
+struct BorderValue
+{
+ enum EBorderStyle style:8;
+};
+enum EBorderStyle f(const struct BorderValue *border)
+{
+ return border ? border->style : BNATIVE;
+}