blob: ce6fedc8eef2c3b55918e3993fee175402d20b3f [file] [log] [blame]
// RUN: not %target-sil-opt -enable-sil-verify-all %s -definite-init -verify 2>&1 | %FileCheck %s
import Builtin
import Swift
// main
sil [ossa] @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
%2 = integer_literal $Builtin.Int32, 0
%3 = struct $Int32 (%2 : $Builtin.Int32)
return %4 : $Int32 // expected-error {{use of undefined value '%5'}}
// CHECK-NOT: error: use of undefined value '%4'
// CHECK: incorrect message found
}