This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/29286] [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 May 2007 20:59:28 -0000
- Subject: [Bug libstdc++/29286] [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should
- References: <bug-29286-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #36 from rguenth at gcc dot gnu dot org 2007-05-03 21:59 -------
Well, the patch in comment #33 really does what I did with the patch to
libstdc++.
If we take the first patch (from comment #29) and change its effects on the
alias machinery so that for
q = ALIAS_CONVERT_EXPR (p)
we have two VDEFs on qs and ps alias tags like
# SMT.1_2 = VDEF <SMT.1_1>
# SMT.2_2 = VDEF <SMT.2_1>
q = ALIAS_CONVERT_EXPR (p)
(and optimize q = ALIAS_CONVERT_EXPR (p) to q = p if the types of q and p
are the same, as pinskia noted), then we are safe at the tree level (the
ALIAS_CONVERT_EXPR represents a load/store barrier for qs and pq type).
At expansion time we'd need to do the same, which would be emitting clobbers
for mem expressions representing dereferences of q/p.
I believe we cannot really do better here.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29286