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.