public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/17133] New: [3.5 Regression] wrong code with -ftree-loop-optimize
@ 2004-08-21 20:58 belyshev at lubercy dot com
  2004-08-21 21:13 ` [Bug tree-optimization/17133] [3.5 Regression] wrong code with -ftree-lim pinskia at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: belyshev at lubercy dot com @ 2004-08-21 20:58 UTC (permalink / raw)
  To: gcc-bugs

use '-O1' to repeat:
------------------------------------------------------------------------------
extern void abort (void);

int foo = 0;
void *bar = 0;
unsigned int baz = 100;

void *pure_alloc ()
{
  void *res;
  
  while (1)
    {
      res = (void *) ((((unsigned int) (foo + bar))) & ~1);
      foo += 2;
      if (foo < baz)
	return res;
      foo = 0;
    }
}

int main ()
{
  pure_alloc ();
  if (!foo)
    abort ();
  return 0;
}
------------------------------------------------------------------------------

-- 
           Summary: [3.5 Regression] wrong code with -ftree-loop-optimize
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: belyshev at lubercy dot com
                CC: gcc-bugs at gcc dot gnu dot org


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


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

end of thread, other threads:[~2004-10-29  5:43 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-21 20:58 [Bug tree-optimization/17133] New: [3.5 Regression] wrong code with -ftree-loop-optimize belyshev at lubercy dot com
2004-08-21 21:13 ` [Bug tree-optimization/17133] [3.5 Regression] wrong code with -ftree-lim pinskia at gcc dot gnu dot org
2004-08-31 23:49 ` belyshev at lubercy dot com
2004-09-01 21:19 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
2004-09-05  9:02 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
2004-09-08 18:37 ` pinskia at gcc dot gnu dot org
2004-09-11 20:38 ` rakdver at gcc dot gnu dot org
2004-09-12 18:39 ` [Bug tree-optimization/17133] [4.0 " rakdver at gcc dot gnu dot org
2004-10-17 20:30 ` giovannibajo at libero dot it
2004-10-27 17:46 ` cvs-commit at gcc dot gnu dot org
2004-10-29  5:43 ` pinskia 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).