GCC Newspaper
OCTOBER 6, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
i386

i386: Fix ICE with FP arithmetic units turned off

Corrects an internal compiler error when floating-point arithmetic units are disabled, particularly when mixing -msoft-float and -mfpmath=387.

This commit resolves an internal compiler error (ICE) that occurred on the i386 architecture when floating-point arithmetic units were disabled. The issue arose from an incorrect option check in i386-options.cc, particularly when compiling with -msoft-float and -mfpmath=387. The fix ensures that SSE arithmetic is used when 387 is disabled but SSE is available, preventing the ICE.

In Details

This change fixes an ICE in i386-options.cc related to floating-point unit selection. When both -msoft-float (which disables hardware FP) and -mfpmath=387 are present, the compiler previously failed to check if any FP arithmetic unit (SSE or 387) was actually available. This commit adds a check to ensure that if 387 is explicitly requested but disabled, and SSE is available, SSE will be used instead, thus avoiding the ICE.

For Context
ICE
Internal Compiler Error. A condition where the compiler encounters an unrecoverable error during its execution, leading to a crash.
-msoft-float
A compiler flag that instructs the compiler to emulate floating-point operations in software rather than using hardware floating-point instructions.
-mfpmath=387
A compiler flag that specifies the use of the x87 floating-point coprocessor (historically referred to as the 387) for floating-point calculations.
SSE
Streaming SIMD Extensions. A set of instruction set extensions for x86 microprocessors that allows for single-instruction, multiple-data (SIMD) operations, including floating-point arithmetic.
Filed Under: i386compiler errorfloating-point