summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/cps/cps022.cmm
blob: 64d6c39f19b2d1165482e62aaceab13e058a3059 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Test conditional jumps to a proc-point/continuation

// So far this can't happen, so this test is unneeded
// and would currently fail (it won't even parse).
// But if in future a CmmCondBranch could target
// a proc-point/continuation, then the CPS would need
// to be updated to account for this.

foo() {
  bits32 x, y, z;
  x = x;
  (x) = foreign "C--" bar() "safe";
L:
  y = y;
  foreign "C--" baz() "safe";
  if (y<3) goto L;
  goto L;
}