Skip to content

VLAs are compiled incorrectly in both setup and teardown #28

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
mateoconlechuga opened this issue Mar 6, 2022 · 3 comments
Closed

VLAs are compiled incorrectly in both setup and teardown #28

mateoconlechuga opened this issue Mar 6, 2022 · 3 comments

Comments

@mateoconlechuga
Copy link

mateoconlechuga commented Mar 6, 2022

Minimal reproducible examples:

int main(void)
{
    int x = 0;
    for (int i = 0; i < 10; ++i) {
        int args[i];
        args[i-1] = i;
        x += args[0];
        args[0] = 0;
    }

    return x;
}

int main(void)
{
    unsigned long x = 0;
    for (unsigned long i = 0; i < 10; ++i) {
        unsigned long args[i];
        for (unsigned long j = 0; j < i; ++j) {
            args[j] = i;
        }
        x += args[0];
        args[0] = 0;
    }

    return x;
}
@jacobly0
Copy link
Owner

jacobly0 commented Mar 6, 2022

Closing because issue provides no metric by which to determine whether it is fixed.

@jacobly0 jacobly0 closed this as completed Mar 6, 2022
@mateoconlechuga
Copy link
Author

It's fixed when it actually compiles correctly.

@jacobly0
Copy link
Owner

jacobly0 commented Feb 1, 2023

Probably fixed by a213152.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants