[Issue 4162] New: pass by alias offset problems
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu May 6 15:00:37 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4162
Summary: pass by alias offset problems
Product: D
Version: unspecified
Platform: Other
OS/Version: Linux
Status: NEW
Severity: major
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: k-foley at onu.edu
--- Comment #0 from Kyle Foley <k-foley at onu.edu> 2010-05-06 15:00:35 PDT ---
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.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list