BCC Fails Assert in cgint64.cpp

Archives Forums/BlitzMax Bug Reports/BCC Fails Assert in cgint64.cpp

Otus(Posted 2009) [#1]
Compiling one of my files I get:
Building gen_table
Compiling:gen_table.bmx
Assertion failed: 0, file c:/blitzmax/_src/codegen/cgint64.cpp, line 193
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Build Error: failed to compile <snip>/gen_table.bmx
Process complete


Plus a Vista "checking for solution" window.

I'll see about narrowing the code down later today once I get on my normal computer, but I'm doing some rather low level bit-manipulation like the below lines:
	MemMove(Long Ptr(ids)+high+1, Long Ptr(ids)+high, (numids - high) * 8)
	' ...
		hid :+ Long(1) Shl (r + (s-1)*13)
	' ...
	Return Long Ptr(Byte Ptr(ids2))[0]



Otus(Posted 2009) [#2]
Ok, seems the problem was me casting a Long to a Byte Ptr, which makes no sense to the compiler. Compiling the code below crashes:

SuperStrict
Framework BRL.StandardIO

Local lvar:Long
Local b:Byte Ptr = Byte Ptr(lvar)