www.digitalmars.com         C & C++   DMDScript  

D.gnu - -fonly causes GDC to crash

reply "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
In an attempt to get MiniD to compile under the new GDC 0.20, I found out 
about the -fonly flag from DSSS.  It's what DSSS uses to "resolve circular 
dependencies."

Here's the thing -- I have no idea what this flag does.  I can't find 
documentation for it anywhere.  I did "gdc -v --help" and -fonly doesn't 
appear anywhere in the output.

This is the only way I have ever heard of anyone successfully compiling 
MiniD using GDC short of combining the two files which mutually import one 
another.

All I can get it to do is to give me an error.  Even in the simplest 
possible case:

gdc -fonly=test.d

I get the error:

Assertion failed: an_output_module, file 
../../gcc-3.4.2-20040916-1/gcc/d/d-lang
.cc, line 907

This application has requested the Runtime to terminate it in an unusual 
way.
Please contact the application's support team for more information.
dtest.d:0: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.mingw.org/bugs.shtml> for instructions.

Did this appear in 0.20?  Am I using it wrong? 
Dec 17 2006
parent reply Gregor Richards <Richards codu.org> writes:
Jarrett Billingsley wrote:
 In an attempt to get MiniD to compile under the new GDC 0.20, I found out 
 about the -fonly flag from DSSS.  It's what DSSS uses to "resolve circular 
 dependencies."
 
 Here's the thing -- I have no idea what this flag does.  I can't find 
 documentation for it anywhere.  I did "gdc -v --help" and -fonly doesn't 
 appear anywhere in the output.
 
 This is the only way I have ever heard of anyone successfully compiling 
 MiniD using GDC short of combining the two files which mutually import one 
 another.
 
 All I can get it to do is to give me an error.  Even in the simplest 
 possible case:
 
 gdc -fonly=test.d
 
 I get the error:
 
 Assertion failed: an_output_module, file 
 ../../gcc-3.4.2-20040916-1/gcc/d/d-lang
 .cc, line 907
 
 This application has requested the Runtime to terminate it in an unusual 
 way.
 Please contact the application's support team for more information.
 dtest.d:0: internal compiler error: Aborted
 Please submit a full bug report,
 with preprocessed source if appropriate.
 See <URL:http://www.mingw.org/bugs.shtml> for instructions.
 
 Did this appear in 0.20?  Am I using it wrong? 
 
 
-fonly is only documented in that it's used from the gdmd wrapper. Basically: gdc -c <EVERY .d file> <-fonly=the .d file you want to compile> Otherwise it will only parse one at a time. It's ... weird. - Gregor Richards
Dec 18 2006
parent "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Gregor Richards" <Richards codu.org> wrote in message 
news:4586BE81.5010400 codu.org...

 -fonly is only documented in that it's used from the gdmd wrapper.

 Basically: gdc -c <EVERY .d file> <-fonly=the .d file you want to compile>

 Otherwise it will only parse one at a time. It's ... weird.

  - Gregor Richards
Ahh, sweet, now it works. Didn't think to put the -fonly file in the regular file list as well. Though that bug with that simple test case should probably be reported..
Dec 18 2006