524 – Compiler crash when compiling

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 524 - Compiler crash when compiling
Summary: Compiler crash when compiling
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: Other Linux
: P2 blocker
Assignee: Walter Bright
URL:
Keywords:
Depends on:
Blocks:
Reported: 2006年11月15日 16:42 UTC by Marcin Kuszczak
Modified: 2014年02月15日 13:21 UTC (History)
0 users

See Also:


Attachments
Trying to compile attachment makes compiler crashing... (1.95 KB, application/octet-stream)
2006年11月15日 16:46 UTC, Marcin Kuszczak
Details
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 Marcin Kuszczak 2006年11月15日 16:42:27 UTC
boost::any implementation in d has a bad luck... It was already not linking when compiling as separate files (bug #384), and in 0.174 compiler just crashes when trying to compile it... Binary is not produced. I could not gather much more info than above, so I attache test files.
Comment 1 Marcin Kuszczak 2006年11月15日 16:46:10 UTC
Created attachment 50 [details] 
Trying to compile attachment makes compiler crashing...
Comment 2 Marcin Kuszczak 2006年11月26日 05:45:31 UTC
After some testing it occurred that this regression was introduced in 0.173. 0.172 works fine.
Comment 3 Nazo Humei 2006年11月26日 07:25:17 UTC
I think that this bug is caused in nested template class.
I made simple testcase:
static class Test{
 void test(T)() {
 new Inner!(T)();
 }
 class Inner(T) {
 void test(){ new Inner!(T)();}//maybe this is causing infinite loop
 }
}
void test(T)(){new Test2!(T)();}
class Test2(T) {
 void test(){ new Test2!(T)();}
}
void main(){
 test!(int);//ok
 (new Test).test!(int);//crash
}
Comment 4 Matti Niemenmaa 2006年12月03日 03:40:50 UTC
Fixed in DMD 0.176.
Comment 5 Thomas Kühne 2006年12月30日 20:10:36 UTC
Added to DStress as
http://dstress.kuehne.cn/run/t/template_class_19_A.d 


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