Bug 3287 – DANGER!! Generating wrong binaries by initializing of between different type structs

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2009-09-03T09:08:00Z
Last change time
2015-06-09T01:26:48Z
Keywords
accepts-invalid, wrong-code
Assigned to
nobody
Creator
rayerd.wiz

Comments

Comment #0 by rayerd.wiz — 2009-09-03T09:08:17Z
import std.stdio; struct X { int a; } struct Y { string b; } void main() { Y v = X(10000); writeln(v.b); } // DANGER!! crash on running!!
Comment #1 by jarrett.billingsley — 2009-09-03T09:48:19Z
*** This issue has been marked as a duplicate of issue 2469 ***
Comment #2 by rayerd.wiz — 2009-09-03T11:39:55Z
Oh, sorry! I forgot the first commit. This is the second commit about the same issue.