https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115030
--- Comment #2 from Seyed Sajad Kahani <sska1377 at gmail dot com> --- Created attachment 58177 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58177&action=edit a similar code that works, as a clue (clue_1.cc) Additionally, the problem will disappear by enclosing variable in a class (see attached clue.cc)