]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[PR116336][LRA]: Add a test
authorVladimir N. Makarov <vmakarov@redhat.com>
Thu, 27 Feb 2025 18:05:44 +0000 (13:05 -0500)
committerVladimir N. Makarov <vmakarov@redhat.com>
Thu, 27 Feb 2025 18:06:15 +0000 (13:06 -0500)
  Patch for PR116234 solves given PR116366.  So the patch adds only the test
case which is very different from PR116234 one.

gcc/testsuite/ChangeLog:

PR rtl-optimization/116336
* gcc.dg/pr116336.c: New test.

gcc/testsuite/gcc.dg/pr116336.c [new file with mode: 0644]

diff --git a/gcc/testsuite/gcc.dg/pr116336.c b/gcc/testsuite/gcc.dg/pr116336.c
new file mode 100644 (file)
index 0000000..3e4f3d3
--- /dev/null
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -gno-statement-frontiers -fcompare-debug" } */
+
+double duk_js_execute_bytecode_duk__tv_0_0;
+double duk_double_div();
+void duk_handle_call_unprotected();
+void duk_js_execute_bytecode() {
+  double du_0;
+  long opcode_shifted;
+  switch (opcode_shifted)
+  case 2:
+    du_0 = duk_double_div();
+  duk_js_execute_bytecode_duk__tv_0_0 = du_0;
+  duk_handle_call_unprotected();
+  duk_js_execute_bytecode();
+}