public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "peter.schmidt-nielsen at cba dot mit.edu" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/49355] New: new T({""}) crashes G++ when struct T { std::string foobar }; Date: Fri, 10 Jun 2011 01:08:00 -0000 [thread overview] Message-ID: <bug-49355-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49355 Summary: new T({""}) crashes G++ when struct T { std::string foobar }; Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: peter.schmidt-nielsen@cba.mit.edu Created attachment 24482 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24482 Minimal test case producing the (un)desired behavior, and temporary files. The following code: #include <string> struct T { std::string foobar; }; T* x = new T({""}); Produces the following behavior: peter@magma:~/tmp/a$ g++ --version g++ (Ubuntu 4.4.1-4ubuntu9) 4.4.1 Copyright (C) 2009 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. peter@magma:~/tmp/a$ g++ -Wall -Wextra test_case.cpp test_case.cpp:9: warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x test_case.cpp:9: warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x test_case.cpp: In function ‘void __static_initialization_and_destruction_0(int, int)’: test_case.cpp:9: internal compiler error: in lower_stmt, at gimple-low.c:408 Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-4.4/README.Bugs> for instructions. I listed the affected version as 4.7.0 because when I went on IRC, I was informed by a user there that 4.7.0 20110524 (experimental) [trunk revision 174141] is still affected. System information: peter@magma:~$ uname -a Linux magma 2.6.31-23-generic #75-Ubuntu SMP Fri Mar 18 18:16:06 UTC 2011 x86_64 GNU/Linux peter@magma:~$ cat /etc/issue Ubuntu 9.10 \n \l Attached is the code and the temps.
next reply other threads:[~2011-06-10 1:08 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-06-10 1:08 peter.schmidt-nielsen at cba dot mit.edu [this message] 2011-06-10 9:38 ` [Bug c++/49355] " rguenth at gcc dot gnu.org 2011-06-10 10:00 ` redi at gcc dot gnu.org 2011-06-30 21:47 ` jason at gcc dot gnu.org 2011-07-01 0:04 ` jason at gcc dot gnu.org 2011-07-01 0:08 ` jason at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-49355-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).