HELP! DMD Asserts while generating DI files.

Adam Wilson flyboynw at gmail.com
Sun Jan 22 23:48:30 PST 2012


Does anyone have any idea why DMD would assert with the following assert  
on this code while building the druntime during DI generation?

Generating This DI file...
// D import file generated from 'src\core\bitop.d'
module core.bitop;
nothrow
{
	pure int bsf(size_t v);

	pure int bsr(size_t v);

	pure int bt(in size_t* p, size_t bitnum);

	int btc(size_t* p, size_t bitnum);
	int btr(size_t* p, size_t bitnum);
	int bts(size_t* p, size_t bitnum);
	pure uint bswap(uint v);

	ubyte inp(uint port_address);
	ushort inpw(uint port_address);
	uint inpl(uint port_address);
	ubyte outp(uint port_address, ubyte value);
	ushort outpw(uint port_address, ushort value);
	uint outpl(uint port_address, uint value);
	int popcnt(uint x);
	debug (UnitTest)
	{
	}
	uint bitswap(uint x);
	debug (UnitTest)
	{
	}
}

produces this assert in DMD: assert cast.c(2082) t1->ty == t2->ty
which appears to be the typeMerge function in cast.c

It doesn't do this on all DI files and I am at a loss as to any rhyme or  
reason for when it does assert. Perhaps someone with knowledge of the  
compiler internals could be of help...

Any ideas would be very helpful!

-- 
Adam Wilson
Project Coordinator
The Horizon Project
http://www.thehorizonproject.org/


More information about the Digitalmars-d mailing list