https://gcc.gnu.org/g:37846b229e14a54d74bcf77ee8bbfceb6e0b9bbe

commit r17-4417-g37846b229e14a54d74bcf77ee8bbfceb6e0b9bbe
Author: Richard Biener <[email protected]>
Date:   Fri Sep 18 13:53:34 2026 +0200

    tree-optimization/127468 - ICE with SLP discovery dumping
    
    When trapping_stmt is NULL printing it via %G ICEs.
    
            PR tree-optimization/127468
            * tree-vect-slp.cc (vect_build_slp_tree_3): Print the correct
            trapping stmt.

Diff:
---
 gcc/tree-vect-slp.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc
index 88368b5b86c2..13267c6c22d0 100644
--- a/gcc/tree-vect-slp.cc
+++ b/gcc/tree-vect-slp.cc
@@ -1530,7 +1530,7 @@ vect_build_slp_tree_3 (vec_info *vinfo, 
vec<stmt_vec_info> stmts,
                    dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
                                     "Build SLP failed: not all stmts in same "
                                     "BB but possibly trapping operation in %G",
-                                    trapping_stmt);
+                                    trapping_stmt ? trapping_stmt : stmt);
                  continue;
                }
            }

Reply via email to