~ahs3/+junk/cq-qemu

« back to all changes in this revision

Viewing changes to tests/cris/check_gcctorture_pr28634-1.c

  • Committer: Al Stone
  • Date: 2012-02-09 01:17:20 UTC
  • Revision ID: albert.stone@canonical.com-20120209011720-tztl7ik3qayz80p4
first commit to bzr for qemu

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* PR rtl-optimization/28634.  On targets with delayed branches,
 
2
   dbr_schedule could do the next iteration's addition in the
 
3
   branch delay slot, then subtract the value again if the branch
 
4
   wasn't taken.  This can lead to rounding errors.  */
 
5
int x = -1;
 
6
int y = 1;
 
7
int
 
8
main (void)
 
9
{
 
10
  while (y > 0)
 
11
    y += x;
 
12
  if (y != x + 1)
 
13
    abort ();
 
14
  exit (0);
 
15
}