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

miscompilation #14

Closed
andrewchambers opened this Issue Sep 14, 2015 · 0 comments

Comments

Projects
None yet
1 participant
@andrewchambers
Copy link
Owner

andrewchambers commented Sep 14, 2015

struct s {
    char a;
    char b;
};

void abort(void);

struct s
f()
{
    struct s r;
    r.a = 1;
    r.b = 2;
    return r;
}
int
main()
{
    struct s r;
    r = f();
    if(r.a != 1) abort();
    if(r.b != 2) abort();
    return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment