www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - Forward reference compiler segfault

reply Chris Newton <redshodan dot.gmail.dot.dooot.com> writes:
Hello,

When I try to compile these two pieces of code the DMD compiler v0.109
segfaults.

----test3A.d-----
module test3A;

import test3B;

class Test3A
{
Test3B.Foo foo;
Test3B test3b;
}

----test3B.d-----
module test3B;

import test3A;

class Test3B
{
typedef Foo;

Test3A test3a;
}
------------

If both source files are on the same commandline and 3B is before 3A the
compiler will segault. If 3A is before 3B it will compile fine. Or if just 3B is
being compiled by itself it will segfault. All of these happen with the same
message.

[baron athe bug3]$ dmd -c -I/usr/local/include/D/phobos test3B.d test3A.d
test3B.d(7): class test3B.Test3B is forward referenced when looking for 'Foo'
Segmentation fault

Thanks,
Chris Newton
Dec 29 2004
parent "Thomas Kuehne" <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Added to DStress as
http://dstress.kuehne.cn/compile/forward_reference_03.d
http://dstress.kuehne.cn/compile/forward_reference_04.d
http://dstress.kuehne.cn/compile/forward_reference_05.d
http://dstress.kuehne.cn/compile/forward_reference_06.d

Thomas

-----BEGIN PGP SIGNATURE-----

iD8DBQFB09fs3w+/yD4P9tIRAvSXAJ93k09AlGkflYzTw0nbjG/WP0hWvwCfT3ke
bcK/glYMNCzIRVGYhnZql38=
=lZjX
-----END PGP SIGNATURE-----
Dec 30 2004