Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!emperor!richd From: richd@emperor.scs.com (Richard Doherty) Newsgroups: comp.sys.apollo Subject: Apollo CC 5.7 Optimizer bummer Message-ID: <1991May8.231635.8782@emperor.scs.com> Date: 8 May 91 23:16:35 GMT Distribution: comp Organization: Mentor Graphics IC Group, San Jose, CA Lines: 39 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? Details: The program is ported from a Sun system, where it works fine on full optimization. Saber-C passed the program with no errors or warnings running in full interprative mode (for those who don't have this good tool -- this process will find things such as uninitialized variables and memory at wanders). Again, the program runs correctly with optimization turned off on the Apollo. Machine: HP 400t OS: SR10.3.2 CC Version: 5.7 The customer rep suggested several things: 1) Trying the compilation at several different levels of optimization. I have not done this yet, as it will not likely give me any clues. 2) Look for uninitialized variables. I believe I have this covered. I ran dde on the optimized code, and it reported all sorts of optimizations that were somewhat hard to believe. Several library routine calls were merged, when in fact they were referencing different routines. Lines of code were reported merged that made no sense. I decided dde was lying and ignored it. Dde often contradicted itself. Dbx produces a segmentation fault so often as to make the tool useless on the apollo. I would like to distill the code to a very simple program that would produce the same results, so I can send it to apollo. This may be difficult. --Rich