public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/11263] New: [SPARC] wrong code with -O2 -fnew-ra : undefined content of output register o3 was used
@ 2003-06-20  9:18 heinrich dot brand at fujitsu-siemens dot com
  2003-07-28 11:33 ` [Bug optimization/11263] " ehrhardt at mathematik dot uni-ulm dot de
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: heinrich dot brand at fujitsu-siemens dot com @ 2003-06-20  9:18 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11263

           Summary: [SPARC] wrong code with -O2 -fnew-ra : undefined content
                    of output register o3 was used
           Product: gcc
           Version: 3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: heinrich.brand@fujitsu-siemens.com
                CC: gcc-bugs@gcc.gnu.org
 GCC build triplet: SunOS 5.8 sparc
  GCC host triplet: Fujitsu GP700F-600
GCC target triplet: Fujitsu GP700F-600

A store double instruction to write an argument on the stack uses a source


register with undefined content.




int f4(int x1, double x2, double x3,double x4 , double x5){


  return x1 + x2 + x3 + x4 + x5;}


int f5( int x1, double x2, double x3, double x4, double x5){


  printf("x5: %lf\n",x5);


  return x1 + x2 + x3 + x4 + x5;}


int sum(){ 


  int s;


  s = f4(1, 1., 1., 1., 1.) + f5(1, 1., 1., 1., 1.) ;


  printf("sum: %d\n",s);


  return s;}  


main(){ return sum()!=10; }




wrong output with -O2 -fnew-ra is:


x5: 0.000000


sum: 9


1




right output is:


x5: 1.000000


sum: 10


0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-10-06  3:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-20  9:18 [Bug optimization/11263] New: [SPARC] wrong code with -O2 -fnew-ra : undefined content of output register o3 was used heinrich dot brand at fujitsu-siemens dot com
2003-07-28 11:33 ` [Bug optimization/11263] " ehrhardt at mathematik dot uni-ulm dot de
2003-08-05  5:55 ` pinskia at physics dot uc dot edu
2003-10-06  3:43 ` jbuck at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).