This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: Miscompilation of glibc with CVS mainline
- From: Richard Henderson <rth at twiddle dot net>
- To: Ulrich Drepper <drepper at redhat dot com>
- Cc: John David Anglin <dave at hiauly1 dot hia dot nrc dot ca>, "Martin v. Löwis" <martin at v dot loewis dot de>, jakub at redhat dot com, aj at suse dot de, gcc at gcc dot gnu dot org, libc-alpha at sources dot redhat dot com
- Date: Thu, 2 Jan 2003 14:15:09 -0800
- Subject: Re: Miscompilation of glibc with CVS mainline
- References: <200301021851.h02Ipmek011007@hiauly1.hia.nrc.ca> <3E149623.6000506@redhat.com>
On Thu, Jan 02, 2003 at 11:42:27AM -0800, Ulrich Drepper wrote:
> The problem here is that somebody thought s/he can be very clever and
> add one more optimization without knowing the history of gcc. We had
> problems with exactly this situation several times over the last years
> and always it has been the case that gcc was adjusted to *not* remove
> the test.
The history is not quite as you remember.
Once upon a time, GCC wasn't able to track whether or not a
particular symbol is or is not weak at the rtl level, and
thus we had to assume that all symbols were weak.
Now it is the case that we *can* track this, and so we do.
Note that the *only* way to subvert this scheme is to use
inline assembly to force the symbol weak behind gcc's back.
All I can say here is "Don't Do That".
r~