GCC Newspaper
JUNE 15, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
gcc

Fix -Wstringop-overflow warning in pr125453-1.c at -O2 on some targets.

The test case pr125453-1.c now suppresses the `-Wstringop-overflow` warning to avoid masking a more critical ICE issue.

The test case pr125453-1.c produced a -Wstringop-overflow warning at -O2 on some targets, which obscured the intended ICE (Internal Compiler Error) being tested. The fix adds the -w option to suppress all warnings, allowing the test to focus on the ICE. This change doesn’t affect compiled code, but makes the test suite more reliable.

In Details

This commit modifies a test case (pr125453-1.c) in the GCC test suite. The test case was triggering a -Wstringop-overflow warning during compilation at -O2 on certain targets. Because the test is designed to check for an ICE and not warning behavior, the -w flag is added to silence warnings and ensure the test's intended purpose isn't obscured. This is specific to the test suite and doesn't impact the compiler's code generation.

For Context

GCC's test suite includes a set of programs designed to verify the compiler's correctness and detect regressions. These tests are compiled with various optimization levels and flags to ensure the compiler behaves as expected under different conditions. Warnings are diagnostic messages that the compiler emits when it detects potentially problematic code. An ICE (Internal Compiler Error) indicates a bug in the compiler itself, which is a more serious issue than a user-level warning. Here, a warning was masking the ICE.

Filed Under: test suitewarningICE