Bug 1415 – gdc crash

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Other
Creation time
2007-08-12T22:15:00Z
Last change time
2015-06-09T05:15:04Z
Keywords
ice-on-invalid-code
Assigned to
dvdfrdmn
Creator
sean

Comments

Comment #0 by sean — 2007-08-12T22:15:47Z
See sample code. Very easy to reproduce. $ gdc -o /tmp/bug.o -c /tmp/bug.d /tmp/bug.d:7: Error: Need 'this' to access member f /tmp/bug.d:8: Error: Need 'this' to access member f /tmp/bug.d: In function 'init': /tmp/bug.d:8: internal compiler error: Segmentation fault: 11 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. Exit 1 ### BEGIN CODE ### class Foo { void bar() { } } class Bug { static Bug init() { f = new Foo(); f.bar(); Bug ret = new Bug(); return ret; } private: Foo f; } ### END CODE ###
Comment #1 by witold.baryluk+d — 2007-09-02T08:41:19Z
Simpler example. module bug; class X { char[] name; static void a() { assert(name is null); } } void main() { }
Comment #2 by dvdfrdmn — 2007-09-05T18:22:41Z
Fixed in svn rev 151 / release 0.25
Comment #3 by thomas-dloop — 2008-02-25T05:06:01Z