view run/p/ptr_10_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 9a121126b077
children
line wrap: on
line source

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

// @author@	Derek Parnell <derek@psych.ward>
// @date@	2005-06-15
// @uri@	news:1lruav5hsvxn6$.uj97bpn5gk38$.dlg@40tude.net
// @desc@	empty array length and ptr

module dstress.run.p.ptr_10_A;

void test(char[] x, int len, bool nonNull){

	if (x.length != len)
		assert(0);

	if (nonNull && x.ptr is null)
		assert(0);

	if (!nonNull && x.ptr !is null)
		assert(0);
}

int main(){
	test("abc", 3, true);
	return 0;
}