Bug 5844 – DMD crash on infinite-recursive variadic template pure auto function

Status
RESOLVED
Resolution
DUPLICATE
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Mac OS X
Creation time
2011-04-14T01:18:00Z
Last change time
2011-06-06T06:21:15Z
Keywords
ice-on-invalid-code
Assigned to
nobody
Creator
kennytm

Comments

Comment #0 by kennytm — 2011-04-14T01:18:50Z
The following program caused a 'Bus Error' in DMD when compiling: ---------------------- pure auto j(T...)(int) { j!T(0); } void main() { j!int(1); } ---------------------- The 'Bus Error' doesn't happen when either 'pure' is removed, or 'auto' is changed to 'void'. The 'Bus Error' does not happen at least on 2.048. It simply writes x.d(2): Error: forward reference to inferred return type of function call j(0) x.d(6): Error: template instance x.j!(int) error instantiating
Comment #1 by clugdbug — 2011-06-06T06:21:15Z
The patch in 5936 also fixes this. *** This issue has been marked as a duplicate of issue 5936 ***