https://issues.dlang.org/show_bug.cgi?id=14828
Kenji Hara <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #1534|0 |1 is obsolete| | --- Comment #12 from Kenji Hara <[email protected]> --- Created attachment 1538 --> https://issues.dlang.org/attachment.cgi?id=1538&action=edit A little updated test case OK, I understand the issue mechanism. It's obvious from the list files of libproj.lib and out.obj. (`make genlist`) With the `make a1f` command, the last link for out.exe will pull foo2.obj in the lib file, because: The instantiated function _D5stdio12__T7writelnZ7writelnFNaNbNiNfAyaZv uses _D5stdio7__arrayZ for array bounds check, but it's stored in foo2.obj in the lib. By that, the symbol _D4foo212__ModuleInfoZ in lib will also linked because it's in foo2.obj. On the other hand, out.obj also contains _D4foo212__ModuleInfoZ, then they conflicts each other. ---- The essential fix I think is: when the lib file is compiled, the helper functions (__array, etc) of non-root modules (e.g. stdio) should be separated their own obj file. --
