view run/offsetof_07.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 dbb7a0ee8baf
children
line wrap: on
line source

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

module dstress.nocompile.offsetof_07;

struct MyStruct{
	int a;
	int b;	
}

int main(){
	MyStruct s;
	
	assert(MyStruct.a.offsetof >= 0);
	assert(MyStruct.b.offsetof >= 0);
	assert(MyStruct.a.offsetof != MyStruct.b.offsetof);

	return 0;
}