[Issue 2584] GDC on ARM does not honor volatile
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jan 13 03:44:39 PST 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2584
------- Comment #2 from default_357-line at yahoo.de 2009-01-13 05:44 -------
Right. Here we go. I had testcased it incorrectly.
The code to reproduce the error is
struct Test {
uint* ptr;
uint write(uint i) { volatile (*ptr) = i; return i; }
static Test opCall() { // it has to be returned by a function call, otherwise
the error doesn't happen
Test res;
res.ptr = cast(uint*) 0xDEAF_D00D;
return res;
}
}
void main() {
auto mat = Test();
asm { "@baz"; }; // added to make sure it's the correct assembly this time
mat.write(0); mat.write(0); mat.write(0);
return;
}
And the assembly is here http://paste.dprogramming.com/dpag1p5d
--
More information about the D.gnu
mailing list