Skip to content
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

Struct with constructor in member returned using pointer on Windows x64 #4679

Closed
tim-dlang opened this issue Jun 8, 2024 · 1 comment
Closed

Comments

@tim-dlang
Copy link
Contributor

While working on dlang/dmd#16570 I noticed, that LDC also returns structs containing a member with constructor using a hidden pointer. This is implemented using recursive hasCtor here:

if (hasCtor(tstruct->sym))

This seems to be wrong. I have added a test for this in dlang/dmd#16570 with struct MemberWithCtor. The pull request for DMD only checks if the struct itself has a constructor and not if members also have constructors, like LDC.

The test in the pull request for DMD is based on a test in LDC, but LDC has it in folder runnable instead of runnable_cxx.

@kinke
Copy link
Member

kinke commented Jun 8, 2024

Thx, confirmed. Will fix.

kinke added a commit to kinke/ldc that referenced this issue Jun 8, 2024
kinke added a commit to kinke/ldc that referenced this issue Jun 10, 2024
kinke added a commit that referenced this issue Jun 10, 2024
Fixes issue #4679. The test updates originate from
dlang/dmd#16570.
@kinke kinke closed this as completed Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants