check: reject non-integer index operand in wwstage (catB-17)

Mirrors cstage check.c:1491-1495 (type_isint via the syntax.typeisint tinfo chaser, which chases TY_NAMED.under/TY_ENUM.sub — not the AST-keyed isinttypeast that would falsely reject an alias-int index). Record-and-continue, before the base-bail. Reject path emits no asm so cstage==wwstage byte-id holds (453 green). Pre-existing index double-emit deferred (#6).
This commit is contained in:
2026-06-20 20:12:11 +09:00
parent 7589b1bf0b
commit b9692b14f1
3 changed files with 264 additions and 2 deletions

View File

@@ -249,6 +249,7 @@ TESTS = $(BIN)/test_smoke $(BIN)/test_lex $(BIN)/test_parse $(BIN)/test_check \
$(BIN)/test_const_reassign_reject \
$(BIN)/test_dupfield_reject \
$(BIN)/test_enum_reject \
$(BIN)/test_index_int_reject \
$(BIN)/test_size_untyped_int \
$(BIN)/test_tagged_staticinit \
$(BIN)/test_arr_infer_len \
@@ -1556,6 +1557,12 @@ $(BIN)/test_enum_reject: test/wcc/850_enum_reject.c $(BIN)/ww \
$(LIB)/libwwrt.a | $(BIN)
$(CC) $(CFLAGS) -o $@ $<
$(BIN)/test_index_int_reject: test/wcc/851_index_int_reject.c $(BIN)/ww \
$(BIN)/w6c $(BIN)/w6a $(BIN)/w6l \
$(BIN)/ww_ww $(BIN)/w6c_ww $(BIN)/w6a_ww $(BIN)/w6l_ww \
$(LIB)/libwwrt.a | $(BIN)
$(CC) $(CFLAGS) -o $@ $<
$(BIN)/test_tagged_staticinit: test/wcc/843_tagged_staticinit.c $(BIN)/ww \
$(BIN)/w6c $(BIN)/w6a $(BIN)/w6l \
$(BIN)/ww_ww $(BIN)/w6c_ww $(BIN)/w6a_ww $(BIN)/w6l_ww \