Bug ID 173
Summary internal compiler error typeMerge
Product GDC
Version 4.9.x
Hardware All
OS All
Status NEW
Severity minor
Priority Normal
Component gdc
Assignee ibuclaw@gdcproject.org
Reporter danny.milo+a@gmail.com

struct Cell {
    dchar code;
    alias code this; // FIXME?
}
struct Row {
    Cell[] fCells; // actually dchar[][] would be better.
    Cell opIndex(int x) {
        return (x >= 0) ? fCells[x] : ' ';
    }
}
int main() {
    return 0;
}

gdc (Debian 4.9.1-19) 4.9.1
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ gdc a.d
cc1d: ../../src/gcc/d/dfrontend/cast.c:2691: int typeMerge(Scope*, Expression*,
Type**, Expression**, Expression**): Assertion `t1->ty == t2->ty' failed.
cc1d: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.8/README.Bugs> for instructions.

It's because fCells[x] :: Cell and ' ' :: char. Only happens with the "alias
this".


You are receiving this mail because: