From f114f91f9ed6792cf402437e3874adad98902744 Mon Sep 17 00:00:00 2001 From: Pascal Date: Mon, 7 Sep 2026 19:54:13 +0200 Subject: [PATCH] tests : initialize the L2_NORM batch array (#28553) * tests: bind the L2_NORM batch count to a local GCC cannot prove the loop fills norms up to the index read after it while the bound is a class member, so it reports a maybe uninitialized use. Reading the count once into a local restores the tracking. * tests: initialize the L2_NORM batch array The read after the fill loop is only provably defined once the array carries an initializer, which GCC 12 requires on the aarch64 Release build where warnings are fatal. --- tests/test-backend-ops.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-backend-ops.cpp b/tests/test-backend-ops.cpp index cd16e5851..3342253d0 100644 --- a/tests/test-backend-ops.cpp +++ b/tests/test-backend-ops.cpp @@ -7229,7 +7229,7 @@ struct test_l2_norm_batch : public test_case { if (strided) { parent = ggml_new_tensor_4d(ctx, type, ne[0], ne[1] * n_norms, ne[2], ne[3]); // qkv buffer } - ggml_tensor * norms[8]; + ggml_tensor * norms[8] = {}; for (int t = 0; t < n_norms; ++t) { ggml_tensor * src; if (strided) {