public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "tal dot agmon at nsc dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/17860] New: Wrong generated code for loop with inlined function inside. Date: Wed, 06 Oct 2004 12:50:00 -0000 [thread overview] Message-ID: <20041006125056.17860.tal.agmon@nsc.com> (raw) Compile the following code with: gcc -O3. The output should be foo is: 0, i is: 1 Yet the output is: foo is: 0, i is: 0 This is the source code: #include <stdio.h> int foo=100; int f () { foo = 0; } void main () { int i; for (i = 0; i < foo; i++) { f (); } printf("foo is: %d, i is: %d\n",foo,i); } -- Summary: Wrong generated code for loop with inlined function inside. Product: gcc Version: 3.4.2 Status: UNCONFIRMED Severity: critical Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tal dot agmon at nsc dot com CC: gcc-bugs at gcc dot gnu dot org,paul dot woegerer at nsc dot com GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17860
next reply other threads:[~2004-10-06 12:50 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-10-06 12:50 tal dot agmon at nsc dot com [this message] 2004-10-06 12:55 ` [Bug rtl-optimization/17860] " pinskia at gcc dot gnu dot org 2004-10-06 13:07 ` pinskia at gcc dot gnu dot org 2004-10-06 13:15 ` rguenth at tat dot physik dot uni-tuebingen dot de 2004-10-06 17:04 ` [Bug rtl-optimization/17860] Wrong generated code for loop with varying bound bonzini at gcc dot gnu dot org 2004-10-06 17:05 ` bonzini at gcc dot gnu dot org 2004-10-06 17:09 ` pinskia at gcc dot gnu dot org 2004-10-06 17:18 ` reichelt at gcc dot gnu dot org 2004-10-06 17:26 ` reichelt at gcc dot gnu dot org 2004-10-06 17:37 ` pinskia at gcc dot gnu dot org 2004-10-06 17:40 ` pinskia at gcc dot gnu dot org 2004-10-07 10:06 ` bonzini at gcc dot gnu dot org 2004-10-07 10:18 ` rguenth at tat dot physik dot uni-tuebingen dot de 2004-11-21 1:39 ` [Bug rtl-optimization/17860] [3.4 only] " pinskia at gcc dot gnu dot org 2005-02-10 18:39 ` bonzini at gcc dot gnu dot org 2005-05-19 17:46 ` mmitchel at gcc dot gnu dot org 2005-08-09 8:23 ` bonzini at gcc dot gnu dot org 2005-08-09 8:23 ` cvs-commit 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=20041006125056.17860.tal.agmon@nsc.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).