summaryrefslogtreecommitdiff
path: root/clang/test/Sema/enum-packed.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema/enum-packed.c')
-rw-r--r--clang/test/Sema/enum-packed.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/Sema/enum-packed.c b/clang/test/Sema/enum-packed.c
new file mode 100644
index 0000000..0eb6c14
--- /dev/null
+++ b/clang/test/Sema/enum-packed.c
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+// PR7477
+enum __attribute__((packed)) E {
+ Ea, Eb, Ec, Ed
+};
+
+void test_E(enum E e) {
+ switch (e) {
+ case Ea:
+ case Eb:
+ case Ec:
+ case Ed:
+ break;
+ }
+}