1174 – Program hangs creating an array of enums with nonzero initializer

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 1174 - Program hangs creating an array of enums with nonzero initializer
Summary: Program hangs creating an array of enums with nonzero initializer
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: x86 All
: P2 major
Assignee: Walter Bright
URL:
Keywords: wrong-code
Depends on:
Blocks:
Reported: 2007年04月21日 10:16 UTC by Matti Niemenmaa
Modified: 2014年02月16日 15:23 UTC (History)
0 users

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description Matti Niemenmaa 2007年04月21日 10:16:30 UTC
enum Enum {
	A = 1
}
void main() {
	Enum[] enums = new Enum[1];
}
DMD compiles the above fine, but it seems the call to __d_newarray never returns. Using the .length method instead of new fails in the same way, but changing A = 1 to A = 0 (or adding another member with a value of zero prior to A) makes it work.
Comment 2 Walter Bright 2007年04月27日 14:58:22 UTC
Fixed DMD 1.014


AltStyle によって変換されたページ (->オリジナル) /