1743 – interpret.c:1421 assertion failure on CTFE code

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 1743 - interpret.c:1421 assertion failure on CTFE code
Summary: interpret.c:1421 assertion failure on CTFE code
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: x86 Windows
: P2 normal
Assignee: Walter Bright
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
Reported: 2007年12月19日 20:51 UTC by Daniel Keep
Modified: 2014年02月24日 15:33 UTC (History)
0 users

See Also:


Attachments
Causes assertion failure (3.39 KB, text/plain)
2007年12月19日 20:52 UTC, Daniel Keep
Details
Show Obsolete (1) 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 Daniel Keep 2007年12月19日 20:51:26 UTC
When the attached source file is compiled with DMD 1.024 on Windows XP, the compiler generates the following output:
Assertion failure: 'v' on line 1421 in file 'interpret.c'
abnormal program termination
Sorry the test case is so large; it's very, very difficult to cut down CTFE examples when it's almost impossible to tell why something is or is not evaluable at compile-time (hint, hint! :P)
Comment 1 Daniel Keep 2007年12月19日 20:52:26 UTC
Created attachment 217 [details] 
Causes assertion failure
Compiled with the following:
dmd cr_test
Comment 2 Matti Niemenmaa 2007年12月20日 04:16:46 UTC
Brought it down to the following:
struct PR
{
}
int crRegister_ctfe()
{
	PR pr;
	pr = PR();
	return 0;
}
const i = crRegister_ctfe();
The problem appears to be assigning a struct literal to an already-declared variable. "PR pr = PR();" works fine.
Comment 3 Walter Bright 2008年01月02日 19:47:30 UTC
Fixed dmd 1.025 and 2.009


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