public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/17860] New: Wrong generated code for loop with inlined function inside.
@ 2004-10-06 12:50 tal dot agmon at nsc dot com
  2004-10-06 12:55 ` [Bug rtl-optimization/17860] " pinskia at gcc dot gnu dot org
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: tal dot agmon at nsc dot com @ 2004-10-06 12:50 UTC (permalink / raw)
  To: gcc-bugs

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


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

end of thread, other threads:[~2005-08-09  8:23 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-06 12:50 [Bug c/17860] New: Wrong generated code for loop with inlined function inside tal dot agmon at nsc dot com
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 ` cvs-commit at gcc dot gnu dot org
2005-08-09  8:23 ` bonzini 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).