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

Simple program breaks the compiler #97

Closed
lurk101 opened this issue Jul 18, 2022 · 2 comments
Closed

Simple program breaks the compiler #97

lurk101 opened this issue Jul 18, 2022 · 2 comments

Comments

@lurk101
Copy link

lurk101 commented Jul 18, 2022

int main() {
    int a;
    a = 0;
    if (1) {
        int b;
        printf("%d\n", a);
        int c;
        b = 1;
        a += b;
        printf("%d\n", a);
    }
}

Results in

0
0
1

Clearly it should not print 3 numbers!

@HPCguy
Copy link
Contributor

HPCguy commented Jul 18, 2022

I will be happy to start working on this immediately, once pull request #96, "Improve robustness of ptr addition/subtraction", makes it through the review process.

@jserv
Copy link
Owner

jserv commented Jul 19, 2022

Thank @HPCguy for the friendly reminder. I have applied #96.

HPCguy pushed a commit to HPCguy/amacc that referenced this issue Jul 19, 2022
@jserv jserv closed this as completed in 9e84c0a Jul 19, 2022
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

3 participants