Bug 1325 – Forward declaration crashes gdc

Status
RESOLVED
Resolution
FIXED
Severity
critical
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
All
Creation time
2007-07-09T16:10:00Z
Last change time
2015-06-09T01:31:22Z
Assigned to
dvdfrdmn
Creator
tortoise_74

Comments

Comment #0 by tortoise_74 — 2007-07-09T16:10:56Z
Hi, Apologies if this is a duplicate. My bugzilla search did not find it. This is also my first attempt at D programming. An unresolved forward reference causes a segfault on cygwin. See following code. If the forward reference is replaced by an empty definition everything is fine. prompt>gdc --version gdc (GCC) 3.4.4 (cygming special, gdc 0.12, using dmd 0.125) As far as I'm aware this is the latest version of gdc available for cygwin. This is probably the route of the problem. <code file="foo.d"> class forwardRef; interface foo { public: abstract void bar(in forwardRef task); }; </code> >gdc -c foo.d -o foo.o foo.d:0: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. Note: the same problem occurs if -mno-cygwin is used. Regards, Bruce.
Comment #1 by casantander1 — 2007-07-09T16:17:10Z
Confirmed to happen on Mac too. GDC 0.23 + Gregor's 1.018 patch. As a side note, you can download more recent binaries from GDC's SourceForge site.
Comment #2 by tortoise_74 — 2007-07-10T17:19:34Z
I can confirm this happens with the latest version of gdc as well. F:\projects\Agenda>gdc --version gdc (GCC) 3.4.4 (cygming special, gdc 0.23, using dmd 1.007)) I also get: cc1d: warning: command line option "-iprefix" is valid for C/C++/ObjC/ObjC++ but not for D Which probably an artifact of how I installed the later version by copying it into the cygwin directory. If there's a better way it should be documented somewhere.
Comment #3 by dvdfrdmn — 2007-07-13T17:49:23Z
fixed in svn r123 / release 0.24
Comment #4 by thomas-dloop — 2008-02-25T05:04:55Z