Skip to content

Commit

Permalink
[SingleSource][Regressions][C] Fix loop-15.c so it does not trigger U…
Browse files Browse the repository at this point in the history
…B. (#189)
  • Loading branch information
ManuelJBrito authored Dec 11, 2024
1 parent 90be4b7 commit 4f14adb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions SingleSource/Regression/C/gcc-c-torture/execute/loop-15.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
void
foo (unsigned long *start, unsigned long *end)
{
unsigned long *temp = end - 1;

while (end > start)
*end-- = *temp--;
while (end > start)
{
*end = *(end - 1);
--end;
}
}

int
Expand Down

0 comments on commit 4f14adb

Please sign in to comment.