2022-03-01 02:40:01 +00:00
|
|
|
/* OptCmp1 messed up with labels */
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
2022-03-01 17:56:34 +00:00
|
|
|
static int failures = 0;
|
|
|
|
static unsigned int z = 0xFF23;
|
|
|
|
|
2022-03-01 02:40:01 +00:00
|
|
|
int main(void)
|
|
|
|
{
|
|
|
|
register unsigned int x = 0x200;
|
|
|
|
register unsigned int y = 0;
|
|
|
|
|
2022-03-01 17:56:34 +00:00
|
|
|
do {
|
2022-03-01 02:40:01 +00:00
|
|
|
++y;
|
2022-03-01 17:56:34 +00:00
|
|
|
} while (--x);
|
|
|
|
if (y != 0x200) {
|
|
|
|
printf("y should be 0x200, not 0x%X.\n", y);
|
|
|
|
++failures;;
|
2022-03-01 02:40:01 +00:00
|
|
|
}
|
|
|
|
|
2022-03-01 17:56:34 +00:00
|
|
|
if ((z -= 0x23)) {
|
|
|
|
/* Passed -- non-zero z looks like non-zero. */
|
|
|
|
} else {
|
|
|
|
/* Failed -- only the low byte of z was tested. */
|
|
|
|
printf("Test thinks non-zero z is zero.\n");
|
|
|
|
++failures;
|
|
|
|
}
|
2022-03-01 02:40:01 +00:00
|
|
|
|
2022-03-01 17:56:34 +00:00
|
|
|
return failures;
|
2022-03-01 02:40:01 +00:00
|
|
|
}
|