Fix missing dirty and reachable_here calls in typed_test
authorIvan Maidanski <ivmai@mail.ru>
Tue, 10 Jul 2018 05:58:08 +0000 (08:58 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 10 Jul 2018 05:58:08 +0000 (08:58 +0300)
(fix of commits b52c140d3263ffbbfd2e7daad62)

* tests/test.c [!NO_TYPED_TEST] (typed_test): Call GC_PTR_STORE_AND_DIRTY
to store old value to newP[1].

tests/test.c

index bda3834..733926e 100644 (file)
@@ -1191,7 +1191,7 @@ void typed_test(void)
             FAIL;
         }
         newP[0] = 17;
-        newP[1] = (GC_word)old;
+        GC_PTR_STORE_AND_DIRTY(newP + 1, old);
         old = newP;
         AO_fetch_and_add1(&collectable_count);
         newP = (GC_word *)GC_malloc_explicitly_typed(4 * sizeof(GC_word), d2);