Fixed OptCmp1 with certain code patterns with labels.
This commit is contained in:
23
test/val/bug1690.c
Normal file
23
test/val/bug1690.c
Normal file
@@ -0,0 +1,23 @@
|
||||
/* OptCmp1 messed up with labels */
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
register unsigned int x = 0x200;
|
||||
register unsigned int y = 0;
|
||||
|
||||
do
|
||||
{
|
||||
++y;
|
||||
}
|
||||
while (--x);
|
||||
|
||||
if (y != 0x200)
|
||||
{
|
||||
printf("0x%X\n", y);
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user