public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/55856] New: ICE on tuple with rvalue ref member
@ 2013-01-03 10:11 leonid at volnitsky dot com
  2013-01-03 16:26 ` [Bug c++/55856] [4.7/4.8 Regression] " paolo.carlini at oracle dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: leonid at volnitsky dot com @ 2013-01-03 10:11 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55856

             Bug #: 55856
           Summary: ICE on tuple with rvalue ref member
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: leonid@volnitsky.com


----------------------------------------------------------
#include <string>
#include <tuple>

std::tuple<int&&>               A{1};   // ok
std::string&&                   B{""};  // ok
std::tuple<std::string&&>       C{""};  // ICE
//int  main() {};
-----------------------------------------------------------

Code as shown have dangling rval ref to string&&  in C. 
But if we would build rvalue tuple, this would be valid code (temp string
should live with lifespan of initialization expressions).

Error message:


/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0-pre9999/include/g++-v4/tuple:135:46:
internal compiler error: in build_data_member_initialization, at
cp/semantics.c:5853
  : _M_head_impl(std::forward<_UHead>(__h)) { }
                                              ^
Please submit a full bug report,


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-03-05 19:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-03 10:11 [Bug c++/55856] New: ICE on tuple with rvalue ref member leonid at volnitsky dot com
2013-01-03 16:26 ` [Bug c++/55856] [4.7/4.8 Regression] " paolo.carlini at oracle dot com
2013-01-03 17:01 ` jason at gcc dot gnu.org
2013-01-03 18:31 ` jason at gcc dot gnu.org
2013-01-03 18:31 ` jason at gcc dot gnu.org
2013-01-03 18:35 ` jason at gcc dot gnu.org
2013-01-03 18:40 ` jason at gcc dot gnu.org
2013-01-24 18:11 ` simonb at gcc dot gnu.org
2013-03-05 19:31 ` paolo.carlini at oracle dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).