File: definite_init_markuninitialized_delegatingself.sil

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (380 lines) | stat: -rw-r--r-- 16,650 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
// RUN: %target-sil-opt -enable-sil-verify-all %s -definite-init -raw-sil-inst-lowering -verify | %FileCheck %s

// This test only tests mark_uninitialized [delegatingself]

sil_stage raw

import Builtin
import Swift

protocol P {}
class C : P {}
struct MyStruct : P {}

struct MyStruct2 {
  var x: P
  init(delegate: ())
  init()
}

sil @selfinit : $@convention(thin) () -> MyStruct // user: %7

class SomeClass {}

class RootClassWithNontrivialStoredProperties {
  var x, y: SomeClass
  init()
}

class DerivedClassWithNontrivialStoredProperties : RootClassWithNontrivialStoredProperties {
  var a, b: SomeClass
  override init()
}

sil @getThrowingValue : $@convention(thin) () -> (Int, @error any Error)

// CHECK-LABEL: @self_init_assert_instruction
// CHECK:  apply
// CHECK-NEXT: store
// CHECK-NEXT: load
// CHECK:  return
sil [ossa] @self_init_assert_instruction : $@convention(thin) (Int, @thin MyStruct.Type) -> MyStruct {
  bb0(%0 : $Int, %1 : $@thin MyStruct.Type):
  %2 = alloc_stack $MyStruct, var, name "sf"
  %3 = mark_uninitialized [delegatingself] %2 : $*MyStruct

  %6 = function_ref @selfinit : $@convention(thin) () -> MyStruct
  %7 = apply %6() : $@convention(thin) () -> MyStruct
  assign %7 to %3 : $*MyStruct
  %9 = load [trivial] %3 : $*MyStruct
  dealloc_stack %2 : $*MyStruct
  return %9 : $MyStruct
}

sil [ossa] @selfinit_delegate : $@convention(thin) (@thin MyStruct2.Type) -> @out MyStruct2

// <rdar://problem/18089574> Protocol member in struct + delegating init miscompilation
// CHECK-LABEL: @self_init_copyaddr
sil [ossa] @self_init_copyaddr : $@convention(thin) (@thin MyStruct2.Type) -> @out MyStruct2 {
bb0(%0 : $*MyStruct2, %1 : $@thin MyStruct2.Type):
  // CHECK: [[SELF:%[0-9]+]] = alloc_stack $MyStruct2
  %2 = alloc_stack $MyStruct2, var, name "sf"
  %3 = mark_uninitialized [delegatingself] %2 : $*MyStruct2
  %6 = metatype $@thin MyStruct2.Type
  %7 = function_ref @selfinit_delegate : $@convention(thin) (@thin MyStruct2.Type) -> @out MyStruct2
  %8 = alloc_stack $MyStruct2

  // Make sure this copy_addr ends up being an initialization.
  apply %7(%8, %6) : $@convention(thin) (@thin MyStruct2.Type) -> @out MyStruct2
  copy_addr [take] %8 to %3 : $*MyStruct2
  dealloc_stack %8 : $*MyStruct2

  // CHECK: apply
  // CHECK-NEXT: copy_addr [take] {{.*}} to [init] [[SELF]] : $*MyStruct2
  // CHECK-NEXT: dealloc_stack

  copy_addr [take] %3 to [init] %0 : $*MyStruct2
  %13 = tuple ()
  dealloc_stack %2 : $*MyStruct2
  return %13 : $()
}

