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.
--- /dev/null
+/* { 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();
+}