view run/a/alias_38_A.d @ 1171:3fcbbd7f7873

[Issue 396] New: aliased identifier in asm blocks cause compiler segment faults Thomas Kuehne <thomas-dloop@kuehne.cn> 2006-10-03 news:bug-396-3@http.d.puremagic.com/issues/
author thomask
date Wed, 04 Oct 2006 06:28:17 +0000
parents
children daef239f37cf
line wrap: on
line source

// $HeadURL$
// $Date$
// $Author$

// @author@	Thomas Kuehne <thomas-dloop@kuehne.cn>
// @date@	2006-10-03
// @uri@	news:bug-396-3@http.d.puremagic.com/issues/
// @desc@	[Issue 396] New: aliased identifier in asm blocks cause compiler segment faults

module dstress.run.a.alias_38_A;

version(D_InlineAsm_X86){
	version = runTest;
}else version(D_InlineAsm_X86_64){
	version = runTest;
}

version(runTest){
	int main(){
		int x = 1;

		alias x y;

		asm{
			inc y;
		}

		if(y != 2){
			assert(0);
		}

		return 0;
	}
}else{
	pragma(msg, "DSTRESS{XFAIL}: no inline ASM support");
	static assert(0);
}