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