Mercurial > projects > dstress
view run/v/volatile_01_B.d @ 1576:b3e16c86558e
[Issue 1398] New: GDC doesn't generate correct code
<mariusmuja@gmail.com>
2007-08-04
http://d.puremagic.com/issues/show_bug.cgi?id=1398
author | thomask |
---|---|
date | Thu, 21 Feb 2008 15:20:08 +0000 |
parents | 20d8ee6523e1 |
children | 56d43974b468 |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Autor$ // @author@ Sean Kelly <sean@f4.ca> // @date@ 2005-07-31 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=4638 module dstress.run.v.volatile_01_B; template load( T, int i, size_t sizeofT : 4 = T.sizeof ){ T load( ref T val ){ asm{ naked; mov EAX, [EAX]; ret; } } } int main(){ int i; load!(int,1)(i); load!(int,2)(i); return 0; }