682 – dmd segfault with vararg template

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 682 - dmd segfault with vararg template
Summary: dmd segfault with vararg template
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: x86 Windows
: P1 critical
Assignee: Walter Bright
URL:
Keywords:
Depends on:
Blocks:
Reported: 2006年12月12日 22:18 UTC by david
Modified: 2014年02月15日 13:20 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 david 2006年12月12日 22:18:31 UTC
import std.stdio;
template a(char[]name, T...){
	char[] a(T t){
	char[] localchar;
	foreach(a;t)
	{
		localchar=typeof(a).mangleof;
	}
	return localchar;
	}
}
void main()
{
	a!("Adf"[],"afd",1234).a("Adf"[],"adf",1234);
}
dmd output:
global.errors = 0, gag = 0
003CF3F4 .. type=char[] e1=003C80A0
 003C80A0 string type=char[3]
Assertion failure: '0' on line 775 in file 'expression.c'
abnormal program termination
dmd throw me:
Comment 1 Walter Bright 2006年12月27日 02:03:35 UTC
Fixed DMD 0.178


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