Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: adob321 at gmail dot com
Created attachment 31902
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31902&action=edit
PoC code
Modifications of global va
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59895
--- Comment #1 from Aleksandr Dobkin ---
Output I get is:
S1() called
S1() globalvec.size() = 1
main globalvec.size() = 0
tested with g++-4.8 (Ubuntu 4.8.1-2ubuntu1~12.04) 4.8.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59895
--- Comment #4 from Aleksandr Dobkin ---
(In reply to Andrew Pinski from comment #3)
> So in this case here, s1 is being initialized first and then globalvec gets
> initialized which changes the size back to 0.
Thanks for the explanation. I've ve