Bug 4162 – pass by alias offset problems

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Linux
Creation time
2010-05-06T15:00:00Z
Last change time
2013-11-18T08:41:58Z
Keywords
ice
Assigned to
nobody
Creator
k-foley

Comments

Comment #0 by k-foley — 2010-05-06T15:00:35Z
DMD 2.045 --- import std.stdio; struct B(alias _) { void print() { writeln(&_); } } struct C(alias _) { int i; void print() { writeln(&_); } } int main(string[] args) { int a; auto b = B!(a)(); writeln(&a); b.print(); auto c = C!(a)(); writeln(&a); c.print(); return 0; } --- $ rdmd passByAlias.d B75B5E54 B75B5E54 B75B5E54 804E358 end zsh: segmentation fault rdmd passByAlias.d --- It seems that C having a field messes with what DMD thinks the _ alias refers to.
Comment #1 by k.hara.pg — 2013-11-18T05:53:25Z
Fixed in 2.050.
Comment #2 by github-bugzilla — 2013-11-18T08:41:58Z