This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc 4.1.2, some testcases fail when built with optimizations


On Tue, Jun 19, 2007 at 02:14:29PM +0200, Hans Rosenfeld wrote:
> On Mon, Jun 18, 2007 at 05:17:56PM -0600, Gary Thomas wrote:
> > If it's not fixed in 4.2, it looks like you have a well documented
> > test case to pass on to the GCC team (that's how bugs get fixed :-)
> 
> Same behaviour in 4.2, I reported it and have been told its an aliasing
> violation (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32397).
> 
> I'm not exactly sure about this whole thing, so I'll not argue with the
> gcc folks about this. Compiling libm with -fno-strict-aliasing makes it
> work, but I don't think that this is a solution at all.
> 
> Note that there is at least another such "bug" in the libm code, but I
> have no idea where.

I just spent 2 minutes of reading the manual. I admit 2 minutes is
probably not enough......

Try playing with __attribute__((__may_alias__)) on 
typedef Cyg_libm_ieee_double_shape_type ieee_double_shape_type;
in mathincl/fdlibm.h.

See 

http://gcc.gnu.org/onlinedocs/gcc-4.2.0/gcc/Type-Attributes.html#Type-Attributes

        Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]