Bug 12774 – REG(2.066) ICE(optimize.c) Newing struct containing union causes segfault

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-05-20T11:53:00Z
Last change time
2014-05-22T02:37:58Z
Keywords
ice, pull
Assigned to
nobody
Creator
yebblies

Comments

Comment #0 by yebblies — 2014-05-20T11:53:21Z
struct HasUnion { union { int a, b; } } void main() { auto x = new HasUnion(); } This segfaults when trying to optimize `new HasUnion()`, which has been expanded to `new HasUnion(0, )` with the second argument being NULL in the ast.
Comment #1 by dlang-bugzilla — 2014-05-21T02:48:03Z
Comment #2 by k.hara.pg — 2014-05-21T16:10:40Z
Comment #3 by github-bugzilla — 2014-05-21T17:06:54Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/b5c24575a528faf869f61352618d12a805d5c4ca fix Issue 12774 - ICE(optimize.c) Newing struct containing union causes segfault https://github.com/D-Programming-Language/dmd/commit/c6f3e95275ac79bb9ceecbe6d2277f632297182a Merge pull request #3566 from 9rnsr/fix12774 [REG2.066a] Issue 12774 - ICE(optimize.c) Newing struct containing union causes segfault
Comment #4 by dlang-bugzilla — 2014-05-22T02:37:58Z
Ah, my bad! I noticed my Digger cache got messed up today, sorry about that.