public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "paolo.carlini at oracle dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/54984] [4.6/4.7/4.8 Regression] Array allocated with new in a template class is default initialised Date: Fri, 26 Oct 2012 00:18:00 -0000 [thread overview] Message-ID: <bug-54984-4-nSBnt3gKkU@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-54984-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54984 --- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-10-26 00:17:45 UTC --- And I'm testing the below, which appears almost obviously correct: essentially, when build_new is passed a pointer to null pointer to VEC, it should not turn the null pointer to VEC into an empty VEC! Index: init.c =================================================================== --- init.c (revision 192814) +++ init.c (working copy) @@ -2911,7 +2911,8 @@ build_new (VEC(tree,gc) **placement, tree type, tr orig_placement = make_tree_vector_copy (*placement); orig_nelts = nelts; - orig_init = make_tree_vector_copy (*init); + if (*init) + orig_init = make_tree_vector_copy (*init); make_args_non_dependent (*placement); if (nelts)
next prev parent reply other threads:[~2012-10-26 0:18 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-10-19 10:43 [Bug c++/54984] New: " malcolm.parsons at gmail dot com 2012-10-19 12:44 ` [Bug c++/54984] [4.6/4.7/4.8 Regression] " redi at gcc dot gnu.org 2012-10-21 23:01 ` paolo.carlini at oracle dot com 2012-10-25 23:31 ` paolo.carlini at oracle dot com 2012-10-25 23:43 ` paolo.carlini at oracle dot com 2012-10-26 0:18 ` paolo.carlini at oracle dot com [this message] 2012-10-26 14:04 ` paolo at gcc dot gnu.org 2012-10-26 14:20 ` paolo at gcc dot gnu.org 2012-10-26 14:21 ` [Bug c++/54984] [4.6 " paolo.carlini at oracle dot com 2013-01-30 10:22 ` paolo.carlini at oracle dot com
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-54984-4-nSBnt3gKkU@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).