Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!wuarchive!uunet!munnari.oz.au!yoyo.aarnet.edu.au!sirius.ucs.adelaide.edu.au!fang!itd1!agq From: agq@itd1.dsto.oz (Ashley Quick) Newsgroups: comp.sys.apollo Subject: Re: Apollo CC 5.7 Optimizer bummer Message-ID: <1520@fang.dsto.oz> Date: 10 May 91 01:06:43 GMT References: <1991May8.231635.8782@emperor.scs.com> Sender: news@fang.dsto.oz Distribution: comp Lines: 43 richd@emperor.scs.com (Richard Doherty) writes: >I have a large program (that loads several other large libraries) >that dies with a segmentation violation. If I shut off the optimizer >with the -dba flag, the program works flawlessly. Apollo customer >support could provide no clues. >Question: Has anyone discovered optimizer problems? Yes. I have had a program which uses DOMAIN/OS mailbox calls, and have had exactly the problem you describe. These calls take a pointer to some storage, and fill that spot up with stuff. With the optimiser on, the program (only about 50 lines long) crashes with a segmentation violation. When off, works fine. I tried the various different optimiser levels, and found that it broke at levels 3 and above (I think... it was a year ago). To add to HaPollos embarrasment, one of the domain example programs used to break in the same way. (Dont know if it still does... that was under SR10.1). I tried: 1. Examine the assembler code from the C compiler. The optimiser puts lots of things into registers, and it was all so hard to follow I gave up. 2. Compile the equivalent Pascal program with different levels of optimisation. They all worked fine. Eventually, I gave up. I decided that the optimser did not matter a lot to me!!!!! No I have not reported this to HaPollo :-) Regards... Ashleigh Quick | ACSnet: AGQ@dstos3.dsto.oz Defence Science and Technology Organisation| Internet: AGQ@dstos3.dsto.oz.au PO Box 1600 | Phone: (Intl) (+61 8) 259 6975 Salisbury 5108 AUSTRALIA | (Local) (08) 259 6975