[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: binutils-2.15 - work around for gcc optimization problem on s parc -

From: Kelvin Lee
Subject: RE: binutils-2.15 - work around for gcc optimization problem on s parc -sun-solaris2.7
Date: Wed, 14 Jul 2004 17:36:16 +1000

I had thought about this as well.
But that subjects to the C standard defining the operation for misaligned pointers substraction which I don't really know. If the standard does not say anything about this, we can't really say gcc is wrong technically. But indeed the behaviour is really annoying, in particular on Solaris, and it may cause serious problem if you rely on the result (without extra checking) to do further computation.

Anyway, from my previous testings, I can confirm that gcc is really returning weird values for substracting misaligned pointers on Solaris. You can test that with my test program. Actually, the same gcc problem also happens on HP/UX but somehow it didn't cause any noticeable problem for binutils, probably just because the qsort() on HP/UX is more robust than that on Solaris.

I tried to send a bug report to address@hidden but the email was rejected complaining it was in HTML.
After that I forgot about the issue until now.

Kelvin Lee
// LANSA Product Centre
// LANSA Pty Ltd
// phone: +61 (2) 8907 0231
// mailto:address@hidden

> -----Original Message-----
> From: Eric Botcazou [mailto:address@hidden]
> Sent: Wednesday, July 14, 2004 4:57 PM
> To: Nick Clifton
> Cc: Kelvin Lee; 'address@hidden'; 'address@hidden'
> Subject: Re: binutils-2.15 - work around for gcc optimization
> problem on
> sparc -sun-solaris2.7
> > Thanks very much for discovering this problem and producing a
> > workaround.  I have applied the patch you suggested,
> together with this
> > ChangeLog entry:
> >
> > bfd/ChangeLog
> > 2004-07-13  Kelvin Lee  <address@hidden>
> >
> >     * elflink.c (elf_sort_symbol): Restructure code to avoid bug in
> >     Solairs hosted versions of gcc.
> I'm a bit confused by this patch:
> - is there really a bug "in Solaris hosted versions of gcc"
> involved here? 
> If so, it would be nice to produce a testcase and file a PR with GCC
> bugzilla (cc-ing address@hidden would be even nicer).
> - is the bug reported by Kevin not a mere duplicate of
>   http://sources.redhat.com/ml/binutils/2004-06/msg00089.html
> which has been fixed by
>   http://sources.redhat.com/ml/binutils/2004-06/msg00114.html
> in which case the patch is superfluous and the ChangeLog entry a bit
> misleading?
> --
> Eric Botcazou

reply via email to

[Prev in Thread] Current Thread [Next in Thread]