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

Fix issue #3802 - Fix size_t size for 32bit ABI on 64bit architectures. #3808

Merged
merged 5 commits into from
Aug 14, 2021

Conversation

JohanEngelen
Copy link
Member

@JohanEngelen JohanEngelen commented Aug 7, 2021

I don't know how to trigger the _d_array_slice_copy simplification by SimplifyDRuntimeCalls, so can't test that part of the PR.

@JohanEngelen JohanEngelen changed the title Fix issue #3806 - Fix size_t size for 32bit ABI on 64bit architectures. Fix issue #3802 - Fix size_t size for 32bit ABI on 64bit architectures. Aug 7, 2021
@kinke
Copy link
Member

kinke commented Aug 13, 2021

This triggers the IR pass (call optimized away with -O, not optimized with -O -disable-d-passes):

void foo(int[] a, int[] b)
{
    a[] = b[];
}

auto bar()
{
    int[2] a = [1, 2];
    int[2] b = [3, 4];
    foo(a, b);
    return a;
}

@kinke
Copy link
Member

kinke commented Aug 14, 2021

I took the liberty of extending the test, fixing the target C long size as suggested and predefining D_X32, to make this land in v1.27.1.

@kinke kinke merged commit d38c576 into ldc-developers:master Aug 14, 2021
@JohanEngelen JohanEngelen deleted the gh3802 branch August 14, 2021 19:27
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

Successfully merging this pull request may close these issues.

2 participants