This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/14814] no folding back to ARRAY_REF for COMPONENT_REF
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Aug 2004 01:29:43 -0000
- Subject: [Bug rtl-optimization/14814] no folding back to ARRAY_REF for COMPONENT_REF
- References: <20040401225801.14814.dalej@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-08-23 01:29 -------
I should note that the tree level still cannot handle the some of this but the RTL still can do it for some
reason.
Note after my no-lower patches what needs to be folded this time is:
*((double *)&<D1601>.e + 8B)
into
<D1601>.e[1]
Simpler example for the problem now:
struct YY {
double &y() { return e[1]; }
double e[3]; };
double foo(YY& r) {
return r.y();
}
double foo1(YY &r)
{
return r.e[1];
}
The tree expressions should be the same for foo and foo1.
--
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2004-06-29 17:31:54 |2004-08-23 01:29:42
date| |
Summary|SRA does not happen on |no folding back to ARRAY_REF
|arrays in structs |for COMPONENT_REF
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14814