https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68785
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 36971 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36971&action=edit gcc6-pr68785.patch Sure, it is undefined behavior, but I believe we should spend the minimum amount of code on it. And that IMHO is this, using the APIs the way they were meant to be used when added. It won't be folded, but why should we spend time folding something that is invalid.