[llvm-bugs] [Bug 24597] constexpr: Read of object whose lifetime has ended

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Aug 27 19:43:58 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=24597

Richard Smith <richard-llvm at metafoo.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|INVALID                     |FIXED

--- Comment #6 from Richard Smith <richard-llvm at metafoo.co.uk> ---
Hmm, I missed that your move constructor doesn't inherit the 'i' from its
argument. This is a bug: we're eliding the move-construction of the A temporary
within the return-statement of f(), but we're not properly lifetime-extending
the temporary, so it looks to us like 'i' refers to an object whose lifetime
has ended.

Fixed in r246263.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150828/9538c580/attachment.html>


More information about the llvm-bugs mailing list