https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94188
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- Created attachment 48043 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48043&action=edit patch in testing This is what I have now, bootstrapped OK after the extra two hunks but I still see ICEs during testing. Still fixing build_fold_addr_expr_with_type looks inevitable ... (other option would be to remove the optimization when the type doesn't match, but I guess that will regress as well).