public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/51231] [4.5/4.6/4.7 Regression] g++ remove placement new with -O1 Date: Tue, 07 Feb 2012 11:46:00 -0000 [thread overview] Message-ID: <bug-51231-4-AJ61rtJvke@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-51231-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51231 Richard Guenther <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID --- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-02-07 11:45:31 UTC --- Confirmed. The store of 0xdeadbeef is gone: void create(allocator_type&, boost::interprocess::allocator<int, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family>, boost::interprocess::iset_index> >::value_type&, int) (struct allocator_type & allocator, value_type & at, int value) { value_type * myp; const ptrdiff_t D.99202; sizetype D.99201; struct pointer D.83867; <bb 2>: # USE = nonlocal { D.83867 } # CLB = nonlocal { D.83867 } D.83867 = boost::interprocess::allocator<int, boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family>, boost::interprocess::iset_index> >::address (allocator_1(D), at_2(D)); [return slot optimization] D.99202_7 = D.83867.internal.m_offset; if (D.99202_7 != 1) goto <bb 3>; else goto <bb 4>; <bb 3>: D.99201_8 = (sizetype) D.99202_7; # PT = { D.83867 } myp_9 = &D.83867 + D.99201_8; <bb 4>: # PT = null { D.83867 } # myp_10 = PHI <0B(2), myp_9(3)> if (myp_10 != 0B) goto <bb 5>; else goto <bb 6>; <bb 5>: value_11 = value_14(D); *myp_10 = value_11; <bb 6>: D.83867 ={v} {CLOBBER}; return; } in ealias. Note that Boost invokes undefined behavior here as it computes &D.83867 + D.83867.internal.m_offset which supposedly points to an object that is not D.83867 obviously, as that is automatic in function create() and the store would be dead anyway.
prev parent reply other threads:[~2012-02-07 11:46 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-11-19 22:04 [Bug c++/51231] New: " dushistov at mail dot ru 2011-11-19 22:07 ` [Bug c++/51231] " dushistov at mail dot ru 2011-11-19 22:59 ` dushistov at mail dot ru 2011-11-19 23:17 ` dushistov at mail dot ru 2011-11-21 14:45 ` dushistov at mail dot ru 2011-12-15 0:53 ` [Bug regression/51231] " pinskia at gcc dot gnu.org 2012-02-02 8:22 ` [Bug middle-end/51231] [4.5/4.6/4.7 Regression] " pinskia at gcc dot gnu.org 2012-02-07 11:46 ` rguenth at gcc dot gnu.org [this message]
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-51231-4-AJ61rtJvke@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).