https://gcc.gnu.org/g:6c565e9b32bc1e95aa2ec869285d9f51b3c45f96

commit r16-6317-g6c565e9b32bc1e95aa2ec869285d9f51b3c45f96
Author: Antoni Boucher <[email protected]>
Date:   Thu Dec 4 11:06:07 2025 -0500

    libgccjit: Fix test-cold-attribute.c
    
    gcc/testsuite/ChangeLog:
    
            * jit.dg/all-non-failing-tests.h: Update comment about
            test-cold-attribute.c.
            * jit.dg/test-cold-attribute.c: Use -Oz to fix test.

Diff:
---
 gcc/testsuite/jit.dg/all-non-failing-tests.h | 4 ++--
 gcc/testsuite/jit.dg/test-cold-attribute.c   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/gcc/testsuite/jit.dg/all-non-failing-tests.h 
b/gcc/testsuite/jit.dg/all-non-failing-tests.h
index aa9d34346527..1b4dbec3fcb9 100644
--- a/gcc/testsuite/jit.dg/all-non-failing-tests.h
+++ b/gcc/testsuite/jit.dg/all-non-failing-tests.h
@@ -145,8 +145,8 @@
 #undef create_code
 #undef verify_code
 
-/* test-cold-attribute.c: This can't be in the testcases array as it needs
-   the `-O2` flag.  */
+/* test-cold-attribute.c: This can't be in the testcases array as it needs a
+   specific optimization flag.  */
 
 /* test-constants.c */
 #define create_code create_code_constants
diff --git a/gcc/testsuite/jit.dg/test-cold-attribute.c 
b/gcc/testsuite/jit.dg/test-cold-attribute.c
index 0c76d3e36818..620b04d99846 100644
--- a/gcc/testsuite/jit.dg/test-cold-attribute.c
+++ b/gcc/testsuite/jit.dg/test-cold-attribute.c
@@ -8,8 +8,8 @@
 #define TEST_ESCHEWS_SET_OPTIONS
 static void set_options (gcc_jit_context *ctxt, const char *argv0)
 {
-  // Set "-O2".
-  gcc_jit_context_set_int_option(ctxt, GCC_JIT_INT_OPTION_OPTIMIZATION_LEVEL, 
2);
+  // Set "-Oz".
+  gcc_jit_context_add_command_line_option (ctxt, "-Oz");
 }
 
 #define TEST_COMPILING_TO_FILE

Reply via email to