summaryrefslogtreecommitdiffstats
path: root/llvm/test/FrontendC++/2010-06-22-ZeroBitfield.cpp
diff options
context:
space:
mode:
authorStuart Hastings <stuart@apple.com>2010-06-23 00:31:14 +0000
committerStuart Hastings <stuart@apple.com>2010-06-23 00:31:14 +0000
commitc0efbd5b31d736d778db08abd8c169cbea05a225 (patch)
tree28c0609e89d2c98d8ee5a5275f64d4fa4d56b713 /llvm/test/FrontendC++/2010-06-22-ZeroBitfield.cpp
parent2a33a0deef6fa3c16e09666553703e6adefaf908 (diff)
downloadbcm5719-llvm-c0efbd5b31d736d778db08abd8c169cbea05a225.tar.gz
bcm5719-llvm-c0efbd5b31d736d778db08abd8c169cbea05a225.zip
Less incorrect handling of zero-length bitfields. Radars 7992077 and 8093043.
llvm-svn: 106611
Diffstat (limited to 'llvm/test/FrontendC++/2010-06-22-ZeroBitfield.cpp')
-rw-r--r--llvm/test/FrontendC++/2010-06-22-ZeroBitfield.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/test/FrontendC++/2010-06-22-ZeroBitfield.cpp b/llvm/test/FrontendC++/2010-06-22-ZeroBitfield.cpp
new file mode 100644
index 00000000000..c979f8d9b91
--- /dev/null
+++ b/llvm/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(); }
OpenPOWER on IntegriCloud