https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111875
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Created attachment 62439 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=62439&action=edit patch which moves the folding of assume_aligned to gimple fold from fab I should have looked for this bug earlier. I ran into this exact thing when I was moving the folding of assume_aligned to gimple fold (after the PROP_last_full_fold is set). I filed PR 122038 for the missing instrumentation for __builtin_assume_aligned , And with the attached patch I am going to change c-c++-common/ubsan/align-5.c too.