GCC Newspaper
NOVEMBER 30, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
testsuite

testsuite: Skip CFI scan on sparc64 Linux for stack-layout test

Avoids a test failure on sparc64 Linux caused by default CFI emission clashing with unwind table expectations.

This commit modifies a test case to skip a specific check on sparc64 Linux. The test stack-layout-dynamic-1.c verifies that no cfi_def_cfa_register is emitted. However, on sparc64 Linux, the compiler now defaults to emitting Call Frame Information (CFI) tables, which includes this register. This change ensures the test passes by disabling the problematic scan only on this architecture and configuration.

In Details

The test gcc.dg/stack-layout-dynamic-1.c checks for the absence of cfi_def_cfa_register instructions. On sparc64 Linux, recent changes have enabled -fasynchronous-unwind-tables and -funwind-tables by default. This causes the compiler to emit CFI directives, including cfi_def_cfa_register for each stack frame, which conflicts with the test's expectation. This patch skips the CFI scan on sparc64 Linux to prevent spurious test failures, as this behavior is now considered standard.

For Context
CFI
Call Frame Information. Metadata used by debuggers and unwinders to reconstruct the call stack. It describes how registers are used and how stack frames are laid out.
cfi_def_cfa_register
A specific DWARF CFI instruction that defines the Call Frame Address (CFA) to be a specific register. This is part of the mechanism to describe stack frame layout.
stack frame
A region of memory on the call stack allocated for a function call. It typically holds local variables, function parameters, and the return address.
DWARF
Debugging With Attributed Record Formats. A standardized debugging data format used by many compilers, including GCC, to store information used by debuggers.
Filed Under: testsuitesparc64CFIunwinding