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

2010-06-19 Thread schaub-johannes at web dot de
--- Comment #179 from schaub-johannes at web dot de 2010-06-20 00:01 --- (In reply to comment #158) Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should rguenther at suse dot de gcc-bugzi...@gcc.gnu.org writes: [...] | Now,

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

2007-06-12 Thread ian at gcc dot gnu dot org
--- Comment #177 from ian at gcc dot gnu dot org 2007-06-12 17:47 --- Subject: Bug 29286 Author: ian Date: Tue Jun 12 17:47:37 2007 New Revision: 125653 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=125653 Log: ./: PR libstdc++/29286 * tree.def: Add

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

2007-06-12 Thread ian at airs dot com
--- Comment #178 from ian at airs dot com 2007-06-12 18:10 --- Fixed on mainline. No plans to backport the patch to previous releases. -- ian at airs dot com changed: What|Removed |Added

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

2007-06-09 Thread rguenth at gcc dot gnu dot org
--- Comment #173 from rguenth at gcc dot gnu dot org 2007-06-09 09:48 --- Full testing shows no (or at least 0.5%) performance regression on tramp3d runtime. Compile time seems to go up by 0.5% (that looks consistent, about the same with previous patches) for tramp3d. Testcases not

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

2007-06-09 Thread pcarlini at suse dot de
--- Comment #174 from pcarlini at suse dot de 2007-06-09 09:55 --- Great! -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29286

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

2007-06-09 Thread bkoz at gcc dot gnu dot org
--- Comment #175 from bkoz at gcc dot gnu dot org 2007-06-09 12:03 --- Nice, thanks Ian. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29286

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

2007-06-09 Thread mark at codesourcery dot com
--- Comment #176 from mark at codesourcery dot com 2007-06-09 19:29 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should rguenth at gcc dot gnu dot org wrote: So, from my point of view the patch is ready to be exposed to more

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

2007-06-08 Thread ian at airs dot com
--- Comment #171 from ian at airs dot com 2007-06-08 07:49 --- Created an attachment (id=13666) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13666action=view) Patch This variant of the previous patch does better on at least some of the tramp3d functions. Here we eliminate the

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

2007-06-08 Thread rguenther at suse dot de
--- Comment #172 from rguenther at suse dot de 2007-06-08 13:47 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should On Fri, 8 Jun 2007, ian at airs dot com wrote: --- Comment #171 from ian at airs dot com 2007-06-08

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

2007-06-06 Thread rguenther at suse dot de
--- Comment #170 from rguenther at suse dot de 2007-06-06 08:41 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should On Wed, 6 Jun 2007, ian at airs dot com wrote: --- Comment #169 from ian at airs dot com 2007-06-06 05:33

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

2007-06-05 Thread rguenth at gcc dot gnu dot org
--- Comment #166 from rguenth at gcc dot gnu dot org 2007-06-05 16:20 --- It causes a 10% performance regression for tramp3d. There appear to be no significant changes in libstdc++ performance testing. Fixing tramp3d-v4 with the below patch cures the performance regression. ---

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

2007-06-05 Thread ian at airs dot com
--- Comment #167 from ian at airs dot com 2007-06-05 20:48 --- Can you give me a .ii file for the performance regression, and point me at the relevant function? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29286

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

2007-06-05 Thread rguenther at suse dot de
--- Comment #168 from rguenther at suse dot de 2007-06-05 21:17 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should On Tue, 5 Jun 2007, ian at airs dot com wrote: --- Comment #167 from ian at airs dot com 2007-06-05 20:48

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

2007-06-05 Thread ian at airs dot com
--- Comment #169 from ian at airs dot com 2007-06-06 05:33 --- What options are you using when you compile? I don't see the symbol you mention, although I do see

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

2007-06-04 Thread rguenth at gcc dot gnu dot org
--- Comment #165 from rguenth at gcc dot gnu dot org 2007-06-04 14:02 --- The lates patch fixes the FreePOOMA testsuite regressions. I'll give it a performance testing spin on vangelis tonight. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29286

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

