This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/29286] [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]