Bug 7437 – DMD enters infinite loop during overload resolution
Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-02-04T09:58:00Z
Last change time
2013-03-24T20:57:18Z
Keywords
ice, pull
Assigned to
nobody
Creator
timon.gehr
Comments
Comment #0 by timon.gehr — 2012-02-04T09:58:40Z
With DMD 2.058head, the compilation of the following code does not terminate. -v output suggests DMD hangs in semantic2.
class A{
A x()const{return new A;}
alias x this;
}
int foo(immutable(A) x){return 1;}
int foo(A x){return 2;}
static assert(foo(new immutable(A)) == 1);
Comment #1 by yebblies — 2012-02-04T10:01:25Z
I can't reproduce this. Are you sure you ran make clean before building?
Comment #2 by timon.gehr — 2012-02-04T13:08:47Z
(In reply to comment #1)
> I can't reproduce this. Are you sure you ran make clean before building?
Yes. I just ran these commands and tested again, to be sure:
git pull; make -fposix.mak clean; make -fposix.mak
The problem is also present in DMD 2.057 from the package on the website.
I am running Ubuntu on a x86_64 system.
Comment #3 by lovelydear — 2012-04-19T15:15:39Z
On 2.059 Win32
PS E:\DigitalMars\dmd2\samples> rdmd bug.d
Stack overflow