digitalmars.D.bugs - [Issue 2920] New: recursive templates blow compiler stack
- d-bugmail puremagic.com (47/47) May 02 2009 http://d.puremagic.com/issues/show_bug.cgi?id=2920
- BCS (4/8) May 02 2009 I was about to mark this as Invalid with a comment that Walter has said ...
- Don (7/17) May 03 2009 Not so, the bug is that there is no error message. For the first case,
- d-bugmail puremagic.com (12/12) May 15 2009 http://d.puremagic.com/issues/show_bug.cgi?id=2920
http://d.puremagic.com/issues/show_bug.cgi?id=2920 Summary: recursive templates blow compiler stack Product: D Version: unspecified Platform: PC OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla digitalmars.com ReportedBy: bugzilla digitalmars.com // dstress template_16 infinite loop. This should generate // a "recursive template expansion" error, but it doesn't. template Template(int i) { mixin Template!(i+1); } mixin Template!(0); // ============================================== // Bugs I cannot reproduce on Windows, but which fail on dstress suite // DMD 1.043 Linux. They are all have the same root cause. // All generate "recursive template expansion" error on Windows // template_17_A. template t(int i){ const int x = t!(i+1).x; } void main(){ int i = t!(0).x; } //template_29_B. template foo(size_t i){ static if(i > 0){ const size_t bar = foo!(i-1).bar; }else{ const size_t bar = 1; } } int main(){ return foo!(size_t.max).bar; } //template_class_09. template Template(int i) { class Class : Template!(i+1).Class{ } } alias Template!(0).Class Class0; --
May 02 2009
Hello d-bugmail puremagic.com,http://d.puremagic.com/issues/show_bug.cgi?id=2920 Summary: recursive templates blow compiler stack ReportedBy: bugzilla digitalmars.comI was about to mark this as Invalid with a comment that Walter has said that this is not going to be fixed (the error is correct, that stack /did/ get blown)... Then I noticed Walter Reported it. <g>
May 02 2009
BCS wrote:Hello d-bugmail puremagic.com,Not so, the bug is that there is no error message. For the first case, there's no error message, for the other cases, there's an error message on Windows, but not on Linux. BTW, (1) the text is mine -- I forwarded it to Walter as part of a list of crashes. (2) if it were not to be fixed, it should be WONTFIX rather than INVALID.http://d.puremagic.com/issues/show_bug.cgi?id=2920 Summary: recursive templates blow compiler stack ReportedBy: bugzilla digitalmars.comI was about to mark this as Invalid with a comment that Walter has said that this is not going to be fixed (the error is correct, that stack /did/ get blown)... Then I noticed Walter Reported it. <g>
May 03 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2920 Don <clugdbug yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |clugdbug yahoo.com.au Resolution| |FIXED Fixed DMD2.030 and 1.045. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 15 2009