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 c/41497] apparent integer wrong code bug



------- Comment #1 from jakub at gcc dot gnu dot org  2009-09-29 07:23 -------
Fails on x86_64-linux too, the bug first appears in sccp.
extern void abort (void);

static unsigned short
bar (unsigned short x, unsigned short y)
{
  return x + y;
}

unsigned int a;
unsigned char b, c;

void
foo (void)
{
  for (b = 0; b <= 0; b = 1)
    for (a = -13; a == 0; a = bar (a, 0))
      c = 1;
}

int
main ()
{
  foo ();
  if (a != -13)
    abort ();
  return 0;
}


-- 


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


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