FYI GCC 4.6.x miscompiles the kernel

Krzysztof Halasa khc at pm.waw.pl
Sun Aug 14 12:05:55 EDT 2011


Correction: this bug isn't ARM-specific.

Marek Vasut <marek.vasut at gmail.com> writes:

>> Current gcc-4.6.x SVN, ARMEB EABI.
>
> Shouldn't this go to GCC ML too ?

Nope, I put it in bugzilla.

>> unsigned var[2];
>>
>> void test(int arg)
>> {
>>         unsigned v = *(volatile unsigned *)(&var[arg]);
>>         *(volatile unsigned *)(&var[arg]) = v;
>> }
>>
>> Disassembly of section .text:
>>
>> 00000000 <test>:
>>    0:   e12fff1e        bx      lr

On x86-64:
0000000000000000 <test>:
   0:   f3 c3                   repz retq
-- 
Krzysztof Halasa



More information about the linux-arm-kernel mailing list