2007-05-30 Thread ian at airs dot com
--- Comment #164 from ian at airs dot com 2007-05-30 23:18 --- Created an attachment (id=13637) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13637action=view) Patch This is a modification of the previous patch which correctly handles the test case in comment #85. -- ian at

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

2007-05-28 Thread rguenther at suse dot de
--- 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

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

2007-05-28 Thread dberlin at dberlin 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 -, rguenther at suse dot de [EMAIL PROTECTED] wrote: --- Comment #161

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

2007-05-28 Thread ian at airs dot com
--- Comment #163 from ian at airs dot com 2007-05-28 17:30 --- Richi, I tested my patch on every test case I saved. Can you just point me at the one I missed? Thanks. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29286

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

2007-05-27 Thread rguenther at suse dot de
--- Comment #160 from rguenther at suse dot de 2007-05-27 14:57 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should On Sat, 25 May 2007, ian at airs dot com wrote: --- Comment #159 from ian at airs dot com 2007-05-25 23:21

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

2007-05-25 Thread ian at airs dot com
--- Comment #159 from ian at airs dot com 2007-05-25 23:21 --- Created an attachment (id=13613) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13613action=view) Patch This version of the patch is based on some code from Daniel Berlin. Here we determine which pointers can

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

2007-05-24 Thread rguenther at suse dot de
--- Comment #153 from rguenther at suse dot de 2007-05-24 09:03 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should On Thu, 23 May 2007, gdr at cs dot tamu dot edu wrote: --- Comment #151 from gdr at cs dot tamu dot edu

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

2007-05-24 Thread rguenther at suse dot de
--- Comment #154 from rguenther at suse dot de 2007-05-24 10:07 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should On Wed, 23 May 2007, mark at codesourcery dot com wrote: Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement

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

2007-05-24 Thread rguenther at suse dot de
--- Comment #155 from rguenther at suse dot de 2007-05-24 10:11 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should On Thu, 24 May 2007, rguenther at suse dot de wrote: So I did some benchmarking with my two proposed patches

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

2007-05-24 Thread gdr at cs dot tamu dot edu
--- Comment #156 from gdr at cs dot tamu dot edu 2007-05-24 10:29 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should rguenther at suse dot de [EMAIL PROTECTED] writes: [...] | I brought in the union example to point of a

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

2007-05-24 Thread rguenther at suse dot de
--- Comment #157 from rguenther at suse dot de 2007-05-24 10:33 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should On Thu, 24 May 2007, gdr at cs dot tamu dot edu wrote: --- Comment #156 from gdr at cs dot tamu dot edu

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

2007-05-24 Thread gdr at cs dot tamu dot edu
--- Comment #158 from gdr at cs dot tamu dot edu 2007-05-24 10:47 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should rguenther at suse dot de [EMAIL PROTECTED] writes: [...] | Now, if I understand your argument below correctly,

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

2007-05-23 Thread rguenther at suse dot de
--- Comment #124 from rguenther at suse dot de 2007-05-23 09:35 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should On Tue, 22 May 2007, dberlin at dberlin dot org wrote: --- Comment #116 from dberlin at gcc dot gnu dot org

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

2007-05-23 Thread gdr at cs dot tamu dot edu
--- Comment #125 from gdr at cs dot tamu dot edu 2007-05-23 14:22 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should rguenther at suse dot de [EMAIL PROTECTED] writes: [...] | But you can still perform hoisting loads of incoming

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

2007-05-23 Thread rguenther at suse dot de
--- Comment #126 from rguenther at suse dot de 2007-05-23 14:43 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should On Wed, 23 May 2007, gdr at cs dot tamu dot edu wrote: --- Comment #125 from gdr at cs dot tamu dot edu

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

2007-05-23 Thread ian at airs dot com
--- Comment #127 from ian at airs dot com 2007-05-23 15:23 --- Re comment #105. The case where TBAA is most useful is on a deeply pipelined in-order processor with multiple function units and a high latency memory cache. One example I've worked on is an embedded VLIW processor with

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

