Bug 5966 – [2.053 beta][CTFE] Stack overflow on trivial func

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2011-05-08T22:42:00Z
Last change time
2015-06-09T05:13:48Z
Assigned to
nobody
Creator
bus_dbugzilla

Comments

Comment #0 by bus_dbugzilla — 2011-05-08T22:42:36Z
string[] foo(string[] a) { a[0] = a[0][0..$]; return a; } enum var = foo([""]); > dmd test.d Stack overflow
Comment #1 by bugzilla — 2011-05-09T21:53:23Z
Comment #2 by changlon — 2011-05-09T22:13:30Z
OPTLINK (R) for Win32 Release 8.00.12 Copyright (C) Digital Mars 1989-2010 All rights reserved. http://www.digitalmars.com/ctg/optlink.html OPTLINK : Warning 23: No Stack OPTLINK : Warning 134: No Start Address
Comment #3 by bugzilla — 2011-05-11T13:03:48Z
(In reply to comment #2) > OPTLINK : Warning 23: No Stack > OPTLINK : Warning 134: No Start Address That's because there's no main() function in the source code.