summaryrefslogtreecommitdiff
path: root/support/regression/tests/bug-2252.c
blob: c6a299f2299a7d370490034ddb4348f037a54cbe (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/*
   bug-2252.c - the 0xff was seen as an 8-bit quantity, and thus the same as -1, resulting in the addition being replaced by a decrement.
 */

#include <testfwk.h>

int abc(int a)
{
  return a + 0xff;
}

void testBug(void)
{
  ASSERT(abc(0) == 0xff);
}