https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110620
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- >From the looks of it is just not optimizing enough before the warning happens. The final optimized code does not have the store in it. The store for the vector to create the size of one element vector happens and then a copy loop happens and then loads from start/finish to figure out the size of the vector but that is not optimized until dom2 which is after vrp2 already ran ...