This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/36143] [4.4 Regression]: FAIL: g++.dg/tree-ssa/pr19637.C
- From: "rguenther at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 May 2008 10:22:39 -0000
- Subject: [Bug middle-end/36143] [4.4 Regression]: FAIL: g++.dg/tree-ssa/pr19637.C
- References: <bug-36143-682@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from rguenther at suse dot de 2008-05-06 10:22 -------
Subject: Re: [4.4 Regression]: FAIL: g++.dg/tree-ssa/pr19637.C
On Tue, 6 May 2008, pinskia at gcc dot gnu dot org wrote:
> ------- Comment #5 from pinskia at gcc dot gnu dot org 2008-05-06 04:15 -------
> Oh we don't handle VCE On the left hand side for many different reasons. One
> is because if we set only part of the variable, we could get possible invalid
> gimple as we are only setting part of a SSA_NAME. I am un-assigning myself for
> now.
We fold
i.1_7 = (struct Foo *) &i;
D.2236_8 = i.1_7->i[0];
to
D.2236_8 = VIEW_CONVERT_EXPR<struct Foo>(i).i[0];
which is fine in principle but misses a folding to i[0].
maybe_fold_offset_to_{array,component}_ref in tree-ssa-ccp.c should
be extended to handle this case, invoked via fold_stmt.
Richard.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36143