Bug 10782 – dmd segfault with string mixin, CTFE, class, non-literal initializer

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-08-08T12:17:00Z
Last change time
2015-06-09T01:31:13Z
Keywords
CTFE, ice, pull
Assigned to
nobody
Creator
nilsbossung

Comments

Comment #0 by nilsbossung — 2013-08-08T12:17:17Z
Works with v2.060. Fails since. --- cat > test.d << code enum e = 0; class C {int x = e;} string f() { auto c = new C(); return ""; } mixin(f()); code dmd -c -o- test.d --- Segmentation fault (core dumped) ---
Comment #1 by nilsbossung — 2013-08-08T12:34:04Z
Happens with other non-literal initializers, too: class C {int x = int.max;} class C {int x = 0 + 0;}
Comment #2 by k.hara.pg — 2013-08-15T03:21:27Z
Comment #3 by github-bugzilla — 2013-08-17T18:02:40Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/55447560bcf1a1f2b97083819244f65709aa5f2f fix Issue 10782 - dmd segfault with string mixin, CTFE, class, non-literal initializer https://github.com/D-Programming-Language/dmd/commit/13a0da419abf24549fa8f1caf0dceec373c477cb Merge pull request #2478 from 9rnsr/fix10782 Issue 10782 - dmd segfault with string mixin, CTFE, class, non-literal initializer