// CHECK-LABEL: sil [ossa] @test_delegating_box_release
// CHECK: bb0([[ARG:%.*]] : @owned $RootClassWithNontrivialStoredProperties):
// CHECK-NEXT: [[SELFBOX:%[0-9]+]] = alloc_box $<τ_0_0> { var τ_0_0 } <RootClassWithNontrivialStoredProperties>
// CHECK-NEXT: [[PB:%[0-9]+]] = project_box [[SELFBOX]]
// CHECK-NEXT: store [[ARG]] to [init] [[PB]]
// CHECK-NEXT: [[SELF:%[0-9]+]] = load [take] [[PB]]
// CHECK-NEXT: [[METATYPE:%[0-9]+]] = value_metatype $@thick RootClassWithNontrivialStoredProperties.Type, [[SELF]] : $RootClassWithNontrivialStoredProperties
// CHECK-NEXT: dealloc_partial_ref [[SELF]] : $RootClassWithNontrivialStoredProperties, [[METATYPE]] : $@thick RootClassWithNontrivialStoredProperties.Type
// CHECK-NEXT: dealloc_box [[SELFBOX]]
sil [ossa] @test_delegating_box_release : $@convention(method) (@owned RootClassWithNontrivialStoredProperties) -> () {
bb0(%0 : @owned $RootClassWithNontrivialStoredProperties):
  %2 = alloc_box $<τ_0_0> { var τ_0_0 } <RootClassWithNontrivialStoredProperties>
  %2a = mark_uninitialized [delegatingselfallocated] %2 : $<τ_0_0> { var τ_0_0 } <RootClassWithNontrivialStoredProperties>
  %4 = project_box %2a : $<τ_0_0> { var τ_0_0 } <RootClassWithNontrivialStoredProperties>, 0
  store %0 to [init] %4 : $*RootClassWithNontrivialStoredProperties
  destroy_value %2a : $<τ_0_0> { var τ_0_0 } <RootClassWithNontrivialStoredProperties>

  %13 = tuple ()
  return %13 : $()
}


// CHECK-LABEL: sil [ossa] @test_delegating_rvalue_release
// CHECK: bb0([[ARG:%.*]] : @owned $RootClassWithNontrivialStoredProperties):
// CHECK-NEXT: [[SELFBOX:%[0-9]+]] = alloc_box $<τ_0_0> { var τ_0_0 } <RootClassWithNontrivialStoredProperties>
// CHECK-NEXT: [[PB:%[0-9]+]] = project_box [[SELFBOX]]
// CHECK-NEXT: store [[ARG]] to [init] [[PB]]
// CHECK-NEXT: [[SELF:%[0-9]+]] = load [take] [[PB]]
// CHECK-NEXT: [[METATYPE:%[0-9]+]] = value_metatype $@thick RootClassWithNontrivialStoredProperties.Type, [[SELF]] : $RootClassWithNontrivialStoredProperties
// CHECK-NEXT: dealloc_partial_ref [[SELF]] : $RootClassWithNontrivialStoredProperties, [[METATYPE]] : $@thick RootClassWithNontrivialStoredProperties.Type
// CHECK-NEXT: [[SELF2:%[0-9]+]] = load [take] [[PB]]
// CHECK-NEXT: [[METATYPE2:%[0-9]+]] = value_metatype $@thick RootClassWithNontrivialStoredProperties.Type, [[SELF2]] : $RootClassWithNontrivialStoredProperties
// CHECK-NEXT: dealloc_partial_ref [[SELF2]] : $RootClassWithNontrivialStoredProperties, [[METATYPE2]] : $@thick RootClassWithNontrivialStoredProperties.Type
// CHECK-NEXT: dealloc_box [[SELFBOX]]
sil [ossa] @test_delegating_rvalue_release : $@convention(method) (@owned RootClassWithNontrivialStoredProperties) -> () {
bb0(%0 : @owned $RootClassWithNontrivialStoredProperties):
  %2 = alloc_box $<τ_0_0> { var τ_0_0 } <RootClassWithNontrivialStoredProperties>
  %2a = mark_uninitialized [delegatingselfallocated] %2 : $<τ_0_0> { var τ_0_0 } <RootClassWithNontrivialStoredProperties>
  %4 = project_box %2a : $<τ_0_0> { var τ_0_0 } <RootClassWithNontrivialStoredProperties>, 0
  store %0 to [init] %4 : $*RootClassWithNontrivialStoredProperties
  %6 = load [take] %4 : $*RootClassWithNontrivialStoredProperties
  destroy_value %6 : $RootClassWithNontrivialStoredProperties
  destroy_value %2a : $<τ_0_0> { var τ_0_0 } <RootClassWithNontrivialStoredProperties>

  %13 = tuple ()
  return %13 : $()
}

