https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82309
--- Comment #7 from Jonathan Wakely ---
(In reply to Sergey Markelov from comment #6)
> Unfortunately -fsanitize=undefined does not catch this. Thank you for your
> help.
-fsanitize=address catchs it, specifically the use-after-return sanitizer,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82309
--- Comment #6 from Sergey Markelov ---
(In reply to Andrew Pinski from comment #5)
> The temp variable goes out if scope is the result of v0 + v1. And not the
> auto. IIRC -fsanitize=undefined will catch this.
Yes, I agree, I understood it fro
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82309
--- Comment #5 from Andrew Pinski ---
The temp variable goes out if scope is the result of v0 + v1. And not the auto.
IIRC -fsanitize=undefined will catch this.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82309
Sergey Markelov changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82309
--- Comment #3 from Andrew Pinski ---
You have a temporary which you are using after it has gone out of scope.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82309
--- Comment #2 from Sergey Markelov ---
Created attachment 42231
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42231&action=edit
Assembler
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82309
--- Comment #1 from Sergey Markelov ---
Created attachment 42230
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42230&action=edit
Preprocessed file