summaryrefslogtreecommitdiff
path: root/testsuite/tests/wasm/should_run/control-flow/src/irr.cmm
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/wasm/should_run/control-flow/src/irr.cmm')
-rw-r--r--testsuite/tests/wasm/should_run/control-flow/src/irr.cmm19
1 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/tests/wasm/should_run/control-flow/src/irr.cmm b/testsuite/tests/wasm/should_run/control-flow/src/irr.cmm
new file mode 100644
index 0000000000..2e5e3722d3
--- /dev/null
+++ b/testsuite/tests/wasm/should_run/control-flow/src/irr.cmm
@@ -0,0 +1,19 @@
+section "comment" {
+ mycomment:
+ bits8 [] "The classic irreducible flow graph, modified so it doesn't loop forever (so we can test it";
+}
+
+
+irr1 (bits32 n) {
+ A:
+ foreign "C" A();
+ if (n > 1) goto B;
+ C:
+ foreign "C" C();
+ if (n > 3) goto B;
+ return (888);
+ B:
+ foreign "C" B();
+ if (n > 2) goto C;
+ return (999);
+}