// CHECK-LABEL: sil [ossa] @test_delegating_derived_release
// CHECK: bb0([[ARG:%.*]] : @owned $DerivedClassWithNontrivialStoredProperties):
// CHECK-NEXT: [[SELFBOX:%[0-9]+]] = alloc_stack $DerivedClassWithNontrivialStoredProperties
// CHECK-NEXT: store [[ARG]] to [init] [[SELFBOX]]
// CHECK-NEXT: [[SELF:%[0-9]+]] = load [take] [[SELFBOX]]
// CHECK-NEXT: [[METATYPE:%[0-9]+]] = value_metatype $@thick DerivedClassWithNontrivialStoredProperties.Type, [[SELF]] : $DerivedClassWithNontrivialStoredProperties
// CHECK-NEXT: dealloc_partial_ref [[SELF]] : $DerivedClassWithNontrivialStoredProperties, [[METATYPE]] : $@thick DerivedClassWithNontrivialStoredProperties.Type
// CHECK-NEXT: dealloc_stack [[SELFBOX]]
sil [ossa] @test_delegating_derived_release : $@convention(method) (@owned DerivedClassWithNontrivialStoredProperties) -> () {
bb0(%0 : @owned $DerivedClassWithNontrivialStoredProperties):
  %2 = alloc_stack $DerivedClassWithNontrivialStoredProperties
  %4 = mark_uninitialized [delegatingselfallocated] %2 : $*DerivedClassWithNontrivialStoredProperties
  store %0 to [init] %4 : $*DerivedClassWithNontrivialStoredProperties

  destroy_addr %4 : $*DerivedClassWithNontrivialStoredProperties
  dealloc_stack %2 : $*DerivedClassWithNontrivialStoredProperties

  %13 = tuple ()
  return %13 : $()
}

// <rdar://problem/20608881> DI miscompiles this testcase into a memory leak
struct MyStruct3 {
  @_hasStorage var c: C
}
sil @selfinit_mystruct3 : $@convention(thin) () -> @owned MyStruct3

// CHECK-LABEL: sil hidden [ossa] @test_conditional_destroy_delegating_init
sil hidden [ossa] @test_conditional_destroy_delegating_init : $@convention(thin) (Builtin.Int1) -> () {
bb0(%0 : $Builtin.Int1):
// CHECK:  [[CONTROL:%[0-9]+]] = alloc_stack $Builtin.Int1
// CHECK-NEXT: [[SELF_BOX:%[0-9]+]] = alloc_stack [dynamic_lifetime] $MyStruct3

  %2 = alloc_stack $MyStruct3
  %3 = mark_uninitialized [delegatingself] %2 : $*MyStruct3

// CHECK:  cond_br %0, [[SUCCESS:bb[0-9]+]], [[EXIT:bb[0-9]+]]
  cond_br %0, bb1, bb2

// CHECK: [[SUCCESS]]:
bb1:
  %9 = function_ref @selfinit_mystruct3 : $@convention(thin) () -> @owned MyStruct3
  %10 = apply %9() : $@convention(thin) () -> @owned MyStruct3
  assign %10 to %3 : $*MyStruct3

// CHECK: [[NEW_SELF:%[0-9]+]] = apply {{.*}}()  : $@convention(thin) () -> @owned MyStruct3
// CHECK-NEXT:  [[SET:%[0-9]+]] = integer_literal $Builtin.Int1, -1
// CHECK-NEXT:  store [[SET]] to [trivial] [[CONTROL]] : $*Builtin.Int1
// CHECK-NEXT:  store [[NEW_SELF]] to [init] [[SELF_BOX]] : $*MyStruct3

// CHECK-NEXT:  br [[CHECK:bb[0-9]+]]
  br bb3

bb2:
  br bb3

// CHECK: [[CHECK]]:
bb3:

// CHECK-NEXT:  [[BIT:%[0-9]+]] = load [trivial] [[CONTROL]] : $*Builtin.Int1
// CHECK-NEXT:  cond_br [[BIT]], [[INITIALIZED:bb[0-9]+]], [[UNINITIALIZED:bb[0-9]+]]

// CHECK: [[INITIALIZED]]:
// CHECK-NEXT:  destroy_addr [[SELF_BOX]] : $*MyStruct3
// CHECK-NEXT:  br [[EXIT:bb[0-9]+]]

// CHECK: [[UNINITIALIZED]]:
// CHECK-NEXT:  br [[EXIT]]

// CHECK: [[EXIT]]:

  destroy_addr %3 : $*MyStruct3
  dealloc_stack %2 : $*MyStruct3
  %15 = tuple ()
  return %15 : $()
}


