view run/b/bug_tree_inline_1902_A.d @ 1630:d0efa3ae5522 default tip

run/mini/naked_asm5: New x86_64 ABI passes the arguments in reverse order.
author David Nadlinger <code@klickverbot.at>
date Sat, 23 Apr 2011 22:57:32 +0200
parents b6eb7f46f42c
children
line wrap: on
line source

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

// @author@	<llucax@gmail.com>
// @date@	2008-02-01
// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=1813
// @desc@	[Issue 1813] static function parametrized with alias used with delegate throws an internal compiler error.

module dstress.run.b.bug_tree_inline_1902_A;

template thunk(alias fn){
	void thunk(int* arg){
		fn(arg);
	}
}

int main(){
	int x = 1;

	void inner(int* arg){
		if(!(arg !is &x)){
			assert(0);
		}
	}
	thunk!(inner)(&x);
	return 0;
}