wcc/ww: alloc of an alias struct literal chases the alias for size and fill
alloc(alias{...}) keyed the size and field-fill off the syntactic
alias name — it under-allocated and emitted zero field stores. Chase
the alias via structlookupchain to the resolved struct (depth-2
chains verified). The scalar else-branch keeps its pre-existing
benign cs!=ww divergence, surfaced here and deferred as task #57
(site note at the arm). Review item #26.
This commit is contained in:
11
Makefile
11
Makefile
@@ -256,6 +256,7 @@ TESTS = $(BIN)/test_smoke $(BIN)/test_lex $(BIN)/test_parse $(BIN)/test_check \
|
||||
$(BIN)/test_arrlit_tail_zero_run \
|
||||
$(BIN)/test_defdim_slice_run \
|
||||
$(BIN)/test_trystr_run \
|
||||
$(BIN)/test_allocalias_run \
|
||||
$(BIN)/test_gunsigned_run \
|
||||
$(BIN)/test_taggedidx_run \
|
||||
$(BIN)/test_fnptrcollide_run \
|
||||
@@ -746,6 +747,16 @@ $(BIN)/test_trystr_run: test/wcc/989_trystr_run.c \
|
||||
$(LIB)/libwwrt.a | $(BIN)
|
||||
$(CC) $(CFLAGS) -o $@ $<
|
||||
|
||||
# 989_allocalias_run (#26): alloc(T{...}) for an alias T sizes + field-fills
|
||||
# from the alias-chased struct layout, not a name-keyed lookup of the literal
|
||||
# head. Builds+runs on BOTH driver twins (rule-10).
|
||||
$(BIN)/test_allocalias_run: test/wcc/989_allocalias_run.c \
|
||||
$(BIN)/ww $(BIN)/ww_ww \
|
||||
$(BIN)/w6c $(BIN)/w6a $(BIN)/w6l \
|
||||
$(BIN)/w6c_ww $(BIN)/w6a_ww $(BIN)/w6l_ww \
|
||||
$(LIB)/libwwrt.a | $(BIN)
|
||||
$(CC) $(CFLAGS) -o $@ $<
|
||||
|
||||
# 989_gunsigned_run (F7-c5, #25): a module-global unsigned ident on the
|
||||
# divide/shift/relational path must pick the unsigned opcode. Builds+runs on
|
||||
# BOTH driver twins (rule-10). CLASS-M — see the test header.
|
||||
|
||||
Reference in New Issue
Block a user