// <rdar://problem/21991742> DI miscompiles this testcase into a double free
class MyClass3 {
}
sil @selfinit_myclass3 : $@convention(thin) (@owned MyClass3) -> @owned MyClass3

// CHECK-LABEL: sil hidden [ossa] @test_conditional_destroy_class_delegating_init
sil hidden [ossa] @test_conditional_destroy_class_delegating_init : $@convention(thin) (Builtin.Int1, @owned MyClass3) -> () {
bb0(%0 : $Builtin.Int1, %1 : @owned $MyClass3):
// CHECK:  [[CONTROL:%[0-9]+]] = alloc_stack $Builtin.Int2
// CHECK-NEXT: [[SELF_BOX:%[0-9]+]] = alloc_stack [dynamic_lifetime] $MyClass3

  %2 = alloc_stack $MyClass3
  %3 = mark_uninitialized [delegatingselfallocated] %2 : $*MyClass3
  store %1 to [init] %3 : $*MyClass3

// CHECK:  cond_br %0, [[SUCCESS:bb[0-9]+]], [[EXIT:bb[0-9]+]]
  cond_br %0, bb1, bb2

// CHECK: [[SUCCESS]]:
bb1:
  %4 = load [take] %3 : $*MyClass3
  %5 = function_ref @selfinit_myclass3 : $@convention(thin) (@owned MyClass3) -> @owned MyClass3
  %6 = apply %5(%4) : $@convention(thin) (@owned MyClass3) -> @owned MyClass3
  store %6 to [init] %3 : $*MyClass3

// CHECK:       [[SET:%[0-9]+]] = integer_literal $Builtin.Int2, -2
// CHECK-NEXT:  [[OLD:%.*]] = load [trivial] [[CONTROL]]
// CHECK-NEXT:  [[UPDATE:%.*]] = builtin "or_Int2"([[OLD]] : $Builtin.Int2, [[SET]] : $Builtin.Int2)
// CHECK-NEXT:  store [[UPDATE]] to [trivial] [[CONTROL]] : $*Builtin.Int2

// CHECK:       [[SET:%[0-9]+]] = integer_literal $Builtin.Int2, 1
// CHECK-NEXT:  [[OLD:%.*]] = load [trivial] [[CONTROL]]
// CHECK-NEXT:  [[UPDATE:%.*]] = builtin "or_Int2"([[OLD]] : $Builtin.Int2, [[SET]] : $Builtin.Int2)
// CHECK-NEXT:  store [[UPDATE]] to [trivial] [[CONTROL]] : $*Builtin.Int2

// CHECK: [[NEW_SELF:%[0-9]+]] = apply {{.*}}({{.*}})  : $@convention(thin) (@owned MyClass3) -> @owned MyClass3
// CHECK-NEXT:  store [[NEW_SELF]] to [init] [[SELF_BOX]] : $*MyClass3

// CHECK-NEXT:  br [[CHECK:bb[0-9]+]]
  br bb3

bb2:
  br bb3

// CHECK: [[CHECK]]:
bb3:

// CHECK-NEXT:  [[BIT:%.*]] = load [trivial] [[CONTROL]]
// CHECK-NEXT:  [[COND:%.*]] = builtin "trunc_Int2_Int1"([[BIT]] : $Builtin.Int2) : $Builtin.Int1
// CHECK-NEXT:  cond_br [[COND]], [[PARTIAL:bb[0-9]+]], [[UNINITIALIZED:bb[0-9]+]]

// CHECK: [[PARTIAL]]:
// CHECK-NEXT:  [[BIT:%.*]] = load [trivial] [[CONTROL]]
// CHECK-NEXT:  [[ONE:%.*]] = integer_literal $Builtin.Int2, 1
// CHECK-NEXT:  [[SHIFTED:%.*]] = builtin "lshr_Int2"([[BIT]] : $Builtin.Int2, [[ONE]] : $Builtin.Int2) : $Builtin.Int2
// CHECK-NEXT:  [[COND:%.*]] = builtin "trunc_Int2_Int1"([[SHIFTED]] : $Builtin.Int2) : $Builtin.Int1
// CHECK-NEXT:  cond_br [[COND]], [[INITIALIZED:bb[0-9]+]], [[CONSUMED:bb[0-9]+]]

// CHECK: [[INITIALIZED]]:
// CHECK-NEXT:  destroy_addr [[SELF_BOX]] : $*MyClass3
// CHECK-NEXT:  br [[EXIT:bb[0-9]+]]

// CHECK: [[CONSUMED]]:
// CHECK-NEXT:  br [[EXIT]]

// CHECK: [[UNINITIALIZED]]:
// CHECK-NEXT:  [[OLD_SELF:%[0-9]+]] = load [take] [[SELF_BOX]] : $*MyClass3
// CHECK-NEXT:  [[METATYPE:%[0-9]+]] = value_metatype $@thick MyClass3.Type, [[OLD_SELF]] : $MyClass3
// CHECK-NEXT:  dealloc_partial_ref [[OLD_SELF]] : $MyClass3, [[METATYPE]] : $@thick MyClass3.Type
// CHECK-NEXT:  br [[EXIT:bb[0-9]+]]

// CHECK: [[EXIT]]:

  destroy_addr %3 : $*MyClass3
  dealloc_stack %2 : $*MyClass3
  %7 = tuple ()
  return %7 : $()
}

