public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/22018] New: [4.1 Regression] VRP miscompiles multiply
@ 2005-06-11 16:11 pinskia at gcc dot gnu dot org
  2005-06-11 16:12 ` [Bug tree-optimization/22018] " pinskia at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-11 16:11 UTC (permalink / raw)
  To: gcc-bugs

The following should not abort at any optimization level but does at -O2:
void abort (void);
void g(int);
void f(int l)
{
  unsigned i;
  for (i = 0; i < l; i++)
    {
      int y = i;
      int z = y*-32;
      g(z);
    }
}

void g(int i)
{
  static int x = 0;
  if (i == 0)
    x ++;
  if (x > 1)
    abort ();
}

int main(void)
{
  f(3);
  return 0;
}


This is reduced from the message at:
<http://gcc.gnu.org/ml/gcc-patches/2005-06/msg00458.html>.

-- 
           Summary: [4.1 Regression] VRP miscompiles multiply
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: wrong-code, build
          Severity: critical
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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

end of thread, other threads:[~2005-06-16 21:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-11 16:11 [Bug tree-optimization/22018] New: [4.1 Regression] VRP miscompiles multiply pinskia at gcc dot gnu dot org
2005-06-11 16:12 ` [Bug tree-optimization/22018] " pinskia at gcc dot gnu dot org
2005-06-11 16:12 ` pinskia at gcc dot gnu dot org
2005-06-11 16:14 ` pinskia at gcc dot gnu dot org
2005-06-11 16:20 ` ebotcazou at gcc dot gnu dot org
2005-06-12  2:06 ` danglin at gcc dot gnu dot org
2005-06-14  5:18 ` ebotcazou at gcc dot gnu dot org
2005-06-15 11:33 ` cvs-commit at gcc dot gnu dot org
2005-06-15 11:34 ` dnovillo at gcc dot gnu dot org
2005-06-16 21:25 ` cvs-commit 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).