summaryrefslogtreecommitdiff
path: root/test/FrontendC++
diff options
context:
space:
mode:
Diffstat (limited to 'test/FrontendC++')
-rw-r--r--test/FrontendC++/2010-06-22-BitfieldInit.cpp20
-rw-r--r--test/FrontendC++/2010-06-22-ZeroBitfield.cpp5
2 files changed, 25 insertions, 0 deletions
diff --git a/test/FrontendC++/2010-06-22-BitfieldInit.cpp b/test/FrontendC++/2010-06-22-BitfieldInit.cpp
new file mode 100644
index 0000000000..1cfe1f9f6f
--- /dev/null
+++ b/test/FrontendC++/2010-06-22-BitfieldInit.cpp
@@ -0,0 +1,20 @@
+// RUN: %llvmgxx -g -c %s
+struct TEST2
+{
+ int subid:32;
+ int :0;
+};
+
+typedef struct _TEST3
+{
+ TEST2 foo;
+ TEST2 foo2;
+} TEST3;
+
+TEST3 test =
+ {
+ {0},
+ {0}
+ };
+
+int main() { return 0; }
diff --git a/test/FrontendC++/2010-06-22-ZeroBitfield.cpp b/test/FrontendC++/2010-06-22-ZeroBitfield.cpp
new file mode 100644
index 0000000000..c979f8d9b9
--- /dev/null
+++ b/test/FrontendC++/2010-06-22-ZeroBitfield.cpp
@@ -0,0 +1,5 @@
+// RUN: %llvmgxx -g -c %s
+struct s8_0 { unsigned : 0; };
+struct s8_1 { double x; };
+struct s8 { s8_0 a; s8_1 b; };
+s8 f8() { return s8(); }