Patch to get GDC up to 1.028

downs default_357-line at yahoo.de
Fri Mar 7 21:04:03 PST 2008


shinichiro.h wrote:
> Nice work!
> 
> I've also tried to make GDC use newer 2.*, but I've not done yet. By
> the way I found a bug in your patch. You are so careful that you are
> warning this can be a bug though.
> 
> http://d.puremagic.com/issues/show_bug.cgi?id=1575
> 
> breaks compiler like:
> 
> % gdc1 bug1575.d
> TupleExp::toElem() tuple(_s_field_0 = _param_0,_s_field_1 = _param_1)
> bug1575.d: In function 'foo':
> bug1575.d:11: 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.
> EXPER: Uneducated guesswork ensues. Beware.
> 
> I think removing TupleExp::toElem from expression.c and adding
> 
> elem *
> TupleExp::toElem(IRState * irs)
> {
>     tree result = NULL_TREE;
>     for (unsigned i = 0; i < exps->dim; i++) {
> 	Expression * e = (Expression *) exps->data[i];
> 	tree elem_e = e->toElem( irs );
> 	result = irs->maybeCompound(result, elem_e);
>     }
>     return result;
> }
> 
> into d-glue.c will work.

Sweet, thanks!

I could never have gotten that - as I wrote, uneducated guesswork :)

I'll put it in the patch as soon as I can.

 --downs


More information about the D.gnu mailing list