D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 9096 - comsub bug with chained function calls, optimization and attributes
Summary: comsub bug with chained function calls, optimization and attributes
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All Mac OS X
: P2 major
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-29 10:11 UTC by Martin Nowak
Modified: 2020-03-21 03:56 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Martin Nowak 2012-11-29 10:11:58 UTC
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'.
Comment 1 Martin Nowak 2012-11-29 10:15:57 UTC
This blocks https://github.com/D-Programming-Language/druntime/pull/359.
Comment 2 Kenji Hara 2013-02-17 02:20:25 UTC
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