[Issue 12779] [REG2.066a] -inline makes wrong code under some conditions

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat May 24 00:07:39 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=12779

Kenji Hara <k.hara.pg at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #2 from Kenji Hara <k.hara.pg at gmail.com> ---
If you use the lib.lib binary, you should emit same version definitions to
compile the `main.d`. Otherwise, the class instance size of Foo will be
different in each compilation units (lib.d and main.d), then the inlined code
will access invalid memory in runtime.

In other words, this is expected result. Your compilation steps are just wrong,
so the generated execution binary will cause invalid result.

--


More information about the Digitalmars-d-bugs mailing list