https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125916
--- Comment #3 from Drea Pinski <pinskia at gcc dot gnu.org> --- Yes this code is undefined. Because it is not const. There is request for a different attribute which fits this case but I cant find it right now.
