When trapping_stmt is NULL printing it via %G ICEs.
Bootstrap and regtest running on x86_64-unknown-linux-gnu.
PR tree-optimization/127468
* tree-vect-slp.cc (vect_build_slp_tree_3): Print the correct
trapping stmt.
---
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 3f88449cd1d..07a5c5c3e34 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;
}
}
--
2.51.0