FRIDAY, SEPTEMBER 18, 2026
tree-optimization
Fix ICE with SLP discovery dumping when trapping_stmt is NULL
Resolves an Internal Compiler Error (ICE) when dumping SLP discovery information with a null trapping statement.
This commit fixes an Integer Compiler Error (ICE) that occurred during SLP discovery dumping when the trapping_stmt was NULL. The issue was caused by attempting to print a NULL pointer using the %G format specifier. The fix involves printing the correct trapping_stmt in tree-vect-slp.cc to resolve this diagnostic issue.
In Details
Fixes PR tree-optimization/127468 by correcting the print statement in vect_build_slp_tree_3 within tree-vect-slp.cc. Previously, attempting to print a NULL trapping_stmt using %G caused an ICE. The fix ensures a valid statement is printed, preventing the crash.
For Context
- ICE (Internal Compiler Error)
- An unrecoverable error encountered by the compiler during the compilation process, indicating a bug within the compiler itself.
- SLP discovery
- The phase within the SLP optimization where the compiler identifies potential parallelizable instruction patterns.
- trapping_stmt
- A statement associated with an operation that might trap or throw an exception, used for debugging or error handling.
- tree-vect-slp.cc
- The GCC source file containing implementations for SLP vectorization.
- PR tree-optimization/127468
- A bug report filed against the GCC tree-optimization component, specifically related to an ICE during SLP discovery dumping.