2007-05-23 Thread rguenther at suse dot de
--- Comment #128 from rguenther at suse dot de 2007-05-23 15:37 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should On Wed, 23 May 2007, ian at airs dot com wrote: --- Comment #127 from ian at airs dot com 2007-05-23 15:23

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

2007-05-23 Thread gdr at cs dot tamu dot edu
--- Comment #129 from gdr at cs dot tamu dot edu 2007-05-23 15:59 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should rguenther at suse dot de [EMAIL PROTECTED] writes: | Note that it is important to retain the capability to

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

2007-05-23 Thread ian at airs dot com
--- Comment #130 from ian at airs dot com 2007-05-23 16:43 --- In this example void foo(int *p) { float *f = (float *)p; new (p) float; *f = 1.0; } the pointer is p. In fact the relevant pointer is always the argument to placement new, and every pointer which PTA can associate

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

2007-05-23 Thread rguenther at suse dot de
--- Comment #131 from rguenther at suse dot de 2007-05-23 16:54 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should On Wed, 23 May 2007, ian at airs dot com wrote: --- Comment #130 from ian at airs dot com 2007-05-23 16:43

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

2007-05-23 Thread dberlin at dberlin dot org
--- Comment #132 from dberlin at gcc dot gnu dot org 2007-05-23 19:03 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should On 23 May 2007 08:35:12 -, rguenther at suse dot de [EMAIL PROTECTED] wrote: --- Comment #124

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

2007-05-23 Thread mark at codesourcery dot com
--- Comment #133 from mark at codesourcery dot com 2007-05-23 19:43 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should ian at airs dot com wrote: The case where TBAA is most useful is on a deeply pipelined in-order processor

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

2007-05-23 Thread rguenth at gcc dot gnu dot org
--- Comment #134 from rguenth at gcc dot gnu dot org 2007-05-23 19:54 --- But using a union for type-punning is a gcc extension (and of course the extension is only for access through the union), so with strict C99/C++ semantics we can avoid reloading d[i-1] even if a and d were in the

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

2007-05-23 Thread rguenth at gcc dot gnu dot org
--- Comment #135 from rguenth at gcc dot gnu dot org 2007-05-23 19:56 --- Re comment #132 -- you cannot encode this into the IL :/ And I don't propose to do so. And I say any working and optimal (from optimization perspective) variant of a fix for this PR has the same problem. --

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

2007-05-23 Thread mark at codesourcery dot com
--- Comment #136 from mark at codesourcery dot com 2007-05-23 20:10 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should rguenth at gcc dot gnu dot org wrote: --- Comment #134 from rguenth at gcc dot gnu dot org 2007-05-23

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

2007-05-23 Thread rguenth at gcc dot gnu dot org
--- Comment #137 from rguenth at gcc dot gnu dot org 2007-05-23 20:46 --- Created an attachment (id=13607) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13607action=view) patch to perserve store ordering in loop load/store motion quote Gaby's claim is that given an arbitrary

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

2007-05-23 Thread rguenth at gcc dot gnu dot org
--- Comment #138 from rguenth at gcc dot gnu dot org 2007-05-23 20:57 --- Note the patch is not 100% correct as we need to preserve store ordering on the path to all exit edges which may be different for each exit. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29286

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

2007-05-23 Thread joseph at codesourcery dot com
--- Comment #139 from joseph at codesourcery dot com 2007-05-23 21:00 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should On Wed, 23 May 2007, mark at codesourcery dot com wrote: Of course, Gaby's memory model doesn't allow

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

2007-05-23 Thread mark at codesourcery dot com
--- Comment #140 from mark at codesourcery dot com 2007-05-23 21:07 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should rguenth at gcc dot gnu dot org wrote: quote Gaby's claim is that given an arbitrary pointer p, saying:

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

