summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/array-value-initialize.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenCXX/array-value-initialize.cpp')
-rw-r--r--test/CodeGenCXX/array-value-initialize.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/CodeGenCXX/array-value-initialize.cpp b/test/CodeGenCXX/array-value-initialize.cpp
new file mode 100644
index 0000000..f041bc5
--- /dev/null
+++ b/test/CodeGenCXX/array-value-initialize.cpp
@@ -0,0 +1,28 @@
+// RUN: clang-cc -emit-llvm -o - %s
+
+// PR5463
+extern "C" int printf(...);
+
+struct S {
+ double filler;
+};
+
+struct Foo {
+ Foo(void) : bar_(), dbar_(), sbar_() {
+ for (int i = 0; i < 5; i++) {
+ printf("bar_[%d] = %d\n", i, bar_[i]);
+ printf("dbar_[%d] = %f\n", i, dbar_[i]);
+ printf("sbar_[%d].filler = %f\n", i, sbar_[i].filler);
+ }
+ }
+
+ int bar_[5];
+ double dbar_[5];
+ S sbar_[5];
+};
+
+int main(void)
+{
+ Foo a;
+}
+
OpenPOWER on IntegriCloud