As discussed earlier on discord that it seems there's some pancake-irrelevant initialisation happening in cml_main() that changes part (first five words) of the pancake heap. Just putting this issue down as a record.
This seem to be resolved when I used the updated compiler with CakeML commit fad3454. I can use cml_heap[] now starting from 0th word. Sorry for the confusion.
As discussed earlier on discord that it seems there's some pancake-irrelevant initialisation happening in
cml_main()
that changes part (first five words) of the pancake heap. Just putting this issue down as a record.