diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java index f6cc41c3f58..c5f5c8208f4 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java @@ -14473,6 +14473,12 @@ public class LLFirBlackBoxCodegenBasedTestGenerated extends AbstractLLFirBlackBo runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt49834.kt"); } + @Test + @TestMetadata("kt64139.kt") + public void testKt64139() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt"); + } + @Test @TestMetadata("lvtWithInlineOnly.kt") public void testLvtWithInlineOnly() throws Exception { diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java index 99c6dfbe549..687502592f5 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java @@ -14473,6 +14473,12 @@ public class LLFirReversedBlackBoxCodegenBasedTestGenerated extends AbstractLLFi runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt49834.kt"); } + @Test + @TestMetadata("kt64139.kt") + public void testKt64139() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt"); + } + @Test @TestMetadata("lvtWithInlineOnly.kt") public void testLvtWithInlineOnly() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java index 87ebe16680e..ad0fee22d0e 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java @@ -14414,6 +14414,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt49834.kt"); } + @Test + @TestMetadata("kt64139.kt") + public void testKt64139() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt"); + } + @Test @TestMetadata("lvtWithInlineOnly.kt") public void testLvtWithInlineOnly() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java index 86dadf18782..b4dabaa7526 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java @@ -14414,6 +14414,12 @@ public class FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt49834.kt"); } + @Test + @TestMetadata("kt64139.kt") + public void testKt64139() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt"); + } + @Test @TestMetadata("lvtWithInlineOnly.kt") public void testLvtWithInlineOnly() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java index 434903885d4..f604253589b 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java @@ -14414,6 +14414,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt49834.kt"); } + @Test + @TestMetadata("kt64139.kt") + public void testKt64139() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt"); + } + @Test @TestMetadata("lvtWithInlineOnly.kt") public void testLvtWithInlineOnly() throws Exception { diff --git a/compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt b/compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt new file mode 100644 index 00000000000..b3a307f286e --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt @@ -0,0 +1,33 @@ +// WITH_STDLIB +// WITH_COROUTINES +import helpers.* +import kotlin.coroutines.* +import kotlin.coroutines.intrinsics.* + +suspend fun suspendHere(): Unit = suspendCoroutineUninterceptedOrReturn { x -> + x.resume(Unit) + COROUTINE_SUSPENDED +} + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +class Data(val x: Int) + +fun box(): String { + var result = "" + + builder { + var data = Data(0) + var done = false + do { + data = Data(1) + suspendHere() + done = true + } while (!done) + result = if (data.x == 1) "OK" else "fail" + } + + return result +} diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java index b0b0586f8f7..89de0041adb 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java @@ -14114,6 +14114,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt49834.kt"); } + @Test + @TestMetadata("kt64139.kt") + public void testKt64139() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt"); + } + @Test @TestMetadata("lvtWithInlineOnly.kt") public void testLvtWithInlineOnly() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java index a5b48ebddc8..9670e92cdec 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java @@ -14414,6 +14414,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt49834.kt"); } + @Test + @TestMetadata("kt64139.kt") + public void testKt64139() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt"); + } + @Test @TestMetadata("lvtWithInlineOnly.kt") public void testLvtWithInlineOnly() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java index d89a997a953..c1ebd1a5d6d 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java @@ -14414,6 +14414,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt49834.kt"); } + @Test + @TestMetadata("kt64139.kt") + public void testKt64139() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt"); + } + @Test @TestMetadata("lvtWithInlineOnly.kt") public void testLvtWithInlineOnly() throws Exception { diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index c933a90fe37..c8625c91d6d 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -11742,6 +11742,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt49834.kt"); } + @TestMetadata("kt64139.kt") + public void testKt64139() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt"); + } + @TestMetadata("lvtWithInlineOnly.kt") public void testLvtWithInlineOnly() throws Exception { runTest("compiler/testData/codegen/box/coroutines/varSpilling/lvtWithInlineOnly.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java index abfb09e3282..e48d9cd72f9 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java @@ -10712,6 +10712,12 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest { runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt49834.kt"); } + @Test + @TestMetadata("kt64139.kt") + public void testKt64139() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt"); + } + @Test @TestMetadata("lvtWithInlineOnly.kt") public void testLvtWithInlineOnly() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java index 0d828a0df12..aaef9b1bedb 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java @@ -10712,6 +10712,12 @@ public class FirJsES6CodegenBoxTestGenerated extends AbstractFirJsES6CodegenBoxT runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt49834.kt"); } + @Test + @TestMetadata("kt64139.kt") + public void testKt64139() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt"); + } + @Test @TestMetadata("lvtWithInlineOnly.kt") public void testLvtWithInlineOnly() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java index bd4d83f812b..78396400283 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java @@ -10712,6 +10712,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt49834.kt"); } + @Test + @TestMetadata("kt64139.kt") + public void testKt64139() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt"); + } + @Test @TestMetadata("lvtWithInlineOnly.kt") public void testLvtWithInlineOnly() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java index be7e2639d94..fbe013ef19d 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java @@ -10712,6 +10712,12 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt49834.kt"); } + @Test + @TestMetadata("kt64139.kt") + public void testKt64139() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt"); + } + @Test @TestMetadata("lvtWithInlineOnly.kt") public void testLvtWithInlineOnly() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java index df7be43395f..6ef4ac03e8d 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java @@ -11686,6 +11686,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt49834.kt"); } + @Test + @TestMetadata("kt64139.kt") + public void testKt64139() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt"); + } + @Test @TestMetadata("lvtWithInlineOnly.kt") public void testLvtWithInlineOnly() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java index 7454e5491db..baaf725aa98 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java @@ -11946,6 +11946,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt49834.kt"); } + @Test + @TestMetadata("kt64139.kt") + public void testKt64139() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt"); + } + @Test @TestMetadata("lvtWithInlineOnly.kt") public void testLvtWithInlineOnly() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java index aeb71426cba..af6e9555fcb 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java @@ -11426,6 +11426,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt49834.kt"); } + @Test + @TestMetadata("kt64139.kt") + public void testKt64139() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt"); + } + @Test @TestMetadata("lvtWithInlineOnly.kt") public void testLvtWithInlineOnly() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java index 2b47eaa88fb..4118601de59 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java @@ -11687,6 +11687,12 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt49834.kt"); } + @Test + @TestMetadata("kt64139.kt") + public void testKt64139() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt"); + } + @Test @TestMetadata("lvtWithInlineOnly.kt") public void testLvtWithInlineOnly() throws Exception { diff --git a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java index 651c5a73e45..c82164801a8 100644 --- a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java +++ b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java @@ -10688,6 +10688,12 @@ public class FirWasmCodegenBoxTestGenerated extends AbstractFirWasmCodegenBoxTes runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt49834.kt"); } + @Test + @TestMetadata("kt64139.kt") + public void testKt64139() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt"); + } + @Test @TestMetadata("lvtWithInlineOnly.kt") public void testLvtWithInlineOnly() throws Exception { diff --git a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java index 93adfdb238c..aa4ac572684 100644 --- a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java +++ b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java @@ -10688,6 +10688,12 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt49834.kt"); } + @Test + @TestMetadata("kt64139.kt") + public void testKt64139() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt64139.kt"); + } + @Test @TestMetadata("lvtWithInlineOnly.kt") public void testLvtWithInlineOnly() throws Exception {