https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118171
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:6488d5b86126a538ebb8560556dd462ec3d5d62e commit r15-6504-g6488d5b86126a538ebb8560556dd462ec3d5d62e Author: Richard Biener <rguent...@suse.de> Date: Wed Jan 1 16:07:03 2025 +0100 tree-optimization/118171 - GENERIC folding in PRE results in invalid GIMPLE PRE applies GENERIC folding to some component ref components which might result in invalid GIMPLE, like a VIEW_CONVERT_EXPR wrapping a REALPART_EXPR as in the PR. The following removes all GENERIC folding in the code re-constructing a GENERIC component-ref from the PRE VN IL. PR tree-optimization/118171 * tree-ssa-pre.cc (create_component_ref_by_pieces_1): Do not fold any component ref parts. * gcc.dg/torture/pr118171.c: New testcase.