@@ -138,10 +138,30 @@ index bc1cc324..14af14ae 100644
138138 (assert_return (invoke "call_imported_elem") (i32.const 42))
139139+ ;;)
140140diff --git a/test/core/gc/array.wast b/test/core/gc/array.wast
141- index 6ad95c08..a184435d 100644
141+ index 6ad95c08..17672d33 100644
142142--- a/test/core/gc/array.wast
143143+++ b/test/core/gc/array.wast
144- @@ -95,7 +95,10 @@
144+ @@ -7,7 +7,8 @@
145+ (type (array i64))
146+ (type (array f32))
147+ (type (array f64))
148+ - (type (array anyref))
149+ + ;; Disable because `anyref` in fileds of composite types is not supported yet
150+ + ;; (type (array anyref))
151+ (type (array (ref struct)))
152+ (type (array (ref 0)))
153+ (type (array (ref null 1)))
154+ @@ -17,7 +18,8 @@
155+ (type (array (mut i64)))
156+ (type (array (mut i32)))
157+ (type (array (mut i64)))
158+ - (type (array (mut anyref)))
159+ + ;; Disable because `anyref` in fileds of composite types is not supported yet
160+ + ;; (type (array (mut anyref)))
161+ (type (array (mut (ref struct))))
162+ (type (array (mut (ref 0))))
163+ (type (array (mut (ref null i31))))
164+ @@ -95,7 +97,10 @@
145165 )
146166
147167 (assert_return (invoke "new") (ref.array))
@@ -153,7 +173,7 @@ index 6ad95c08..a184435d 100644
153173 (assert_return (invoke "get" (i32.const 0)) (f32.const 0))
154174 (assert_return (invoke "set_get" (i32.const 1) (f32.const 7)) (f32.const 7))
155175 (assert_return (invoke "len") (i32.const 3))
156- @@ -140,7 +143 ,10 @@
176+ @@ -140,7 +145 ,10 @@
157177 )
158178
159179 (assert_return (invoke "new") (ref.array))
@@ -165,7 +185,7 @@ index 6ad95c08..a184435d 100644
165185 (assert_return (invoke "get" (i32.const 0)) (f32.const 1))
166186 (assert_return (invoke "set_get" (i32.const 1) (f32.const 7)) (f32.const 7))
167187 (assert_return (invoke "len") (i32.const 2))
168- @@ -192,7 +198 ,10 @@
188+ @@ -192,7 +200 ,10 @@
169189 )
170190
171191 (assert_return (invoke "new") (ref.array))
@@ -177,15 +197,15 @@ index 6ad95c08..a184435d 100644
177197 (assert_return (invoke "get_u" (i32.const 2)) (i32.const 0xff))
178198 (assert_return (invoke "get_s" (i32.const 2)) (i32.const -1))
179199 (assert_return (invoke "set_get" (i32.const 1) (i32.const 7)) (i32.const 7))
180- @@ -202,6 +211 ,7 @@
200+ @@ -202,6 +213 ,7 @@
181201 (assert_trap (invoke "get_s" (i32.const 10)) "out of bounds array access")
182202 (assert_trap (invoke "set_get" (i32.const 10) (i32.const 7)) "out of bounds array access")
183203
184204+ (;; Activate once aligned `array.new_elem`
185205 (module
186206 (type $bvec (array i8))
187207 (type $vec (array (ref $bvec)))
188- @@ -260,6 +270 ,7 @@
208+ @@ -260,6 +272 ,7 @@
189209
190210 (assert_trap (invoke "get" (i32.const 10) (i32.const 0)) "out of bounds array access")
191211 (assert_trap (invoke "set_get" (i32.const 10) (i32.const 0) (i32.const 0)) "out of bounds array access")
@@ -309,6 +329,100 @@ index 6309e72b..39f35692 100644
309329 (assert_return (invoke "get" (i32.const 3)) (i32.const 789))
310330+ ;;
311331+ ;;)
332+ diff --git a/test/core/gc/struct.wast b/test/core/gc/struct.wast
333+ index 6151fe10..d501cd3c 100644
334+ --- a/test/core/gc/struct.wast
335+ +++ b/test/core/gc/struct.wast
336+ @@ -6,8 +6,9 @@
337+ (type (struct (field i8)))
338+ (type (struct (field i8 i8 i8 i8)))
339+ (type (struct (field $x1 i32) (field $y1 i32)))
340+ - (type (struct (field i8 i16 i32 i64 f32 f64 anyref funcref (ref 0) (ref null 1))))
341+ - (type (struct (field i32 i64 i8) (field) (field) (field (ref null i31) anyref)))
342+ + ;; Disable because `anyref` in fileds of composite types is not supported yet
343+ + ;; (type (struct (field i8 i16 i32 i64 f32 f64 anyref funcref (ref 0) (ref null 1))))
344+ + ;; (type (struct (field i32 i64 i8) (field) (field) (field (ref null i31) anyref)))
345+ (type (struct (field $x2 i32) (field f32 f64) (field $y2 i32)))
346+ )
347+
348+ diff --git a/test/core/gc/type-subtyping.wast b/test/core/gc/type-subtyping.wast
349+ index f2b33d7c..a61560c2 100644
350+ --- a/test/core/gc/type-subtyping.wast
351+ +++ b/test/core/gc/type-subtyping.wast
352+ @@ -4,7 +4,8 @@
353+ (type $e0 (sub (array i32)))
354+ (type $e1 (sub $e0 (array i32)))
355+
356+ - (type $e2 (sub (array anyref)))
357+ + ;; Disable because `anyref` in fileds of composite types is not supported yet
358+ + ;; (type $e2 (sub (array anyref)))
359+ (type $e3 (sub (array (ref null $e0))))
360+ (type $e4 (sub (array (ref $e1))))
361+
362+ @@ -32,35 +33,36 @@
363+ )
364+
365+
366+ + ;; Disable because `anyref` in fileds of composite types is not supported yet
367+ ;; Recursive definitions
368+
369+ - (module
370+ - (type $t (sub (struct (field anyref))))
371+ - (rec (type $r (sub $t (struct (field (ref $r))))))
372+ - (type $t' (sub $r (struct (field (ref $r) i32))))
373+ - )
374+ -
375+ - (module
376+ - (rec
377+ - (type $r1 (sub (struct (field i32 (ref $r1)))))
378+ - )
379+ - (rec
380+ - (type $r2 (sub $r1 (struct (field i32 (ref $r3)))))
381+ - (type $r3 (sub $r1 (struct (field i32 (ref $r2)))))
382+ - )
383+ - )
384+ -
385+ - (module
386+ - (rec
387+ - (type $a1 (sub (struct (field i32 (ref $a2)))))
388+ - (type $a2 (sub (struct (field i64 (ref $a1)))))
389+ - )
390+ - (rec
391+ - (type $b1 (sub $a2 (struct (field i64 (ref $a1) i32))))
392+ - (type $b2 (sub $a1 (struct (field i32 (ref $a2) i32))))
393+ - (type $b3 (sub $a2 (struct (field i64 (ref $b2) i32))))
394+ - )
395+ - )
396+ + ;; (module
397+ + ;; (type $t (sub (struct (field anyref))))
398+ + ;; (rec (type $r (sub $t (struct (field (ref $r))))))
399+ + ;; (type $t' (sub $r (struct (field (ref $r) i32))))
400+ + ;; )
401+ +
402+ + ;; (module
403+ + ;; (rec
404+ + ;; (type $r1 (sub (struct (field i32 (ref $r1)))))
405+ + ;; )
406+ + ;; (rec
407+ + ;; (type $r2 (sub $r1 (struct (field i32 (ref $r3)))))
408+ + ;; (type $r3 (sub $r1 (struct (field i32 (ref $r2)))))
409+ + ;; )
410+ + ;; )
411+ +
412+ + ;; (module
413+ + ;; (rec
414+ + ;; (type $a1 (sub (struct (field i32 (ref $a2)))))
415+ + ;; (type $a2 (sub (struct (field i64 (ref $a1)))))
416+ + ;; )
417+ + ;; (rec
418+ + ;; (type $b1 (sub $a2 (struct (field i64 (ref $a1) i32))))
419+ + ;; (type $b2 (sub $a1 (struct (field i32 (ref $a2) i32))))
420+ + ;; (type $b3 (sub $a2 (struct (field i64 (ref $b2) i32))))
421+ + ;; )
422+ + ;; )
423+
424+
425+ ;; Subsumption
312426diff --git a/test/core/global.wast b/test/core/global.wast
313427index 8c47fde2..8d3d8228 100644
314428--- a/test/core/global.wast
0 commit comments