wcc/ww: cgtryprop/cgtryunw gain the nullable arm
Try-propagation on a nullable value fell to the tagged path and compared the pointer to a tag — the null check came out inverted. Mirror ww's own cgtypetest nullable fold (cgenexpr.ww:652) and the cstage twin (cgen.c:10366/10504). Review item #15.
This commit is contained in:
7
Makefile
7
Makefile
@@ -320,6 +320,7 @@ TESTS = $(BIN)/test_smoke $(BIN)/test_lex $(BIN)/test_parse $(BIN)/test_check \
|
||||
$(BIN)/test_tagged_call_arg \
|
||||
$(BIN)/test_tagged_call_arg_run \
|
||||
$(BIN)/test_tryprop_tag_remap_run \
|
||||
$(BIN)/test_nullable_try_run \
|
||||
$(BIN)/test_nested_union_widen_run \
|
||||
$(BIN)/test_sret_struct_return \
|
||||
$(BIN)/test_sret_struct_return_run \
|
||||
@@ -1764,6 +1765,12 @@ $(BIN)/test_nested_union_widen_run: test/wcc/925_nested_union_widen_run.c \
|
||||
$(LIB)/libwwrt.a | $(BIN)
|
||||
$(CC) $(CFLAGS) -o $@ $<
|
||||
|
||||
$(BIN)/test_nullable_try_run: test/wcc/949_nullable_try_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_sret_struct_return: test/wcc/721_sret_struct_return.c \
|
||||
$(BIN)/w6c $(BIN)/w6c_ww | $(BIN)
|
||||
$(CC) $(CFLAGS) -o $@ $<
|
||||
|
||||
Reference in New Issue
Block a user