www.digitalmars.com         C & C++   DMDScript  

D.gnu - gdc crashes compiling DMDScript

reply "B.G." <gbatyan gmx.net> writes:
Hi, everyone!
I've tried to compile the latest DMDScript version using gdc 0.11,
gdc segfaults trying to compile the file dregexp.d (see attachment)

[DMD 0.121 and 0.122 works fine by the way]

Tested with:
gcc v. 3.4
gdc v. 0.11
DMDScript version - no idea, sorry, downloaded several hours ago.

here is the compilation log:
----------------------------------
dmdscript$ make -f linux.mak
dmd -c textgen.d
dmd -oftextgen ./textgen.o
./textgen
dmd -c -I.. -O -release identifier.d
dmd -c -I.. -O -release lexer.d
dmd -c -I.. -O -release parse.d
dmd -c -I.. -O -release expression.d
dmd -c -I.. -O -release errmsgs.d
dmd -c -I.. -O -release -inline property.d
dmd -c -I.. -O -release iterator.d
dmd -c -I.. -O -release -inline value.d
dmd -c -I.. -O -release dmath.d
dmd -c -I.. -O -release dnative.d
dmd -c -I.. -O -release dstring.d
dmd -c -I.. -O -release ddate.d
dmd -c -I.. -O -release dboolean.d
dmd -c -I.. -O -release dnumber.d
dmd -c -I.. -O -release dregexp.d
dregexp.d:212: cannot use "this.Dfunction" as an expression
dregexp.d: In member function `Get':
dregexp.d:212: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
make: *** [dregexp.o] Error 1

---------------------------
and here is the code snippet   line 212:

     210     Value* Get(d_string PropertyName)
     211     {
     212         return Dfunction.Get(perlAlias(PropertyName));
     213     }

Is that a known bug or something?

Kind regards!
May 10 2005
next sibling parent reply "B.G." <gbatyan gmx.net> writes:
I'm sorry, can't get thunderbird to send the source code as an 
attachment. It just appears as inlined text to me, or maybe it's the 
matter of representation.
Does it appear as a regular attachment to someone (not using mozilla 
thunderbird)?
May 10 2005
parent John Reimer <brk_6502 yahoo.com> writes:
B.G. wrote:
 I'm sorry, can't get thunderbird to send the source code as an 
 attachment. It just appears as inlined text to me, or maybe it's the 
 matter of representation.
 Does it appear as a regular attachment to someone (not using mozilla 
 thunderbird)?
It came through as an attachment. Mozilla Thunderbird /displays/ most text attachments as if they were inline. -JJR
May 10 2005
prev sibling parent reply =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
B.G. wrote:

 I've tried to compile the latest DMDScript version using gdc 0.11,
 gdc segfaults trying to compile the file dregexp.d (see attachment)
 
 [DMD 0.121 and 0.122 works fine by the way]
DMDScript uses a few non-portable constructs... For dregexp.d, it refers static functions in a class in another module. In GDC, you must use the full class name with module name when doing so: "dmdscript.dfunction.Dfunction", instead of "Dfunction". Another thing is irstate.d, which uses casting instead of the templates provided by std.c.stdarg to access the variadic arguments. Doesn't work. should use "va_start" and "va_arg", instead of "ap". There's a couple of things that doesn't work on Darwin (the Makefile, some invariants, and template linking problems). But then I'll post... Error: circular initialization dependency with module protoerror --anders
May 12 2005
parent reply David Friedman <d3rdclsmail_a_ _t_earthlink_d_._t_net> writes:
Anders F Björklund wrote:
 B.G. wrote:
 
 I've tried to compile the latest DMDScript version using gdc 0.11,
 gdc segfaults trying to compile the file dregexp.d (see attachment)

 [DMD 0.121 and 0.122 works fine by the way]
DMDScript uses a few non-portable constructs... For dregexp.d, it refers static functions in a class in another module. In GDC, you must use the full class name with module name when doing so: "dmdscript.dfunction.Dfunction", instead of "Dfunction".
There's nothing wrong with dregexp.d -- the error message is a GDC bug.
 Another thing is irstate.d, which uses casting instead of the templates
 provided by std.c.stdarg to access the variadic arguments. Doesn't work.
 
     should use "va_start" and "va_arg", instead of "ap".
 
 There's a couple of things that doesn't work on Darwin (the Makefile,
 some invariants, and template linking problems). But then I'll post...
 
 Error: circular initialization dependency with module protoerror
 
 --anders
Because DMD is now using weak references for module imports, I had to come up with an alternate scheme for targets that don't support weak linking (e.g. baseline gcc on Darwin.) Looks like it backfired... David
May 12 2005
next sibling parent =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
David Friedman wrote:

 For dregexp.d, it refers static functions in a class in another module.
 In GDC, you must use the full class name with module name when doing so:

     "dmdscript.dfunction.Dfunction", instead of "Dfunction".
There's nothing wrong with dregexp.d -- the error message is a GDC bug.
My C code is full of workarounds for buggy compilers... I don't think D will be any exception in this regard ? But it would of course be nice if this particular one could be fixed, especially since it's not "released" yet.
 Error: circular initialization dependency with module protoerror
Because DMD is now using weak references for module imports, I had to come up with an alternate scheme for targets that don't support weak linking (e.g. baseline gcc on Darwin.) Looks like it backfired...
All I know is that fancy templates now doesn't work all that good ? Neither DMDScript nor Mango works, when using the Darwin version... They compile alright, but fail spectacularly at run-time instead. But the normal non-template code does, which is good enough for me. --anders
May 13 2005
prev sibling parent Thomas Kuehne <thomas-dloop kuehne.thisisspam.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David Friedman schrieb am Fri, 13 May 2005 00:51:51 -0400:
 Anders F Björklund wrote:
 B.G. wrote:
 
 I've tried to compile the latest DMDScript version using gdc 0.11,
 gdc segfaults trying to compile the file dregexp.d (see attachment)

 [DMD 0.121 and 0.122 works fine by the way]
DMDScript uses a few non-portable constructs... For dregexp.d, it refers static functions in a class in another module. In GDC, you must use the full class name with module name when doing so: "dmdscript.dfunction.Dfunction", instead of "Dfunction".
There's nothing wrong with dregexp.d -- the error message is a GDC bug.
Added to DStress as http://dstress.kuehne.cn/run/s/static_31.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFChcXo3w+/yD4P9tIRAuogAKDJACxr9BRSVD6Z+fIMdYjZnesc4wCePa3p P8Yq7LS1s/P6ma30K3UMfGo= =4Jsp -----END PGP SIGNATURE-----
May 14 2005