public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51138] New: [C++0x] [4.6 Regression] Uninitialized list elements
@ 2011-11-15  7:59 reichelt at gcc dot gnu.org
  2011-11-15  8:35 ` [Bug c++/51138] " reichelt at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: reichelt at gcc dot gnu.org @ 2011-11-15  7:59 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51138
           Summary: [C++0x] [4.6 Regression] Uninitialized list elements
    Classification: Unclassified
           Product: gcc
           Version: 4.6.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: reichelt@gcc.gnu.org


The following code snippet does not work as expected when compiled with
"-std=c++0x" even at "-O0" - it returns 42 instead of 0 (on i686-pc-linux-gnu).

===========================================
#include<list>

int main()
{
  {
    const std::list<int> a(100, 42);
  }

  const std::list<int> b(1);
  return b.back();
}
===========================================

The bug only happens with GCC 4.6.x, trunk seems to be unaffected.


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

end of thread, other threads:[~2012-04-25  1:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-15  7:59 [Bug c++/51138] New: [C++0x] [4.6 Regression] Uninitialized list elements reichelt at gcc dot gnu.org
2011-11-15  8:35 ` [Bug c++/51138] " reichelt at gcc dot gnu.org
2011-11-15 10:49 ` redi at gcc dot gnu.org
2011-11-15 11:06 ` paolo.carlini at oracle dot com
2011-11-15 19:10 ` hjl.tools at gmail dot com
2011-11-15 19:26 ` paolo.carlini at oracle dot com
2011-11-15 21:22 ` jason at gcc dot gnu.org
2012-03-01 15:04 ` jakub at gcc dot gnu.org
2012-04-25  1:44 ` 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).