Re: -O vs -O2, revisited

From: Andres Kroonmaa <andre@dont-contact.us>
Date: Mon, 7 May 2001 09:45:25 +0200

On 5 May 2001, at 21:49, Adrian Chadd <adrian@creative.net.au> wrote:

> gcc under FreeBSD 4.3 is still generating some invalid code
> with -O2.

 btw, how do you identify invalid code?

> Its the same problem that was reported in the squid-2.4pre's,
> where gcc generates an xor reg, reg in the beginning of some
> routine in the internal DNS handling.
>
> Can we please default back to -O?
>
> If people want to use -O2 they can override it, but I think more people
> are going to have serious issues with gcc -O2 as they start installing
> freebsd-4.x.
>
> And no, its not a freebsdism, its a gcc-under-a-non-linux-i386-platform
> ism. :(

 I can't see any problem under solaris with any -O options. Although
 we've been disabling -O for solaris for ages.
 This problem is specific to combinations of circumstances, imo.

 Can we add test code to configure that detects problems with -O?
 -O2 can make 2x more efficient code...

 At least, could we add configure option to override defaults?

------------------------------------
 Andres Kroonmaa <andre@online.ee>
 CTO, Delfi Online
 Tel: 6501 731, Fax: 6501 708
 Pärnu mnt. 158, Tallinn,
 11317 Estonia
Received on Mon May 07 2001 - 01:50:35 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:00 MST