[Bug libstdc++/29286] [4.0/4.1/4.2 Regression] placement new does not change the dynamic type as it should
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Sep 29 17:01:00 GMT 2006
------- Comment #14 from pinskia at gcc dot gnu dot org 2006-09-29 17:01 -------
(In reply to comment #13)
> And here is a testcase that fails also for 4.0.0 and self contained also:
replace main with:
int main(void)
{
if (sizeof(int) != sizeof(long))
return 0;
int *a = new int;
long *b = new long;
*a = 0;
*b = 0;
if (foo(2, a, b) != 6)
abort ();
return 0;
}
----
This is what you get when thinking about 2 steps ahead of yourself.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29286
More information about the Gcc-bugs
mailing list