// <rdar://51198592> DI was crashing as it wrongly detected a `type(of: self)`
// use in a delegating initializer, when there was none.
class MyClass4 {
}

sil hidden [ossa] @test_self_uninit_use_in_delegating_init : $@convention(method) (@thick MyClass4.Type) -> @owned MyClass4 {
bb0(%1 : $@thick MyClass4.Type):
  %2 = alloc_stack $MyClass4, let, name "self"
  %3 = mark_uninitialized [delegatingself] %2 : $*MyClass4
  %5 = load_borrow %3 : $*MyClass4 // expected-error {{'self' used before 'self.init' call or assignment to 'self'}}
  end_borrow %5 : $MyClass4
  %7 = load [copy] %3 : $*MyClass4 // expected-error {{'self.init' isn't called on all paths before returning from initializer}}
  destroy_addr %3 : $*MyClass4
  dealloc_stack %2 : $*MyClass4
  return %7 : $MyClass4
}

// A failable initializer: Int.init?(i:) that doesn't initialize along all paths.
sil hidden [ossa] @intInitExtension : $@convention(method) (Int, Bool) -> Optional<Int> {
bb0(%0 : $Int, %1 : $Bool):
  %2 = alloc_stack $Int, var, name "self"
  %3 = mark_uninitialized [delegatingself] %2 : $*Int
  %5 = metatype $@thin Int.Type
  %6 = struct_extract %1 : $Bool, #Bool._value
  cond_br %6, bb1, bb2

bb1:
  %14 = begin_access [modify] [static] %3 : $*Int
  assign %0 to %14 : $*Int
  end_access %14 : $*Int
  br bb3

bb2:
  br bb3

bb3:
  %19 = load [trivial] %3 : $*Int // expected-error {{'self.init' isn't called on all paths before returning from initializer}}
  %20 = enum $Optional<Int>, #Optional.some!enumelt, %19 : $Int
  dealloc_stack %2 : $*Int
  br bb5(%20 : $Optional<Int>)

bb4:
  dealloc_stack %2 : $*Int
  %24 = enum $Optional<Int>, #Optional.none!enumelt
  br bb5(%24 : $Optional<Int>)

bb5(%26 : $Optional<Int>):
  return %26 : $Optional<Int>
}

