diff --git a/fco2/testcases/constants.occ b/fco2/testcases/constants.occ new file mode 100644 index 0000000..0a77b5f --- /dev/null +++ b/fco2/testcases/constants.occ @@ -0,0 +1,24 @@ +PROC P () + INT X: + SEQ + X := 42 + + -- These should be pulled out of the proc... + VAL INT a IS 42: + VAL INT b IS a + 1: + VAL INT c IS a + b: + VAL []INT d IS [1, 2, 3, 4]: + VAL INT e IS d[2]: + VAL INT32 f RETYPES a: + VAL INT g IS BYTESIN (a): + -- ... and these shouldn't. + INT A: + VAL INT B IS A: + VAL INT C IS X: + VAL []INT D IS [1, 2, X, 4]: + VAL INT E IS D[2]: -- technically the others should be OK, but I think that's excessive analysis! + INT32 F RETYPES A: + VAL INT G IS BYTESIN (E): + + SKIP +: diff --git a/fco2/testcases/multidim.occ b/fco2/testcases/multidim.occ new file mode 100644 index 0000000..b246740 --- /dev/null +++ b/fco2/testcases/multidim.occ @@ -0,0 +1,26 @@ +PROC A ([]INT a1) + SKIP +: +PROC B (VAL [][]INT a2) + SKIP +: +PROC P () + INT zero: + [10]INT one: + [10][10]INT two: + [10][10][10]INT three: + SEQ + zero := 42 + one[1] := zero + zero := one[1] + two[1][2] := zero + zero := two[1][2] + three[1][2][3] := zero + zero := three[1][2][3] + + A (one) + A (two[1]) + A (three[1][2]) + B (two) + B (three[1]) +: