[Bug c++/82309] Compiled binary received SIGSEGV when -g

sergio_nsk at yahoo dot de gcc-bugzilla@gcc.gnu.org
Sat Sep 23 17:25:00 GMT 2017


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

Sergey Markelov <sergio_nsk at yahoo dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #4 from Sergey Markelov <sergio_nsk at yahoo dot de> ---
(In reply to Andrew Pinski from comment #3)
> You have a temporary which you are using after it has gone out of scope.

Thank you Andrew. Using 'auto' was my error. The proper line should be
    Vector sum = v0 + v1 + v2;

(Sorry, if you try this updated line in the minimized bug.cpp, it will not
work. It is ok, it works in my full code with paradox templates).


More information about the Gcc-bugs mailing list