-
-
Notifications
You must be signed in to change notification settings - Fork 267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.064 std.uni release mode unit tests #594
Comments
Can you spot the difference?
The difference is that in the unit test build, Unfortunately, I don't have the time to investigate this further right now. |
I compared this to the output of dmd 2.064.2. dmd generates |
Same with dmd 2.065. As I am not an expert in D name mangling: what would be the expected mangling?
My assumption was that the mangling uses the type of the type argument. Since Looking at the unit tests I see only |
This might be related to https://issues.dlang.org/show_bug.cgi?id=3467, and a follow-up bug report I can't find right now. The behavior that integer template parameters would be mangled by the actual type of the literal, without being casted to the parameter types, used to be "by design". We convinced Walter that this is a bad idea, but maybe there are some remnants around still… |
The bug report is a good hint. I added a comment about the name mangling. |
See my comment there. The bug is supposedly fixed already for D2. |
DMD always uses the value type for name mangling of templates. If the type is defined in the template and the value type differs (e.g. parameter type is long and constant 4 (int) is used) then LDC got confused about this fact. As a result, sometimes the parameter type and sometime the value type was used. This commit changes the name mangling to use the parameter type, if possible. This is incompatible with DMD but solves the issue. The related DMD error is https://issues.dlang.org/show_bug.cgi?id=12720
DMD always uses the value type for name mangling of templates. If the type is defined in the template and the value type differs (e.g. parameter type is long and constant 4 (int) is used) then LDC got confused about this fact. As a result, sometimes the parameter type and sometime the value type was used. This commit changes the name mangling to use the parameter type, if possible. This is incompatible with DMD but solves the issue. The related DMD error is https://issues.dlang.org/show_bug.cgi?id=12720
Fixed with commit e51529c in 0.13.0. |
On the 2.064 branch, the unit test for
std.uni
currently fails to build in release mode as theuni.o
object from the Phobos library is linked in in addition to the unit test object file, leading to conflicting symbols.The
-why_load
option of the OS Xld
offers the following clue:__D3std3uni159__T11TrieBuilderTbTwVi1114112TS3std3uni22__T9sliceBitsVm13Vm21Z9sliceBitsTS3std3uni21__T9sliceBitsVm9Vm13Z9sliceBitsTS3std3uni20__T9sliceBitsVm0Vm9Z9sliceBitsZ11TrieBuilder18__T8addValueVm2TbZ8addValueMFNaNbNebmZv forced load of /Users/aule/Build/Work/ldc2-llvm3.4-debug/lib/libphobos-ldc.a(uni.o)
Investigating…
The text was updated successfully, but these errors were encountered: