Bug 355 – ICE from enum : nonexistent type

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2006-09-19T16:46:00Z
Last change time
2014-02-15T13:21:21Z
Keywords
ice-on-invalid-code
Assigned to
bugzilla
Creator
jpelcis

Comments

Comment #0 by jpelcis — 2006-09-19T16:46:20Z
If there is only one element, this will not give the compiler problems. -------------------- enum foo : type { blah1, blah2 } -------------------- dmd -run test test.d(1): identifier 'type' is not defined test.d(1): type is used as a type test.d(1): enum test.foo base type must be of integral type, not void Assertion failure: '0' on line 160 in file 'enum.c' abnormal program termination
Comment #1 by thomas-dloop — 2006-09-20T14:20:46Z
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 [email protected] schrieb am 2006-09-19: > http://d.puremagic.com/issues/show_bug.cgi?id=355 > If there is only one element, this will not give the compiler problems. > > -------------------- > > enum foo : type { > blah1, > blah2 > } > > -------------------- > > dmd -run test > test.d(1): identifier 'type' is not defined > test.d(1): type is used as a type > test.d(1): enum test.foo base type must be of integral type, not void > Assertion failure: '0' on line 160 in file 'enum.c' > > abnormal program termination Added to DStress as http://dstress.kuehne.cn/nocompile/e/enum_47_A.d http://dstress.kuehne.cn/nocompile/e/enum_47_B.d http://dstress.kuehne.cn/nocompile/e/enum_47_C.d http://dstress.kuehne.cn/nocompile/e/enum_47_D.d http://dstress.kuehne.cn/nocompile/e/enum_47_E.d http://dstress.kuehne.cn/nocompile/e/enum_47_F.d http://dstress.kuehne.cn/nocompile/e/enum_47_G.d http://dstress.kuehne.cn/nocompile/e/enum_47_H.d http://dstress.kuehne.cn/nocompile/e/enum_47_I.d http://dstress.kuehne.cn/nocompile/e/enum_47_J.d http://dstress.kuehne.cn/nocompile/e/enum_47_K.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFFEYmgLK5blCcjpWoRAupPAJ9SnQKDw/HPbyxRUZHTnqWfanP17ACeIEs7 LqI+GXbAhSxY8K7b5Q4ukqY= =+Lgl -----END PGP SIGNATURE-----
Comment #2 by matti.niemenmaa+dbugzilla — 2006-09-30T09:44:25Z
Also happens if the base type is void: enum foo : void { a, b }
Comment #3 by thomas-dloop — 2006-10-02T03:15:37Z
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 [email protected] schrieb am 2006-09-30: > http://d.puremagic.com/issues/show_bug.cgi?id=355 > ------- Comment #2 from [email protected] 2006-09-30 09:44 ------- > Also happens if the base type is void: > > enum foo : void { a, b } Added to DStress as http://dstress.kuehne.cn/nocompile/e/enum_47_L.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFFIMrjLK5blCcjpWoRAj93AJ4k35Aj3UskYB40m55pbBtkpfOxuwCfefdR 1eyRAEShZIF/8bcH/rSoep0= =r+fe -----END PGP SIGNATURE-----
Comment #4 by bugzilla — 2006-11-25T03:49:36Z
Fixed DMD 0.175