Commit f114f91f9 for llama.cpp
commit f114f91f9ed6792cf402437e3874adad98902744
Author: Pascal <admin@serveurperso.com>
Date: Mon Sep 7 19:54:13 2026 +0200
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.
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) {