test name mangling of core.stdc.stdint types#8252
Conversation
|
Thanks for your pull request, @WalterBright! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + dmd#8252" |
|
Blocked by dlang/druntime#2183 |
|
Couldn't we put this in druntime ? |
I thought about it, but core.stdc.stdint is really a "header only" module, and it just didn't seem right to put tests in it. Besides, getting the mangling right isn't the responsibility of druntime, it's the compiler. |
|
Shouldn't this actually test against a C++ compiler? Could be placed into externmangle.d/externmangle.cpp.
I agree, but you can also put tests into druntime/test. |
It's not really necessary since C++ compilers pretty much never change their mangling. The test cases were made from cut&pasting the output of the C++ compiler. Testing
It could, but I like it here. |
The problem with the tests being here, is that dlang/druntime#2183 can't be fully verified. It would be best to add the tests to dlang/druntime#2183, show that it's green, and then after that is merged, move them here to DMD. |
|
Getting the name mangling correct is the job of the compiler, not druntime. Inevitably there isn't a sharp line separating druntime from dmd, and some judgement will be necessary now and then. This is one such case. |
|
Druntime PR was merged. Should no longer be blocked. |
fb14258 to
6c6a21a
Compare
|
Blocked by dlang/druntime#2188 |
|
FYI this test is now failing on the self-bootstrapped SemaphoreCI: |
|
On my Ubuntu linux box, the mangling from the C version of the code is _Z10int_fast16l. The line in core.stdc.stdint for fast16 is: which all looks right. Anyhow, why would it pass all the other linux tests? What is different about semaphoreci? |
|
SemaphoreCI uses a compiler built from the PR, to build itself (instead of just using the host compiler as the other CIs do): Use host DMD to build DMD ->use this built DMD with fresh DMD -> run tests This means that one should be able to reproduce this if with dmd-nightly or using a freshly built host compiler via I'm sorry that I can't be of more help for the next days as I am still traveling with my phone only. |
Types from
core.stdc.stdintshould mangle to the same as the corresponding C++ compiler does.