File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -4017,7 +4017,7 @@ void IRGenSILFunction::visitAllocStackInst(swift::AllocStackInst *i) {
4017
4017
return ;
4018
4018
4019
4019
auto &DL = IGM.DataLayout ;
4020
- if (DL.getTypeSizeInBits (AI->getAllocatedType ()) < DL.getPointerSize ())
4020
+ if (DL.getTypeSizeInBits (AI->getAllocatedType ()) < DL.getPointerSizeInBits ())
4021
4021
return ;
4022
4022
4023
4023
auto *BC = Builder.CreateBitCast (AI, IGM.OpaquePtrTy ->getPointerTo ());
Original file line number Diff line number Diff line change
1
+ // RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir | %FileCheck %s
2
+
3
+ // REQUIRES: CPU=x86_64
4
+
5
+ class Foobar {
6
+ init ( ) {
7
+ var a : Bool = true
8
+ }
9
+ }
10
+
11
+ // Make sure we are mis-initializing the alloca.
12
+ // CHECK-LABEL: define {{.*}}swiftcc %T11alloc_stack6FoobarC* @"$S11alloc_stack6FoobarCACycfc"(%T11alloc_stack6FoobarC* swiftself)
13
+ // CHECK-NOT: store{{.*}}opaque
14
+ // CHECK: ret {{.*}}%0
15
+ // CHECK:}
16
+
You can’t perform that action at this time.
0 commit comments