Bug 14552 – [REG2.066] SIGSEGV with compile construction nested class in predicate

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-05-07T09:39:00Z
Last change time
2015-06-17T21:05:32Z
Keywords
ice, pull
Assigned to
nobody
Creator
japplegame

Comments

Comment #0 by japplegame — 2015-05-07T09:39:53Z
DMD crashes (SIGSEGV) when compiles this code: import std.algorithm : map; class Outer { auto test() { return [1, 2, 3].map!( j => new Inner ); } class Inner {} } If to change declaration Inner class to static, code compiles well. DMD64 D Compiler v2.067.1 CentOS 7 x86_64
Comment #1 by dlang-bugzilla — 2015-05-07T14:26:24Z
No longer crashes with git HEAD. Stopped working after https://github.com/D-Programming-Language/phobos/pull/1917 Started working after https://github.com/D-Programming-Language/dmd/pull/4464
Comment #2 by dlang-bugzilla — 2015-05-08T08:00:55Z
Reduced without Phobos: ////////////////// testNP.d ////////////////// template map(fun...) { template AppliedReturnType(alias f) { alias typeof(f(0)) AppliedReturnType; } auto map(int[] r) { assert(!is(AppliedReturnType!fun)); return MapResult!fun(); } } struct MapResult(alias fun) { @property front() { fun(0); } } class Outer { auto test() { [1].map!( (j) { return new Inner; } ); } class Inner {} } ////////////////////////////////////////////// Crashes as far back as this can compile. Stops crashing after https://github.com/D-Programming-Language/dmd/pull/4464 (as before). Jack: can you confirm that the bug is gone in your real program with D git?
Comment #3 by k.hara.pg — 2015-05-31T15:11:31Z
Add test case to avoid future regression. https://github.com/D-Programming-Language/dmd/pull/4699
Comment #4 by github-bugzilla — 2015-06-01T03:36:32Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/2ad3752b8aac96b2231e68adc13943767a539736 fix Issue 14552 - SIGSEGV with compile construction nested class in predicate Just adding a test case so the SEGV problem was already fixed in the PR #4464. https://github.com/D-Programming-Language/dmd/commit/c4bcaccb6c659d8e44333095f2a03226ea11c2df Merge pull request #4699 from 9rnsr/fix14552 [REG2.066] Issue 14552 - SIGSEGV with compile construction nested class in predicate
Comment #5 by github-bugzilla — 2015-06-17T21:05:32Z