GCC Newspaper
JULY 29, 2026
Date
/
Architectures
Components
Topics
News & Policy
testsuite

Fix i386 testsuite pattern for Solaris assembler syntax

Adjusted assembler pattern in an i386 test case to accommodate Solaris syntax.

A test case in the GCC testsuite (gcc.target/i386/bt-cmov-1.c) failed on Solaris due to differences in assembler syntax for conditional move instructions. This patch modifies the scan-assembler-times pattern to accept both the standard GCC syntax and the Solaris assembler’s dialect, ensuring test compatibility across different environments. Brace quoting is also used to simplify patterns.

In Details

The scan-assembler-times pattern in gcc.target/i386/bt-cmov-1.c was failing on Solaris because its assembler uses cmovcc.c syntax, whereas the test expected cmovc. This commit updates the pattern to be more flexible, allowing for both cmovc and cmovl.c forms, and uses brace quoting for cleaner pattern matching. This resolves a test failure specific to Solaris's assembler dialect.

For Context
testsuite
A collection of test programs and scripts used to verify the correctness of a compiler or other software component.
i386
The architecture designation for Intel's 32-bit x86 processors. GCC supports compiling for this widely used architecture.
scan-assembler-times
A function within GCC's testsuite that checks if a specific pattern appears in the output of the assembler, often used to verify instruction emission.
Solaris assembler
The assembler program used on the Solaris operating system. It may have slight syntax variations compared to the GNU assembler (GAS).
cmovcc
Conditional move instructions (e.g., cmovc, cmovnc) that conditionally transfer data from one register to another based on the processor's condition flags.
Filed Under: testsuitei386solarisassembler