view run/v/volatile_01_B.d @ 1560:36bedfa079e6

D1 -> D2 : 2/N
author thomask
date Sun, 19 Aug 2007 19:15:01 +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;
}