From: Antoni Boucher Date: Thu, 4 Dec 2025 16:06:07 +0000 (-0500) Subject: libgccjit: Fix test-cold-attribute.c X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c565e9b32bc1e95aa2ec869285d9f51b3c45f96;p=thirdparty%2Fgcc.git 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 --git a/gcc/testsuite/jit.dg/all-non-failing-tests.h b/gcc/testsuite/jit.dg/all-non-failing-tests.h index aa9d3434652..1b4dbec3fcb 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 0c76d3e3681..620b04d9984 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