Re: Problem with optimization setting -O3

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

 



Oliver Schneider <oliver@xxxxxxxxxx> writes:

> So I'll try to explain the problem with some pseudo-code. Due to
> Endianess issues we have a macro GET32 that reads a 32bit value assuming
> one Endianess for the data to read and guaranteeing the native Endianess
> of the machine it's running on for the lvalue. There is a PUT32 macro as
> well guaranteeing the inverse for write operations into a memory location.

You need to show us these macros.

My first guess would be an aliasing violation which is causing trouble
when combined with the aggressive inlining done at -O3.  In
particular, see if the code works correctly if you also use the
-fno-strict-aliasing option.  If it does, you most likely have an
aliasing violation.

Ian


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux