[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#97030: gcc: seems to generate incorrect code



Package: gcc
Version: 1:2.95.3-7
Severity: important

Maybe I've been working too hard, but this gcc seems to get this wrong
with -O2:

void gunc(unsigned a, unsigned b)
{
}

unsigned func(unsigned a, unsigned b)
{
  long long x = 0;

  gunc(a, b);
  return (x + 1) * a * b;
}

int main()
{
  unsigned a, b;

  a = 1;
  b = 1;
  return func(a, b);
}

-- System Information
Debian Release: testing/unstable
Kernel Version: Linux dueto.rano1.org 2.2.19 #4 SMP Mon Apr 16 12:55:15 BST 2001 i686 unknown

Versions of the packages gcc depends on:
ii  cpp            2.95.3-7       The GNU C preprocessor.
ii  cpp-2.95       2.95.4-0.01042 The GNU C preprocessor.
ii  gcc-2.95       2.95.4-0.01042 The GNU C compiler.



Reply to: