Pedro Alves a écrit :
> pgeorges wrote:
>> I ported this program to evc4, and I get the same type of crash. So 
>> cegcc is ok, but I don't understand why this code works well with gcc 
>> on x86, and why the crash only occurs with optimisation on.
>>
>
> Sounds a lot like you're having some alignment problems.  x86 is happy
> dereferencing pointers into unaligned data, but ARM does not.
>
> I would look for stuff like *(int*)char_ptr = xxxx, to start with.
Thank you very much, this was the origin of the crash.
I used -Wcast-align to find easily the places where the bugs reside. I 
think this option should be always turned on.

Pascal

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel

Reply via email to