From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,e96065738a96e678 X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-06-24 04:27:02 PST Path: bga.com!news.sprintlink.net!hookup!news.moneng.mei.com!howland.reston.ans.net!xlink.net!zib-berlin.de!irz401!news.urz.tu-dresden.de!rdalp1.urz.tu-dresden.de!root From: root@rdalp1.urz.tu-dresden.de (system PRIVILEGED account) Newsgroups: comp.unix.osf.osf1 Subject: Re: cc -O bug? Date: 24 Jun 1994 11:10:23 GMT Organization: TU Dresden (URZ) Message-ID: <2ueeuv$mre@RMAIL.urz.tu-dresden.de> References: NNTP-Posting-Host: rdalp1.urz.tu-dresden.de X-Newsreader: TIN [version 1.2 PL2] Stan Joseph Simon (ssb6+@andrew.cmu.edu) wrote: : I have a problem with cc on the DEC alpha. When I compile the following : piece of code with "cc test.c" the program runs correctly. : [...] : However, when I use optimization "cc -O test.c" I get incorrect : output--the division comes out to 0. This happens with optimization : levels -O2 and -O3, but not -O1. (A similar problem occurs with DEC's : cxx compiler.) : Is there a solution to this? Or should I just not use optimization? : I am using osf 1.3. : Stan I tried this example with OSF V2.0, and both results were identical, with optimization and without one. (with c and cxx compilers). Michael