public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "heinrich dot brand at fujitsu-siemens dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug optimization/11263] New: [SPARC] wrong code with -O2 -fnew-ra : undefined content of output register o3 was used Date: Fri, 20 Jun 2003 09:18:00 -0000 [thread overview] Message-ID: <20030620090954.11263.heinrich.brand@fujitsu-siemens.com> (raw) 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
next reply other threads:[~2003-06-20 9:18 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-06-20 9:18 heinrich dot brand at fujitsu-siemens dot com [this message] 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
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20030620090954.11263.heinrich.brand@fujitsu-siemens.com \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).