Bug 9346 – nested struct calls disabled postblit

Status
RESOLVED
Resolution
FIXED
Severity
critical
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-01-18T03:44:00Z
Last change time
2013-04-26T04:23:22Z
Keywords
accepts-invalid, link-failure, pull
Assigned to
nobody
Creator
monarchdodra

Comments

Comment #0 by monarchdodra — 2013-01-18T03:44:49Z
//---- struct S { @disable this(this) //{assert(false);} ; } struct SS1 { S s; } struct SS2 { S s; this(this){} } void main() { S s; SS1 ss1 = SS1(s); SS2 ss2 = SS2(s); } //---- Produces: //---- main.obj(main) Error 42: Symbol Undefined _D4main1S10__postblitMFZv //---- We can uncomment the postblit implementation, it which case it will link, and throw the assert during the runtime. I'd expect, in both cases, for the code to not compile. Marking as critical, since the compiler is clearly calling something it shouldn't. Furthermore, since the error is a link error, there is no way to catch this in conditional compilation.
Comment #1 by k.hara.pg — 2013-04-04T07:10:30Z
Comment #2 by github-bugzilla — 2013-04-05T21:58:35Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/74890b1ec2abbb0bb26cc03055d3dbdf0e0014c0 fix Issue 9346 - nested struct calls disabled postblit Move postblit call generation from glue layer to front-end layer. https://github.com/D-Programming-Language/dmd/commit/7b6dc0080406a8562fc7282217b35f112dcea22f Merge pull request #1838 from 9rnsr/fix9346 Issue 9346 - nested struct calls disabled postblit