2007-05-23 Thread mark at codesourcery dot com
--- Comment #141 from mark at codesourcery dot com 2007-05-23 21:13 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should joseph at codesourcery dot com wrote: DR#236 http://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_236.htm was

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

2007-05-23 Thread rguenther at suse dot de
--- Comment #142 from rguenther at suse dot de 2007-05-23 21:14 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should On Wed, 23 May 2007, mark at codesourcery dot com wrote: --- Comment #140 from mark at codesourcery dot com

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

2007-05-23 Thread mark at codesourcery dot com
--- Comment #143 from mark at codesourcery dot com 2007-05-23 21:27 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should rguenther at suse dot de wrote: void f(int *p) { *p = 3; } under Gaby's interpretation, we

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

2007-05-23 Thread rguenther at suse dot de
--- Comment #144 from rguenther at suse dot de 2007-05-23 21:48 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should On Wed, 23 May 2007, mark at codesourcery dot com wrote: rguenther at suse dot de wrote: void f(int *p) {

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

2007-05-23 Thread dberlin at dberlin dot org
--- Comment #145 from dberlin at gcc dot gnu dot org 2007-05-23 22:02 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should On 23 May 2007 18:57:03 -, rguenth at gcc dot gnu dot org [EMAIL PROTECTED] wrote: --- Comment

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

2007-05-23 Thread mark at codesourcery dot com
--- Comment #146 from mark at codesourcery dot com 2007-05-23 22:13 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should rguenther at suse dot de wrote: Only so much that we seem to agree on the semantics of placement new. Gaby

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

2007-05-23 Thread gdr at cs dot tamu dot edu
--- Comment #147 from gdr at cs dot tamu dot edu 2007-05-23 23:42 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should mark at codesourcery dot com [EMAIL PROTECTED] writes: | Of course, Gaby's memory model doesn't allow this

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

2007-05-23 Thread gdr at cs dot tamu dot edu
--- Comment #148 from gdr at cs dot tamu dot edu 2007-05-23 23:50 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should mark at codesourcery dot com [EMAIL PROTECTED] writes: | Gaby's claim, as I understand it, is that writing to a

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

2007-05-23 Thread gdr at cs dot tamu dot edu
--- Comment #149 from gdr at cs dot tamu dot edu 2007-05-23 23:56 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should mark at codesourcery dot com [EMAIL PROTECTED] writes: | --- Comment #140 from mark at codesourcery dot com

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

2007-05-23 Thread gdr at cs dot tamu dot edu
--- Comment #150 from gdr at cs dot tamu dot edu 2007-05-23 23:57 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should mark at codesourcery dot com [EMAIL PROTECTED] writes: | Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement |

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

2007-05-23 Thread gdr at cs dot tamu dot edu
--- Comment #151 from gdr at cs dot tamu dot edu 2007-05-24 00:58 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should rguenther at suse dot de [EMAIL PROTECTED] writes: [...] | Gaby's model says that we know less about dynamic

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

2007-05-23 Thread gdr at cs dot tamu dot edu
--- Comment #152 from gdr at cs dot tamu dot edu 2007-05-24 01:06 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should mark at codesourcery dot com [EMAIL PROTECTED] writes: [...] | However, I don't like this approach because I

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

2007-05-22 Thread rguenth at gcc dot gnu dot org
--- Comment #105 from rguenth at gcc dot gnu dot org 2007-05-22 10:50 --- Let me again do a step back and look at the problem from another view ;) -- C++ aliasing imposes additional restrictions on transformations we are allowed to do to memory references compared to C type-based

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

2007-05-22 Thread mark at codesourcery dot com
--- Comment #106 from mark at codesourcery dot com 2007-05-22 16:04 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should rguenth at gcc dot gnu dot org wrote: - we _cannot_ sink loads across stores. x = *int;

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

2007-05-22 Thread rguenther at suse dot de
--- Comment #107 from rguenther at suse dot de 2007-05-22 16:20 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should On Tue, 22 May 2007, mark at codesourcery dot com wrote: rguenth at gcc dot gnu dot org wrote: - we

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

