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
Comment #4 by k.hara.pg — 2012-06-27T19:43:20Z
Comment #5 by k.hara.pg — 2013-01-21T14:24:57Z
*** Issue 9318 has been marked as a duplicate of this issue. ***
Comment #6 by github-bugzilla — 2013-03-06T18:04:17Z
Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/ef9a73ca6719172c51b1abf0b94d238d1df87674 Merge pull request #1028 from 9rnsr/fix_aliasthis Issue 7437,7980,8053 - Partial fix for stack overflow with recursive alias this
Comment #7 by github-bugzilla — 2013-03-24T20:57:18Z