This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/70444] Optimizer removes expression template
- From: "glisse at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 30 Mar 2016 09:26:22 +0000
- Subject: [Bug c++/70444] Optimizer removes expression template
- Auto-submitted: auto-generated
- References: <bug-70444-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70444
--- Comment #2 from Marc Glisse <glisse at gcc dot gnu.org> ---
This code is likely broken, it looks like the last example in
https://gmplib.org/manual/C_002b_002b-Interface-Limitations.html
The temporary expression for v1+v2 dies before the next line, and you have a
dangling reference in the dead+v3 expression.