-
-
Notifications
You must be signed in to change notification settings - Fork 607
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
Fix C++ mangling for repeated basic types that are target-specific. #9129
Conversation
Thanks for your pull request and interest in making D better, @JohanEngelen! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. 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 "stable + dmd#9129" |
else | ||
append(t); | ||
// Only do substitution for mangles that are longer than 1 character. | ||
if (tm[1] != 0 || t.isConst()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I noticed this discrepancy with writeBasicType
when submitting my ldc pull, traced both changes back to Walter's pull, saw he added both blocks, and figured that's what he wanted, since I didn't know what this substitution was about. I should have asked about it then.
The Win32 failure looks like a spurious failure. Can someone retrigger please? |
You can do it yourself by running |
Or just login at the Auto-Tester and deprecate the build (I just did so). |
I'm not sure about this. |
BTW, one of the reasons @kinke and I didn't think this would break is that you seemed to be using this default case for GDC. This bug doesn't hit you already? |
I'm not sure this is the correct fix. |
Examples that would fail the litmus test:
|
Sadly, this whole block shouldn't even be in the default condition either. 128-bit long doubles won't get mangled as |
The __float128 on powerpc was already broken (because substitution would happen for all 'weird' types) while it should not be substituted according to gcc: https://cpp.godbolt.org/z/ufgbLO |
On some further digging there are some non-target-specific examples.
These would all go through the |
That compiler is far too old, I wouldn't bother trying to support it. |
See LDC issue: ldc-developers/ldc#2954
#7250 introduced substitution for target-specific basic types, which is helpful (e.g. with target specific
Tcomplex80
) but should only be done when multiple characters are used for the mangle. (So basically duplicatingwriteBasicType
behavior).