Bug 9096 – comsub bug with chained function calls, optimization and attributes
Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
Mac OS X
Creation time
2012-11-29T10:11:58Z
Last change time
2020-03-21T03:56:33Z
Assigned to
No Owner
Creator
Martin Nowak
Comments
Comment #0 by code — 2012-11-29T10:11:58Z
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'.
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