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

Replace gimple* with gassign* for local variables.

Refactors ASan and other GCC passes to use gassign* for local variables, improving type safety and code clarity.

This commit replaces uses of gimple* with gassign* for local variables across various GCC passes, including ASan, expr, gimple-crc-optimization, and others. This change enhances type safety by using a more specific type for assignment operations. The refactoring aims to reduce potential errors and improve the overall maintainability of the compiler’s intermediate representation.

In Details

This change updates numerous internal gcc files to use gassign* instead of the more general gimple* pointer type when referring to assignments of local variables. This is a type-safety improvement within the GIMPLE IR, ensuring that only assignment statements are manipulated where expected, rather than any GIMPLE statement. It affects passes like ASan, expr, and several others dealing with GIMPLE manipulation.

For Context
gimple*
A pointer to a GIMPLE statement in GCC's intermediate representation. GIMPLE is a three-address code form used internally by GCC.
gassign*
A specific type of GIMPLE statement representing an assignment operation. Using gassign* instead of gimple* provides more type-specific handling.
ASan
AddressSanitizer, a memory error detector for C/C++. It instruments code to detect out-of-bounds accesses, use-after-free, and other memory errors at runtime.
GIMPLE
GCC's internal representation after the GENERIC stage. It's a lower-level, three-address code form that simplifies many operations for subsequent optimization passes.
Filed Under: gccrefactortype safety