Well, I suppose it is possible that it is removing the *code* but not the literal.
Does COBOL 5.1 have a "show me the pseudo-assembler listing" option? That would provide a better test IMHO. Of course, the real harm in not removing unreachable code is pretty modest IMHO. Makes your executable larger, which uses DASD, and virtual storage, and fetch time, and slightly reduces i-cache hit probability, and perhaps gets in the way of short relative jumps -- but all pretty modest effects IMHO. Or am I missing something? Charles -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Greg Shirey Sent: Thursday, October 02, 2014 8:31 AM To: [email protected] Subject: Re: Enterprise COBOL v5.1 Implemented? Charles, COBOL 5.1 has three settings for optimization OPT(0), OPT(1) and OPT(2). We're testing COBOL 5.1 at OPT(2), so, yes, we tested at the "full" optimization. Inside the paragraph that never gets executed, I added the following statement: MOVE "BUBBA" to WS-DESC. After recompiling with OPT(2), I browsed the program object and was able to find "BUBBA" which leads me to believe that the optimizer is no longer removing code that cannot be executed. (At least in this case.) Is that a bug? I'll ask IBM and report back. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
