www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - DMD crash on for(;;) construct

reply Mike Swieton <mike swieton.net> writes:
The compiler (0.90) segfaults on Linux trying to compile the this code:

class X
{
	 final synchronized void foo()
	 {
		 for(;;) {
		 }
		 //while(true) {
		 //}
	 }
}

int main(char[][] args)
{
	X x = new X;

	x.foo();

	return 0;
}

Mike Swieton
__
We're weirder for being able to pass for normal.
	- The Pet Rock
May 26 2004
parent Ben Hinkle <bhinkle4 juno.com> writes:
that's funny. I was just going to report the same thing. The concurrent lib
uses that all over the place and it took my forever to narrow it down. I
imagine you went through the same process.
I've also noticed the compiler is very picky about the order of declarations
when you start throwing in mixins and nested classes and such. I haven't
figured out any good tests cases though. If one throws in aliases to try to
help I typically get the assert failure at line 2567 about
DYNCAST_IDENTIFIER.

Mike Swieton wrote:

 
 The compiler (0.90) segfaults on Linux trying to compile the this code:
 
 class X
 {
 final synchronized void foo()
 {
 for(;;) {
 }
 //while(true) {
 //}
 }
 }
 
 int main(char[][] args)
 {
 X x = new X;
 
 x.foo();
 
 return 0;
 }
 
 Mike Swieton
 __
 We're weirder for being able to pass for normal.
 - The Pet Rock

May 26 2004