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

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 5966 - [2.053 beta][CTFE] Stack overflow on trivial func
Summary: [2.053 beta][CTFE] Stack overflow on trivial func
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other Windows
: P2 regression
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
Reported: 2011年05月08日 22:42 UTC by Nick Sabalausky
Modified: 2015年06月09日 05:13 UTC (History)
2 users (show)

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 Nick Sabalausky 2011年05月08日 22:42:36 UTC
string[] foo(string[] a)
{
 a[0] = a[0][0..$];
 return a;
}
enum var = foo([""]);
> dmd test.d
Stack overflow
Comment 2 changlon 2011年05月09日 22:13:30 UTC
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 Walter Bright 2011年05月11日 13:03:48 UTC
(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.


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