https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105786
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-12 branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:9f1e32c69d3f0cc04665587c18937a773616c6bd commit r12-8453-g9f1e32c69d3f0cc04665587c18937a773616c6bd Author: Richard Biener <rguent...@suse.de> Date: Wed Jun 1 14:13:01 2022 +0200 tree-optimization/105786 - avoid strlen replacement for pointers This avoids matching strlen to a pointer result, avoiding ICEing because of an integer adjustment using PLUS_EXPR on pointers. 2022-06-01 Richard Biener <rguent...@suse.de> PR tree-optimization/105786 * tree-loop-distribution.cc (loop_distribution::transform_reduction_loop): Only do strlen replacement for integer type reductions. * gcc.dg/torture/pr105786.c: New testcase. (cherry picked from commit 57a8fb92ac4161ebbf9381b009e8c5af843e3e5f)