This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug optimization/11269] [tree-ssa] wrong-code


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;
   }
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]