2007-05-22 Thread Gabriel Dos Reis
mark at codesourcery dot com [EMAIL PROTECTED] writes: | Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement | new does not change the dynamic type as it should | | rguenth at gcc dot gnu dot org wrote: | | - we _cannot_ sink loads across stores. | | x = *int; | *double = 1.0;

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

2007-05-22 Thread gdr at cs dot tamu dot edu
--- Comment #108 from gdr at cs dot tamu dot edu 2007-05-22 16:55 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should mark at codesourcery dot com [EMAIL PROTECTED] writes: | Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement |

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

2007-05-22 Thread mark at codesourcery dot com
--- Comment #109 from mark at codesourcery dot com 2007-05-22 17:19 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should gdr at cs dot tamu dot edu wrote: Consider the following instead // tu-1.C void f(int* p) {

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

2007-05-22 Thread Gabriel Dos Reis
mark at codesourcery dot com [EMAIL PROTECTED] writes: | Indeed, consider this: | | // tu-2.C | void f(int*); | void g() { |union { | int i; | double d; |} t; | | t.i = 42; | f(t); | cout t.d endl; | } | | I believe we

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

2007-05-22 Thread gdr at cs dot tamu dot edu
--- Comment #110 from gdr at cs dot tamu dot edu 2007-05-22 17:25 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should mark at codesourcery dot com [EMAIL PROTECTED] writes: | Indeed, consider this: | | // tu-2.C | void

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

2007-05-22 Thread mark at codesourcery dot com
--- Comment #111 from mark at codesourcery dot com 2007-05-22 17:37 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should gdr at cs dot tamu dot edu wrote: | No, I do not. And GCC historically has not; you are only allowed to use

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

2007-05-22 Thread Gabriel Dos Reis
mark at codesourcery dot com [EMAIL PROTECTED] writes: | But, I don't think the standard contemplated | these issues in sufficient detail to make it useful in this respect. The issues has been raised on the -core reflector. -- Gaby

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

2007-05-22 Thread gdr at cs dot tamu dot edu
--- Comment #112 from gdr at cs dot tamu dot edu 2007-05-22 17:46 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should mark at codesourcery dot com [EMAIL PROTECTED] writes: | But, I don't think the standard

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

2007-05-22 Thread mark at codesourcery dot com
--- Comment #113 from mark at codesourcery dot com 2007-05-22 17:54 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should gdr at cs dot tamu dot edu wrote: --- Comment #112 from gdr at cs dot tamu dot edu 2007-05-22 17:46

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

2007-05-22 Thread gdr at cs dot tamu dot edu
--- Comment #114 from gdr at cs dot tamu dot edu 2007-05-22 18:01 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should mark at codesourcery dot com [EMAIL PROTECTED] writes: | Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement |

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

2007-05-22 Thread dberlin at dberlin dot org
--- Comment #115 from dberlin at gcc dot gnu dot org 2007-05-22 18:10 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should On 22 May 2007 16:54:24 -, mark at codesourcery dot com [EMAIL PROTECTED] wrote: --- Comment #113

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

2007-05-22 Thread dberlin at dberlin dot org
--- Comment #116 from dberlin at gcc dot gnu dot org 2007-05-22 18:13 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should On 22 May 2007 17:01:40 -, gdr at cs dot tamu dot edu [EMAIL PROTECTED] wrote: --- Comment #114

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

2007-05-22 Thread gdr at cs dot tamu dot edu
--- Comment #117 from gdr at cs dot tamu dot edu 2007-05-22 18:19 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should dberlin at dberlin dot org [EMAIL PROTECTED] writes: [...] | And if you've raised them now, can you please try

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

2007-05-22 Thread mark at codesourcery dot com
--- Comment #118 from mark at codesourcery dot com 2007-05-22 18:34 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should gdr at cs dot tamu dot edu wrote: Thanks for reminding all those points. I'll ensure that I make those

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

