Skip to content

scc unions in structs #563

Description

@endeav0r
struct a {
	union {
		int b;
		int c;
	} d;
};

int main (struct a * e) {
	return e->d.b;
}

For x86_64 linux in scc, the above code gives:

error: unable to generate code for IL: var<@t0> = var<e>->a::d

FYI, the following does seem to work:

struct a {
	union {
		int b;
		int c;
	} d;
};

int main () {
	struct a e;
	return e.d.b;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: SCCIssue needs changes to the shellcode compilerImpact: LowIssue is a papercut or has a good, supported workaround

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions