Re: FYI GCC 4.6.x miscompiles the kernel

From: Krzysztof Halasa
Date: Sun Aug 14 2011 - 12:30:58 EST


Correction: this bug isn't ARM-specific.

Marek Vasut <marek.vasut@xxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/