2007-05-22 Thread gdr at cs dot tamu dot edu
--- Comment #119 from gdr at cs dot tamu dot edu 2007-05-22 18:40 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should mark at codesourcery dot com [EMAIL PROTECTED] writes: | Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement |

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

2007-05-22 Thread mark at codesourcery dot com
--- Comment #120 from mark at codesourcery dot com 2007-05-22 18:55 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should gdr at cs dot tamu dot edu wrote: | I would guess | that we made this change around the year 2000. So,

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

2007-05-22 Thread gdr at cs dot tamu dot edu
--- Comment #121 from gdr at cs dot tamu dot edu 2007-05-22 20:12 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should mark at codesourcery dot com [EMAIL PROTECTED] writes: [...] | And, although I don't have the time/energy that

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

2007-05-22 Thread mrs at apple dot com
--- Comment #122 from mrs at apple dot com 2007-05-22 20:41 --- When the standard was originally written, I do think we may have missed out on some finer points of the C object model, mainly to do with restrictions on what one is not permitted to do stemming from the declared type. The

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

2007-05-22 Thread gdr at cs dot tamu dot edu
--- Comment #123 from gdr at cs dot tamu dot edu 2007-05-22 20:53 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should mrs at apple dot com [EMAIL PROTECTED] writes: | I think it is reasonable to push the tighening language into

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

2007-05-18 Thread ian at airs dot com
--- Comment #78 from ian at airs dot com 2007-05-18 07:14 --- The test case in comment #73 is just a standard aliasing violation. You are casting a double* to an int* and writing to it both ways. As I argued in comment #76, the only way this is going to work is if we eliminate TBAA in

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

2007-05-18 Thread ian at airs dot com
--- Comment #79 from ian at airs dot com 2007-05-18 07:25 --- The test case in comment #71 doesn't use placement new either. This PR was originally about placement new. I think there is general agreement thta placement new needs to avoid aliasing problem. I don't think there is

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

2007-05-18 Thread mark at codesourcery dot com
--- Comment #80 from mark at codesourcery dot com 2007-05-18 07:26 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should ian at airs dot com wrote: --- Comment #78 from ian at airs dot com 2007-05-18 07:14 --- The test

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

2007-05-18 Thread rguenth at gcc dot gnu dot org
--- Comment #81 from rguenth at gcc dot gnu dot org 2007-05-18 09:45 --- Yes, both testcases are valid and are using placement new. Note the loop is only to confuse the optimizers enough to re-order the stores and produce a miscompilation. Note the loop runs exactly once, and in

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

2007-05-18 Thread rguenth at gcc dot gnu dot org
--- Comment #82 from rguenth at gcc dot gnu dot org 2007-05-18 09:47 --- Oh, and the double-ness is to show that at RTL expansion we actually unify alias sets of long and double, not long and int, which is wrong again. See my comment #51. --

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

2007-05-18 Thread rguenth at gcc dot gnu dot org
--- Comment #85 from rguenth at gcc dot gnu dot org 2007-05-18 14:46 --- To avoid confusion about what testcase we speak, let's talk about the one I replicated below. I believe this one is valid as the storage is a union instantiated in main() and a pointer to it is passed to foo().

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

2007-05-18 Thread gdr at cs dot tamu dot edu
--- Comment #83 from gdr at cs dot tamu dot edu 2007-05-18 14:26 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should ian at airs dot com [EMAIL PROTECTED] writes: | The test case in comment #71 doesn't use placement new either. |

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

2007-05-18 Thread gdr at cs dot tamu dot edu
--- Comment #84 from gdr at cs dot tamu dot edu 2007-05-18 14:30 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should rguenth at gcc dot gnu dot org [EMAIL PROTECTED] writes: | --- Comment #81 from rguenth at gcc dot gnu dot

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

2007-05-18 Thread ian at airs dot com
--- Comment #86 from ian at airs dot com 2007-05-18 17:24 --- Re comment #80, comment #81, comment #82. My patch handles the placement new in comment #73 to indicate an alias between double and long. The mis-ordered code is actually aliasing int and long. That aliasing is due to a

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

2007-05-18 Thread mark at codesourcery dot com
--- Comment #89 from mark at codesourcery dot com 2007-05-18 17:44 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should ian at airs dot com wrote: --- Comment #86 from ian at airs dot com 2007-05-18 17:24 --- Re comment

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

2007-05-18 Thread ian at airs dot com
--- Comment #88 from ian at airs dot com 2007-05-18 17:35 --- Regarding comment #85, this again relies on the notion of dynamic type of a memory location such that the only possible end result is to eliminate TBAA when compiling C++. The only thing I can say about this sort of test

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

2007-05-18 Thread ian at airs dot com
--- Comment #87 from ian at airs dot com 2007-05-18 17:27 --- I'm not sure what to make of comment #84. We don't determine aliasing by alignment or size. We determine it by type. We don't currently treat int and long as aliasing each other even if they happen to have the same

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

2007-05-18 Thread pinskia at gcc dot gnu dot org
--- Comment #92 from pinskia at gcc dot gnu dot org 2007-05-18 18:55 --- So if that is not valid, and the placement new case is valid, then what is the essential difference between the cases? The variable is being accessed via two different types. Why is that OK? void f(double*

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

2007-05-18 Thread ian at airs dot com
--- Comment #94 from ian at airs dot com 2007-05-18 19:03 --- I tried the original test case with icc, and it gets the right result. The assignment b-p = 0 is discarded. Unfortunately I'm not sure what this actually tells us. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29286

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

2007-05-18 Thread mark at codesourcery dot com
--- Comment #93 from mark at codesourcery dot com 2007-05-18 19:01 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should ian at airs dot com wrote: void f(double* p) { *(int*)p = 3; long *l = new (p) long; *l = 4; } void g() {

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

2007-05-18 Thread ian at airs dot com
--- Comment #90 from ian at airs dot com 2007-05-18 18:38 --- I agree that this is valid: void f(double *p) { *(int*)p = 3; } void g() { int i; f((double *)i); } But I don't think that is the question at hand. The variable is always being accessed in the same type, which is also

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

2007-05-18 Thread pcarlini at suse dot de
--- Comment #91 from pcarlini at suse dot de 2007-05-18 18:46 --- (In reply to comment #90) Can anybody see a way through this maze? Humbly, I'd like to suggest again that we have a look to the assembly produced by other compilers. I remember that some GCC contributors have access to

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

2007-05-18 Thread rguenth at gcc dot gnu dot org
--- Comment #95 from rguenth at gcc dot gnu dot org 2007-05-18 20:55 --- But construction/initialization of uninitalized memory in memory happens with placement new! So we're back to square one. What this PR initially was about is a fixed type memory allocator in C++ which needs to

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

2007-05-18 Thread pcarlini at suse dot de
--- Comment #96 from pcarlini at suse dot de 2007-05-18 21:12 --- (In reply to comment #95) But construction/initialization of uninitalized memory in memory happens with placement new! Placement new is used only for non-POD types, to be clear. --

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

2007-05-18 Thread mark at codesourcery dot com
--- Comment #97 from mark at codesourcery dot com 2007-05-18 21:17 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should rguenth at gcc dot gnu dot org wrote: But construction/initialization of uninitalized memory in memory

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

2007-05-18 Thread pcarlini at suse dot de
--- Comment #98 from pcarlini at suse dot de 2007-05-18 21:27 --- (In reply to comment #97) First and foremeost, we have to generate correct code. If that means the memory barrier solution, for now, then so be it. Yes, but I'm a little worried myself not by memory but by containers

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

2007-05-18 Thread pcarlini at suse dot de
--- Comment #99 from pcarlini at suse dot de 2007-05-18 21:37 --- To complete my reasoning: in case we end-up with some sort of very bad pessimization of placement new, probably we'll have to adjust such containers to not call allocator::contruct at all when the default allocator is

  1   2   >