sil @selfinit_derivedclass_peerconvenience_init : $@convention (thin) (@owned DerivedClassWithNontrivialStoredProperties) -> @owned DerivedClassWithNontrivialStoredProperties

// Make sure that we do not error when we store back in the fail block here.
sil hidden [ossa] @convenience_init_with_throwing_argument : $@convention(method) (@owned DerivedClassWithNontrivialStoredProperties) -> @owned Optional<DerivedClassWithNontrivialStoredProperties> {
bb0(%0 : @owned $DerivedClassWithNontrivialStoredProperties):
  %1 = alloc_stack $DerivedClassWithNontrivialStoredProperties, let, name "self"
  %2 = mark_uninitialized [delegatingselfallocated] %1 : $*DerivedClassWithNontrivialStoredProperties
  store %0 to [init] %2 : $*DerivedClassWithNontrivialStoredProperties
  %6 = load [take] %2 : $*DerivedClassWithNontrivialStoredProperties
  %7 = function_ref @getThrowingValue : $@convention(thin) () -> (Int, @error any Error)
  try_apply %7() : $@convention(thin) () -> (Int, @error any Error), normal bb1, error bb5

bb1(%9 : $Int):
  %10 = function_ref @selfinit_derivedclass_peerconvenience_init : $@convention (thin) (@owned DerivedClassWithNontrivialStoredProperties) -> @owned DerivedClassWithNontrivialStoredProperties
  %11 = apply %10(%6)  : $@convention (thin) (@owned DerivedClassWithNontrivialStoredProperties) -> @owned DerivedClassWithNontrivialStoredProperties
  store %11 to [init] %2 : $*DerivedClassWithNontrivialStoredProperties
  %13 = load [copy] %2 : $*DerivedClassWithNontrivialStoredProperties
  %14 = enum $Optional<DerivedClassWithNontrivialStoredProperties>, #Optional.some!enumelt, %13 : $DerivedClassWithNontrivialStoredProperties
  destroy_addr %2 : $*DerivedClassWithNontrivialStoredProperties
  dealloc_stack %1 : $*DerivedClassWithNontrivialStoredProperties
  br bb3(%14 : $Optional<DerivedClassWithNontrivialStoredProperties>)

bb2:
  destroy_addr %2 : $*DerivedClassWithNontrivialStoredProperties
  dealloc_stack %1 : $*DerivedClassWithNontrivialStoredProperties
  %20 = enum $Optional<DerivedClassWithNontrivialStoredProperties>, #Optional.none!enumelt
  br bb3(%20 : $Optional<DerivedClassWithNontrivialStoredProperties>)

bb3(%22 : @owned $Optional<DerivedClassWithNontrivialStoredProperties>):
  return %22 : $Optional<DerivedClassWithNontrivialStoredProperties>

bb4(%24 : @owned $Error):
  %25 = begin_borrow %24 : $Error
  %26 = copy_value %25 : $Error
  debug_value %26 : $Error, let, name "error"
  destroy_value %26 : $Error
  end_borrow %25 : $Error
  destroy_value %24 : $Error
  br bb2

bb5(%32 : @owned $Error):
  store %6 to [init] %2 : $*DerivedClassWithNontrivialStoredProperties
  br bb4(%32 : $Error)
}