This is a C66xx issue with CGT 7.2.4 (7.3.8 also shows similar issues). I am working with a large 3rd party project. It has been developed for some time with "-O3 -g". Optimizing to "-O3" or "-O2" alone results in a runtime failure. "-O1", "-O3 -g --optimize_with_debug" work correctly. The goal is to take full advantage of optimization and run correctly. I don't see a significant improvement in cycle count with --optimize_with_debug.
Is there a top down method to narrow down the problematic optimization and source code? Now I am trying to work backwards from the program error to guess what is broken. I am considering breaking the source in different sections to test compile option combinations. Is there a better method? Could I selectivly disable certain optimizations?