https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99122
--- Comment #20 from Jakub Jelinek <jakub at gcc dot gnu.org> --- I think you don't want variably_modified_type_p, that returns true even for pointers to VLAs (and references etc., perhaps many times indirectly). I think those should be fine, they are used fairly often unlike variable length structures, and so we'd run into issues before.