diff --git a/src/test/java/com/android/tools/r8/regress/Regress371247958.java b/src/test/java/com/android/tools/r8/regress/Regress371247958.java
new file mode 100644
index 0000000..96fc07d
--- /dev/null
+++ b/src/test/java/com/android/tools/r8/regress/Regress371247958.java
@@ -0,0 +1,61 @@
+// Copyright (c) 2024, the R8 project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+package com.android.tools.r8.regress;
+
+import com.android.tools.r8.TestBase;
+import com.android.tools.r8.TestParameters;
+import com.android.tools.r8.TestParametersCollection;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+
+@RunWith(Parameterized.class)
+public class Regress371247958 extends TestBase {
+
+  private final TestParameters parameters;
+
+  @Parameterized.Parameters(name = "{0}")
+  public static TestParametersCollection data() {
+    return getTestParameters().withDefaultRuntimes().withAllApiLevels().build();
+  }
+
+  public Regress371247958(TestParameters parameters) {
+    this.parameters = parameters;
+  }
+
+  @Test
+  public void testR8() throws Exception {
+    testForR8(parameters.getBackend())
+        .addProgramClasses(TestClass.class)
+        .addKeepMainRule(TestClass.class)
+        .setMinApi(parameters)
+        .compile()
+        .run(parameters.getRuntime(), TestClass.class)
+        // TODO(b/371247958): Should throw a RuntimeException
+        .assertSuccess();
+  }
+
+  @Test
+  public void testD8() throws Exception {
+    testForD8(parameters.getBackend())
+        .addProgramClasses(TestClass.class)
+        .applyIf(parameters.isDexRuntime(), b -> b.setMinApi(parameters))
+        .compile()
+        .run(parameters.getRuntime(), TestClass.class)
+        .assertFailureWithErrorThatThrows(RuntimeException.class);
+  }
+
+  public static class TestClass {
+    static int throwException(RuntimeException runtimeException, boolean shouldReturnValue) {
+      if (shouldReturnValue) {
+        return 1;
+      }
+      throw runtimeException;
+    }
+
+    public static void main(String[] p) throws Exception {
+      throwException(new RuntimeException("always thrown"), false);
+    }
+  }
+}
