Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!mcsun!hp4nl!orcenl!hbergh From: hbergh@nl.oracle.com Newsgroups: comp.unix.aix Subject: Re: cc -O producing faulty code Message-ID: <1410@nlsun1.oracle.nl> Date: 9 Jun 91 21:16:16 GMT References: <1991Jun1.065826.5526@minyos.xx.rmit.oz.au> <808@rufus.UUCP> <1991Jun2.124226.17523@minyos.xx.rmit.oz.au> Sender: news@oracle.nl Reply-To: hbergh@nl.oracle.com () Distribution: comp Organization: Oracle Europe Lines: 39 Nntp-Posting-Host: nlibm3 In article <1991Jun2.124226.17523@minyos.xx.rmit.oz.au> s900387@minyos.xx.rmit.oz.au (Craig Macbride) writes: >drake@drake.almaden.ibm.com writes: > >>How about posting an example, and the level of AIX you're running? > >Release 1, Version 3. An example follows, with test script and result. You >will notice that I've put the optimised program's output through "cat -v" to >make it at least keep to ASCII characters. :-) That's very good! Although Jim probably wanted to know the update level of the C compiler. You can see what that is by typing 'lslpp -h xlccmp.obj' and look for the line with ACTIVE. You can also have the compiler generate a listing with -qsource or -qlist (assembly) and its version number will be on the first line. Your test shows the problem with the 1.1.1.1 compiler (also shipped with xlccmp.obj 1.1.2.15) and can be solved by adding the -U__STR__ option, as Bjorn Engsig pointed out in an earlier post. This will tell the compiler not to inline strcmp and strcpy. The xlc compiler version 1.1.3.13 that is shipped with xlccmp.obj 1.1.5.10 (3005 update, aka AIX 3.1.5) doesn't have this problem. > _--_|\ Craig Macbride >/ \ >\_.--.*/ The above are simply my comments, not necessarily > v the views of any other being or organisation. Regards, Herbert van den Bergh hbergh@oracle.com Oracle Europe or uunet!oracle!hbergh -- Regards, Herbert van den Bergh hbergh@oracle.com