[Bug optimization/11269] [tree-ssa] wrong-code
steven at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Sep 14 20:26:00 GMT 2003
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;
}
}
More information about the Gcc-bugs
mailing list