]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libgccjit: Fix test-cold-attribute.c
authorAntoni Boucher <bouanto@zoho.com>
Thu, 4 Dec 2025 16:06:07 +0000 (11:06 -0500)
committerAntoni Boucher <bouanto@zoho.com>
Sun, 21 Dec 2025 13:48:55 +0000 (08:48 -0500)
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.

gcc/testsuite/jit.dg/all-non-failing-tests.h
gcc/testsuite/jit.dg/test-cold-attribute.c

index aa9d343465271afd5da43a0e9329ee1d9f2f7971..1b4dbec3fcb9892b24eb61335e5357c620b43545 100644 (file)
 #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
index 0c76d3e36818a7edcd8c660a7669364d0650bf58..620b04d99846e6b364241ad47e93a8be98e6b17e 100644 (file)
@@ -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