cat > bug.d << CODE class Foo { size_t tsize() { return 0; } inout(Foo) next() nothrow pure inout { return this; } } void bug() { auto foo = new Foo(); auto sz = foo.next().tsize(); } CODE dmd -c -m32 -O -release -inline bug.d Internal error: backend/cgcod.c 2114 ------ This seems to be OSX32 only. This happens only with 'nothrow pure inout'. This happens only with '-O -release -inline'.
This blocks https://github.com/D-Programming-Language/druntime/pull/359.
Same problem occurs in Windows7 (64bit) platform with git head (b729055). output: ---- DMD v2.062 DEBUG el:0035139C cnt=2 cs=255 var TY* foo Internal error: backend\cgcod.c 2188