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-09-12 18:39 ` [Bug tree-optimization/17133] [4.0 Regression] wrong code with -ftree-lim rakdver at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ 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] 6+ messages in thread

end of thread, other threads:[~2005-01-10  3:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20040821205808.17133.belyshev@depni.sinp.msu.ru>
2005-01-09 22:05 ` [Bug tree-optimization/17133] [4.0 Regression] wrong code with -ftree-lim cvs-commit at gcc dot gnu dot org
2005-01-10  3:57 ` cvs-commit at gcc dot gnu dot org
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-09-12 18:39 ` [Bug tree-optimization/17133] [4.0 Regression] wrong code with -ftree-lim 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).