This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: bad C code or bad object code ?
- From: Andrew Haley <aph at redhat dot com>
- To: Mike Frysinger <vapier at gentoo dot org>
- Cc: gcc-help at gcc dot gnu dot org, toolchain at gentoo dot org, truedfx at gentoo dot org
- Date: Fri, 14 Jul 2006 10:29:33 +0100
- Subject: Re: bad C code or bad object code ?
- References: <200607132323.23571.vapier@gentoo.org>
Mike Frysinger writes:
> we noticed that xterm in Gentoo started to produce broken color display when
> compiled with gcc-4.1 and -Os ... one of our devs ripped apart a small test
> case to illustrate the issue at hand (Debian shows the same issues)
>
> the trouble centers around a matrix declared as static volatile and is never
> initialized ... xterm expects the matrix to be zero set already, but when
> compiled with -Os, this just doesnt work
>
> example code attached ... to reproduce on an x86 host:
Compile with -save-temps. Look at the declaration of s:
.local s.1776
.comm s.1776,768,32
Tell us what you find.
Andrew.