https://issues.dlang.org/show_bug.cgi?id=15149
Issue ID: 15149 Summary: [2.068.2 regression] Linker error with separate compilation Product: D Version: D2 Hardware: All OS: Linux Status: NEW Severity: regression Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: yazan.dab...@gmail.com File structure: a.d b.d ---- a.d ---- import std.algorithm; import b; void main() { int[] foo; setUnion(fun()[], foo); } ---- b.d ---- module b; auto fun() { import std.container; return redBlackTree!int; } ------------------ Compiling using `dmd -c a.d && dmd -c b.d && dmd *.o` succeeds except for linker error: a.o: In function `_D3std9algorithm6setops119__T8SetUnionVAyaa5_61203c2062TS3std9container6rbtree41__T12RedBlackTreeTiVAyaa5_61203c2062Vbi0Z12RedBlackTree5RangeTAiZ8SetUnion9__xtoHashFNbNeKxS3std9algorithm6setops119__T8SetUnionVAyaa5_61203c2062TS3std9container6rbtree41__T12RedBlackTreeTiVAyaa5_61203c2062Vbi0Z12RedBlackTree5RangeTAiZ8SetUnionZm': a.d:(.text._D3std9algorithm6setops119__T8SetUnionVAyaa5_61203c2062TS3std9container6rbtree41__T12RedBlackTreeTiVAyaa5_61203c2062Vbi0Z12RedBlackTree5RangeTAiZ8SetUnion9__xtoHashFNbNeKxS3std9algorithm6setops119__T8SetUnionVAyaa5_61203c2062TS3std9container6rbtree41__T12RedBlackTreeTiVAyaa5_61203c2062Vbi0Z12RedBlackTree5RangeTAiZ8SetUnionZm+0x18): undefined reference to `_D95TypeInfo_xS3std9container6rbtree41__T12RedBlackTreeTiVAyaa5_61203c2062Vbi0Z12RedBlackTree5Range6__initZ' a.d:(.text._D3std9algorithm6setops119__T8SetUnionVAyaa5_61203c2062TS3std9container6rbtree41__T12RedBlackTreeTiVAyaa5_61203c2062Vbi0Z12RedBlackTree5RangeTAiZ8SetUnion9__xtoHashFNbNeKxS3std9algorithm6setops119__T8SetUnionVAyaa5_61203c2062TS3std9container6rbtree41__T12RedBlackTreeTiVAyaa5_61203c2062Vbi0Z12RedBlackTree5RangeTAiZ8SetUnionZm+0x1f): undefined reference to `_D95TypeInfo_xS3std9container6rbtree41__T12RedBlackTreeTiVAyaa5_61203c2062Vbi0Z12RedBlackTree5Range6__initZ' collect2: error: ld returned 1 exit status --- errorlevel 1 Linker error happens with 2.068.2 but does not happen with 2.067.1. --