[Issue 10133] ICE for templated static conditional lambda

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Aug 21 22:03:32 PDT 2014


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

--- Comment #7 from github-bugzilla at puremagic.com ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/9202b529b329ce0087ae976aa8bf1deadd1b62de
Distinguish speculative instantiation from gagged one to elide unnecessary
symbol emission

Template constraint evaluation may instantiate exactly same symbols multiple
times (eg. issue 10133 test case in test/runnable/funclit.d).
It would cause linker error "duplicate COMDAT" in Win64. To avoid the issue,
dmd should elide unnecessary symbol emission.

If a template is instantiated in template constraint or static condition, it's
marked as speculative instantiation.
If no other code at non-speculative context refer the instance, compiler will
elide its code generation.

--


More information about the Digitalmars-d-bugs mailing list