Fixed array subscript with a bit-field with patch by kugelfuhr.

This commit is contained in:
acqn
2023-10-15 15:53:03 +08:00
parent 77c6a6a693
commit 8111946731
2 changed files with 42 additions and 2 deletions

View File

@@ -3001,8 +3001,9 @@ static void parseadd (ExprDesc* Expr, int DoArrayRef)
}
if (!AddDone) {
if (ED_IsLocQuasiConst (&Expr2) &&
rscale == 1 &&
if (ED_IsLocQuasiConst (&Expr2) &&
!IsTypeBitField (Expr2.Type) &&
rscale == 1 &&
CheckedSizeOf (rhst) == SIZEOF_CHAR) {
/* Change the order back */
RemoveCode (&Mark);