This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/11269] [tree-ssa] wrong-code
- From: "steven at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Sep 2003 20:22:06 -0000
- Subject: [Bug optimization/11269] [tree-ssa] wrong-code
- References: <20030620183319.11269.reichelt@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11269
------- Additional Comments From steven at gcc dot gnu dot org 2003-09-14 20:22 -------
Diego,
Funny you looked at this just today. I did so as well and also came to the
conclusion that this has to be a front end problem. I compiled the test case
with -fdump-tree-{original,inlined,gimple}. The "original" dump already shows
the problem you also identified:
;; Function int& A::GetFirst() (_ZN1A8GetFirstEv)
;; enabled by -tree-original
{
{
return <return-value> = (this);
}
}
;; Function A foo() (_Z3foov)
;; enabled by -tree-original
{
{
struct A a;
(void)(*GetFirst((&a))= 1);
return; // return *WHAT* ??? This was "return a;" in the test case.
}
}
;; Function int main() (main)
;; enabled by -tree-original
{
{
struct A b;
({
(void)(b = (__builtin_memcpy(&<Udee0>, & foo()));
});
if (*GetFirst((&b)) != 1)
{
abort();
}
return <return-value> = 0;
}
}