Files
kotlin-fork/kotlin-native/backend.native/tests/filecheck/kt53261/kt53261_noinline_NativePointed.kt
T
2023-09-07 15:35:57 +00:00

15 lines
617 B
Kotlin

/*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
import kotlinx.cinterop.*
// CHECK-LABEL: define i8* @"kfun:kotlinx.cinterop#interpretOpaquePointed(kotlin.native.internal.NativePtr){}kotlinx.cinterop.NativePointed"(i8* %0)
// CHECK: call i8* @"kfun:kotlinx.cinterop#<NativePointed-unbox>(kotlin.Any?){}kotlinx.cinterop.NativePointed?"
fun main() = memScoped {
val var1: NativePointed = alloc(4, 4)
println(interpretOpaquePointed(var1.rawPtr))
}