This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/21538] g++.dg/opt/temp1.C should be optimized elsewhere
- From: "mark at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 May 2005 00:17:59 -0000
- Subject: [Bug middle-end/21538] g++.dg/opt/temp1.C should be optimized elsewhere
- References: <20050512195536.21538.jsm28@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From mark at codesourcery dot com 2005-05-16 00:17 -------
Subject: Re: g++.dg/opt/temp1.C should be optimized
elsewhere
rguenth at gcc dot gnu dot org wrote:
> ------- Additional Comments From rguenth at gcc dot gnu dot org 2005-05-15 19:30 -------
> This optimization should take place in
>
> cp/typeck:build_indirect_ref
>
> where it even tries to do so but fails because it does not strip
> NOP_EXPRs before checking for the optimization and also because
> same_types_p says const T and T are not equal.
They're not equal, and I don't think this should be fixed in
build_indirect_ref. It definitely seems like something that should be
optimized in the middle end.
In any case, given that you've kindly reverted your patch, is there any
reason that the 4.0.1 target milestone is still on this PR, or may I
remove it?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21538