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: "dberlin at dberlin dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 May 2007 11:24:20 -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 #162 from dberlin at gcc dot gnu dot org 2007-05-28 11:24 -------
Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the
dynamic type as it should
On 28 May 2007 11:14:20 -0000, rguenther at suse dot de
<gcc-bugzilla@gcc.gnu.org> wrote:
>
>
> ------- Comment #161 from rguenther at suse dot de 2007-05-28 11:14 -------
> Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement
> new does not change the dynamic type as it should
>
> Btw, it could save us many bugs (or bug reports) if if PTA says must-alias
> we'd trust it, instead of using TBAA to say "but it shouldn't". Like for
> the (invalid)
>
> int foo(void *p)
> {
> double *q = p;
> int *r = p;
> *q = 1.0;
> return *r;
> }
>
> where we correctly figure that
>
> Points-to sets
> q_2 = same as p
> r_3 = same as p
>
These are just collapsed because of pointer equivalences.
There is no guarantee that we will discover all pointer equivalences,
and their are in fact cases where we won't.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29286