You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code snippet fails when generating CIR, and that didn't happen until PR#1007 was merged.
typedef struct {
union {
int a;
long b;
};
} S;
S s = { .a = 1 };
It seems there is some extra padding even after unpacking the union, and there is an error when computing the size?
I tried to fix it myself, but then it fails again when lowering to LLVM, because b is marked as inactive, and a is the "active" field, but when lowering to LLVM, the type converter uses the larger member of the union.
The following code snippet fails when generating CIR, and that didn't happen until PR#1007 was merged.
It seems there is some extra padding even after unpacking the union, and there is an error when computing the size?
I tried to fix it myself, but then it fails again when lowering to LLVM, because
b
is marked as inactive, anda
is the "active" field, but when lowering to LLVM, the type converter uses the larger member of the union.cc: @bcardosolopes and @ChuanqiXu9 since you authored the PR)
The text was updated successfully, but these errors were encountered: