[Bug 79] New: Assertion failure: mtype.c 364 - using a forward-referenced alias of an undefined type

Thomas Kuehne thomas-dloop at kuehne.cn
Sun Apr 2 04:59:52 PDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

d-bugmail at puremagic.com schrieb am 2006-04-01:
> If I forward-reference a type that is an alias of an undefined symbol, DMD
> crashes out.
>
> ----------
> enum : LCTYPE {
>     LOCALE_ILANGUAGE,
> }
>
> alias DWORD LCTYPE;
> ----------
> D:\My Documents\Programming\D\Tests\bugs\winnls.d(1): identifier 'DWORD' is not
> defined
> Assertion failure: 't' on line 364 in file 'mtype.c'
> ----------
>
> after which DMD hangs.

Doesn't hang on Linux, just asserts:

compile/a/alias_33_B.d(13): identifier 'UNDEFINED' is not defined
dmd: mtype.c:364: Type* Type::merge(): Assertion `t' failed.

Program received signal SIGABRT, Aborted.
0x5566ab81 in kill () from /lib32/libc.so.6
(gdb) bt
#0  0x5566ab81 in kill () from /lib32/libc.so.6
#1  0x5566a8f5 in raise () from /lib32/libc.so.6
#2  0x5566bd58 in abort () from /lib32/libc.so.6
#3  0x55663887 in __assert_fail () from /lib32/libc.so.6
#4  0x080c27a0 in Type::merge ()
#5  0x080c63ce in TypeQualified::resolveHelper ()
#6  0x080c6803 in TypeIdentifier::resolve ()
#7  0x080c69a8 in TypeIdentifier::semantic ()
#8  0x0808524f in VarDeclaration::semantic ()
#9  0x080c1688 in Module::semantic ()
#10 0x080bf1b7 in main ()

Added to DStress as
http://dstress.kuehne.cn/nocompile/a/alias_33_A.d
http://dstress.kuehne.cn/nocompile/a/alias_33_B.d
http://dstress.kuehne.cn/nocompile/a/alias_33_C.d
http://dstress.kuehne.cn/nocompile/a/alias_33_D.d
http://dstress.kuehne.cn/nocompile/t/typedef_14_A.d
http://dstress.kuehne.cn/nocompile/t/typedef_14_B.d
http://dstress.kuehne.cn/nocompile/t/typedef_14_C.d
http://dstress.kuehne.cn/nocompile/t/typedef_14_D.d

Thomas


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

iD8DBQFEL7zQ3w+/yD4P9tIRAjUjAJwOyFf7QbBGbKCCenaye7MPQ/aGcACfcNWf
FQLNSMx+BTm7Zu6bvZ+Dre8=
=v2FJ
-----END PGP SIGNATURE-----



More information about the Digitalmars-d-bugs mailing list