view run/d/double_27_A.d @ 1576:b3e16c86558e

[Issue 1398] New: GDC doesn't generate correct code <mariusmuja@gmail.com> 2007-08-04 http://d.puremagic.com/issues/show_bug.cgi?id=1398
author thomask
date Thu, 21 Feb 2008 15:20:08 +0000
parents 9dcac8d4e97f
children
line wrap: on
line source

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

// based on: gcc.c-torture/execute/ieee/20010226-1.c

module dstress.run.d.double_27_A;

double dfrom = 1.1;
double m1;
double m2;

ulong mant_long;

int main(){
	m1 = dfrom / 2.0;
	m2 = m1 * 4294967296.0;
	mant_long = (cast(ulong) m2) & 0xFFFF_FFFF;

	if(mant_long != 0x8CCC_CCCC){
		assert(0);
	}

	return 0;
}