https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79307

--- Comment #2 from Marc Glisse <glisse at gcc dot gnu.org> ---
If I remove the first one, I do get a warning

x.c: In function 'int main()':
x.c:5:47: warning: '<anonymous>' is used uninitialized in this function
[-Wuninitialized]
     void DoSomething() {    cout << "int:" << a_ << endl;  }
                                               ^~
x.c:13:22: note: '<anonymous>' was declared here
     TestRefInt ltfi(8);
                      ^

what prevents the warning otherwise:
- several calls -> not inlined
- static initializers are opaque to gcc's optimizers (even with LTO)

Reply via email to