From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,ae6d7754224e7cfb X-Google-Attributes: gid1164f8,public X-Google-Thread: fee84,ae6d7754224e7cfb X-Google-Attributes: gidfee84,public From: jrozes@gumbo.tcs.tufts.edu (Jonathan Rozes) Subject: Re: horrible "cc -O" bug (DU 3.2c) Date: 1997/05/09 Message-ID: <5kvlj7$k26$1@d2.tufts.edu>#1/1 X-Deja-AN: 240580394 References: Organization: Tufts University, Medford, MA Reply-To: jrozes@tcs.tufts.edu Newsgroups: comp.unix.osf.osf1,comp.sys.dec In article , mark@cita.toronto.edu (Mark Bartelt) writes: > Someone just called my attention to a really disturbing > bug in DEC's C compiler. It seems that if a program is > compiled with "-O", then evaluation of "expr1 && expr2" > is botched: Even when expr1 evaluates to 0, expr2 gets > evaluated anyway! > > [...] > > We're running version 3.2c of Digital UNIX. Can anyone > tell me whether this bug got fixed in 4.0? On 3.2g, I got a segfault with -O and -O2, but not -O3. The cc -migrate compiler worked fine at all optimization levels. On 4.0b, cc and cc.alt work fine at all optimization levels. jonathan -- +++ Jonathan Rozes, Unix Systems Administrator, Tufts University ++ jrozes@tcs.tufts.edu, http://rozes.tcs.tufts.edu/ + Remember, there's a difference between kneeling down and bending over --FZ