Skip to content

[CIR][CIRGen][TBAA] Struct with Union crashes during CodeGen #1246

Closed
@bruteforceboy

Description

@bruteforceboy

The following code snippet crashes when generating CIR with -O2 enabled after PR#1220 was merged.

typedef struct {
  union {
    int a, b;
  };
  int c;
} S;

void foo(S *s) { s->a = 1; }

I haven't done a thorough review of the changes made, but I just noticed the PR broke something that worked for me before. Can't we add unions here, or just emit tbaa_NYI for all the non-scalar types for now?

cc: @PikachuHyA, @bcardosolopes

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions