Solved: O2 and O3 fail, but Os and O1 work (CMM)
SRLM
Posts: 5,045
I tried the attached program, and it works fine in CMM and LMM with -Os. But, when I tried CMM with -O2 and -O3, it got hung up as indicated in the following terminal dump:
Any suggestions on what the problem is?
Also, any suggestions on how to find the source of this kind of problem myself in the future?
edit: top level file is "test.nl"
Waiting for key press to start tests Mount tests first First mount. Succeeded; stopping cog. Second mount. Succeeded. Reading block 0 (should be a boot block) <HANG>
Any suggestions on what the problem is?
Also, any suggestions on how to find the source of this kind of problem myself in the future?
edit: top level file is "test.nl"
Comments
In general the main difference in CMM between -Os and -O2 is that -O2 enables the use of FCACHE, which speeds things up quite a bit. This can exacerbate race conditions (such as ones caused by missing volatile).
Eric
Now, the volatile problem has bitten me twice. Hopefully, I'll remember next time.