Skip to content

Commit a5b1c4d

Browse files
author
Mike Pall
committed
FFI: Don't propagate qualifiers into subtypes of complex.
1 parent 575bfe5 commit a5b1c4d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/lj_cparse.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,10 @@ static void cp_push_type(CPDecl *decl, CTypeID id)
798798
cp_push(decl, info & ~CTMASK_CID, size); /* Copy type. */
799799
break;
800800
case CT_ARRAY:
801+
if ((ct->info & (CTF_VECTOR|CTF_COMPLEX))) {
802+
info |= (decl->attr & CTF_QUAL);
803+
decl->attr &= ~CTF_QUAL;
804+
}
801805
cp_push_type(decl, ctype_cid(info)); /* Unroll. */
802806
cp_push(decl, info & ~CTMASK_CID, size); /* Copy type. */
803807
decl->stack[decl->pos].sib = 1; /* Mark as already checked and sized. */

0 commit comments

Comments
 (0)