FYI ARM GCC 4.6.x miscompiles the kernel

Krzysztof Halasa khc at pm.waw.pl
Sat Aug 13 19:10:21 EDT 2011


Current gcc-4.6.x SVN, ARMEB EABI.

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
-- 
Krzysztof Halasa



More information about the linux-arm-kernel mailing list