https://gcc.gnu.org/g:2f7302527eb760239a231dc2a6884f1f6f68c05e

commit r17-4136-g2f7302527eb760239a231dc2a6884f1f6f68c05e
Author: Andrea Pinski <[email protected]>
Date:   Wed Sep 9 18:55:38 2026 -0700

    aarch64: Fix json self testing
    
    The problem here is the params decl was not initialized.  So
    there migth be some unrelated settings on the params.  This
    fixes the issue by using value initializer.
    
    Pushed as obvious after bootstrap/test on aarch64-linux-gnu.
    
    gcc/ChangeLog:
    
            * config/aarch64/aarch64-json-tunings-parser.cc 
(test_json_integers): Initialize params.
            (test_json_boolean): Likewise.
            (test_json_strings): Likewise.
            (test_json_enums): Likewise.
    
    Signed-off-by: Andrea Pinski <[email protected]>

Diff:
---
 gcc/config/aarch64/aarch64-json-tunings-parser.cc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gcc/config/aarch64/aarch64-json-tunings-parser.cc 
b/gcc/config/aarch64/aarch64-json-tunings-parser.cc
index b2cfcfd3c028..2b756d6c8356 100644
--- a/gcc/config/aarch64/aarch64-json-tunings-parser.cc
+++ b/gcc/config/aarch64/aarch64-json-tunings-parser.cc
@@ -634,7 +634,7 @@ test_json_integers ()
        }
     })json";
 
-  tune_params params;
+  tune_params params{};
 
   aarch64_load_tuning_params_from_json_string
     ("test.json", test_json, schema_json, &params);
@@ -661,7 +661,7 @@ test_json_boolean ()
 
   static const cpu_cost_table default_cost_table = {};
 
-  tune_params params;
+  tune_params params{};
   params.insn_extra_cost = &default_cost_table;
 
   aarch64_load_tuning_params_from_json_string
@@ -684,7 +684,7 @@ test_json_strings ()
        }
     })json";
 
-  tune_params params;
+  tune_params params{};
 
   aarch64_load_tuning_params_from_json_string
     ("test.json", test_json, schema_json, &params);
@@ -708,7 +708,7 @@ test_json_enums ()
        }
     })json";
 
-  tune_params params;
+  tune_params params{};
 
   aarch64_load_tuning_params_from_json_string
     ("test.json", test_json, schema_json, &params);

Reply via email to