On 2016-10-15 14:44, Peter Relson wrote:
So, if someone compiles their COBOL program without optimization and tests
it, then compiles it with optimization before putting it into production,
does it need to be tested again?

Well, it's an excellent question Tom, but needs to be directed to people
at sites that do that :-)

Pushed for an answer, I'd say "no". But, if you have.... and it ends up
being the same asnwer as for ABO, which is why you've posed the question.

I on the other hand, when pushed for an answer would say "yes". Even if
the optimizer in the compiler is 100% correct (not always the case),
better optimization may make assumptions that the code in question does
not happen to satisfy.

At some time in the 1990'ies, using OS PL/I V2.3.0, my then employer had one large program (at 10+K pure LOC it was their largest program) that had to be compiled OPT(0). It would not run (S0C1 or S0C4, don't remember) if it was compiled OPT(2).

Likewise, I've got a PL/I program that runs OK when compiled OPT(0) with the PL/I for Windows compiler, yet fails miserably when it's compiled OPT(3).

I've always been a very strong proponent of only testing programs that are compiled with exactly the same options as the one used for production compiles.

Programs compiled with different optimization levels (and sometimes even other compiler options) are not the same program! Period. Full stop. End of story!

Robert AH Prins
No programming (yet) @ http://prino.neocities.org/

For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to