From 4f4053b30437629675d6b7763cd25e0a411ac6d5 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Wed, 8 Jul 2026 21:57:49 +0800 Subject: [PATCH] Update t25883_tuple_sighash_collision.nim --- .../t25883_tuple_sighash_collision.nim | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/tests/ccgbugs2/t25883_tuple_sighash_collision.nim b/tests/ccgbugs2/t25883_tuple_sighash_collision.nim index b270288adb..956b34c57e 100644 --- a/tests/ccgbugs2/t25883_tuple_sighash_collision.nim +++ b/tests/ccgbugs2/t25883_tuple_sighash_collision.nim @@ -1,4 +1,5 @@ discard """ +targets: "c cpp" output: "13" """ @@ -16,3 +17,29 @@ proc main() = echo c[0][2] main() + +block: + type + Int[V: static int] = object + Layout[Sh, St] = object + shape: Sh + stride: St + + func makeB(): auto = + Layout[((Int[2], Int[3]), Int[5], Int[7]), ((Int[1], Int[2]), Int[6], Int[30])]( + shape: ((Int[2](), Int[3]()), Int[5](), Int[7]()), + stride: ((Int[1](), Int[2]()), Int[6](), Int[30]()) + ) + + func makeC(): auto = + Layout[((Int[2], Int[3], Int[5]), Int[7]), ((Int[1], Int[2], Int[6]), Int[30])]( + shape: ((Int[2](), Int[3](), Int[5]()), Int[7]()), + stride: ((Int[1](), Int[2](), Int[6]()), Int[30]()) + ) + + + proc main() = + let b = makeB() + let c = makeC() + + main()