[Issue 10563] New: Accessing const/immutable string array in CTFE crashes dmd.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jul 6 22:13:32 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10563
Summary: Accessing const/immutable string array in CTFE crashes
dmd.
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: iselix1988+dbugzilla at gmail.com
--- Comment #0 from iselix1988+dbugzilla at gmail.com 2013-07-06 22:13:31 PDT ---
Accessing const/immutable string array in struct/class in CTFE, cause dmd
crashes by segmentation fault.
See code below.
----
immutable string[] array = ["0"];
class cls{
immutable string[] array = ["0"];
}
struct str{
immutable string[] array = ["0"];
}
auto top(T)(T t){
return t[0];
}
pragma(msg, array.top); // OK
pragma(msg, cls.array.top); // SEGV
pragma(msg, str.array.top); // SEGV
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list