[Issue 23255] [REG 2.099] undefined reference to 'core.internal.switch.__switch_error()(string, size_t)'
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jul 23 21:19:37 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=23255
kinke <kinke at gmx.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kinke at gmx.net
--- Comment #4 from kinke <kinke at gmx.net> ---
(In reply to Iain Buclaw from comment #2)
> Looks like mixing of release and non-release causes this.
>
> foo-release -> does not generate __switch_error.
>
> test-non-release -> generates __switch_error, but assumes that `foo` will
> too, so elides the emission. This results in the undefined reference.
>
> Confirmed that in 2.098, test-non-release always emits __switch_error.
Makes perfect sense, and is accordingly no regression, just a missed case of
culling which is now properly culled. Linking code compiled with different
flags affecting template codegen is a well-known issue, and `-allinst` is
supposed to handle that, but isn't enough in all cases (which are real bugs,
either regarding template emission or inconsistent attributes inference).
--
More information about the Digitalmars-d-bugs
mailing list