// Generate: if (loop-index < number-of-elements) fall to the loop body,
// otherwise, go to the block after the for-loop.
uint64_t NumElements = Array->getSize().getZExtValue();
- llvm::Value * NumElementsPtr =
- llvm::ConstantInt::get(llvm::Type::getInt64Ty(CGF.getLLVMContext()),
- NumElements);
llvm::Value *Counter = CGF.Builder.CreateLoad(IndexVar);
+ llvm::Value *NumElementsPtr =
+ llvm::ConstantInt::get(Counter->getType(), NumElements);
llvm::Value *IsLess = CGF.Builder.CreateICmpULT(Counter, NumElementsPtr,
"isless");
-// RUN: %clang_cc1 -emit-llvm -o - %s
+// 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(...);
S sbar_[5];
};
-int main(void)
-{
+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;
+}
\ No newline at end of file