Subject: bin/14199: gcc optimisation bug
To: None <gnats-bugs@gnats.netbsd.org>
From: Mario Kemper <magick@bundy.zhadum.de>
List: netbsd-bugs
Date: 10/09/2001 22:52:01
>Number: 14199
>Category: bin
>Synopsis: gcc optimisation bug
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Oct 09 13:53:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Mario Kemper
>Release: -current as of oct 3
>Organization:
Mario Kemper
magick@zhadum.de
>Environment:
System: NetBSD bundy 1.5Y NetBSD 1.5Y (BUNDY) #1: Wed Oct 3 16:19:30 CEST 2001 root@bundy:/usr/netbsd-src/src/sys/arch/i386/compile/BUNDY i386
Architecture: i386
Machine: i386
>Description:
gcc 2.95.3 (aka NEW_TOOLCHAIN) has an optimisation bug when using -O2 together
with long long. I first noticed that when i compiled squid with the new gcc
and it crashed on every page to be loaded. As i'm obviously not the only one
who found that out, you can read a full analysis on:
http://www.geocrawler.com/archives/3/145/2001/8/50/6506067/
This affect IMHO every program that uses long long not only squid
>How-To-Repeat:
Compile squid with -O2 ans see it crash.
>Fix:
The *fix* for squid in 2.4.2 turns out to be a simple downgrade of the
optimization. Maybe we should revert to -O in the NetBSD-tree to be on
the safe side.
>Release-Note:
>Audit-Trail:
>Unformatted: