digitalmars.D.bugs - [Bug 79] New: Assertion failure: mtype.c 364 - using a forward-referenced alias of an undefined type
- d-bugmail puremagic.com (36/36) Apr 01 2006 http://d.puremagic.com/bugzilla/show_bug.cgi?id=79
- Thomas Kuehne (35/48) Apr 02 2006 -----BEGIN PGP SIGNED MESSAGE-----
- d-bugmail puremagic.com (9/9) May 14 2006 http://d.puremagic.com/bugzilla/show_bug.cgi?id=79
- d-bugmail puremagic.com (8/8) May 25 2006 http://d.puremagic.com/bugzilla/show_bug.cgi?id=79
http://d.puremagic.com/bugzilla/show_bug.cgi?id=79
Summary: Assertion failure: mtype.c 364 - using a forward-
referenced alias of an undefined type
Product: D
Version: 0.150
Platform: PC
OS/Version: Windows
Status: NEW
Keywords: ice-on-invalid-code
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla digitalmars.com
ReportedBy: smjg iname.com
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.
It appears to affect all uses of such an alias as a type, as long as the use
precedes the alias declaration:
- declaring a variable or constant, whether at module, function or class/struct
level
- declaring a typedef
- declaring an alias of the derived pointer or array type
- using as a function return type
- using as a function parameter
--
Apr 01 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
d-bugmail 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
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-----
Apr 02 2006
http://d.puremagic.com/bugzilla/show_bug.cgi?id=79
bugzilla digitalmars.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WORKSFORME
Cannot duplicate with 0.157.
--
May 14 2006
http://d.puremagic.com/bugzilla/show_bug.cgi?id=79
bugzilla digitalmars.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |CLOSED
Fixed 0.158
--
May 25 2006









Thomas Kuehne <thomas-dloop kuehne.cn> 