wcc/ww: no-init array global emits one DATAW slot, not two
The str-size arm of the global data emit was size-keyed and matched a 24-sized array, emitting a second DATAW for the same symbol. Gate on the array kind (!isarr8). Review item #12.
This commit is contained in:
10
Makefile
10
Makefile
@@ -293,6 +293,7 @@ TESTS = $(BIN)/test_smoke $(BIN)/test_lex $(BIN)/test_parse $(BIN)/test_check \
|
||||
$(BIN)/test_slice_literal_global \
|
||||
$(BIN)/test_global_arr_elem_field \
|
||||
$(BIN)/test_structlit_slice_field \
|
||||
$(BIN)/test_arrglob_nodup_run \
|
||||
$(BIN)/test_dot_str_chained_arg \
|
||||
$(BIN)/test_dot_slice_arg \
|
||||
$(BIN)/test_dot_tagged_source \
|
||||
@@ -1101,6 +1102,15 @@ $(BIN)/test_structlit_slice_field: test/wcc/689_structlit_slice_field.c $(BIN)/w
|
||||
$(LIB)/libwwrt.a | $(BIN)
|
||||
$(CC) $(CFLAGS) -o $@ $<
|
||||
|
||||
# 689_arrglob_nodup_run (#12): a no-init array global emits its zero-fill
|
||||
# DATAW row exactly once (the str-size arm was size-keyed and double-matched
|
||||
# arrays). Builds+runs both twins; asserts one DATAW row per stage.
|
||||
$(BIN)/test_arrglob_nodup_run: test/wcc/689_arrglob_nodup_run.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_dot_str_chained_arg: test/wcc/692_dot_str_chained_arg.c $(BIN)/ww \
|
||||
$(BIN)/w6c $(BIN)/w6a $(BIN)/w6l \
|
||||
$(BIN)/ww_ww $(BIN)/w6c_ww $(BIN)/w6a_ww $(BIN)/w6l_ww \
|
||||
|
||||
Reference in New Issue
Block a user