From 222e2a7620e6520ffaf4fc4e69d79c18da31542e Mon Sep 17 00:00:00 2001 From: "Zancanaro; Carlo" Date: Mon, 24 Sep 2012 09:58:17 +1000 Subject: Add the clang library to the repo (with some of my changes, too). --- clang/test/CodeGenCXX/array-value-initialize.cpp | 52 ++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 clang/test/CodeGenCXX/array-value-initialize.cpp (limited to 'clang/test/CodeGenCXX/array-value-initialize.cpp') diff --git a/clang/test/CodeGenCXX/array-value-initialize.cpp b/clang/test/CodeGenCXX/array-value-initialize.cpp new file mode 100644 index 0000000..27607c1 --- /dev/null +++ b/clang/test/CodeGenCXX/array-value-initialize.cpp @@ -0,0 +1,52 @@ +// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -o - %s +// RUN: %clang_cc1 -triple i386-apple-darwin -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 test1(void) { + Foo a; +} + +// PR7063 + + +struct Unit +{ + Unit() {} + Unit(const Unit& v) {} +}; + + +struct Stuff +{ + Unit leafPos[1]; +}; + + +int main() +{ + + Stuff a; + Stuff b = a; + + return 0; +} -- cgit v1.2.3