summaryrefslogtreecommitdiff
path: root/support/regression/tests/longor.c
blob: 4e30cc5ff463a7b98ac25cc287de02459246d439 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/** Test long OR.
    Was a bug where 1 was turned into 0x10000 on PPC.
 */
#include <testfwk.h>

void
testLongOR(void)
{
  volatile unsigned long l;

  l = 0;
  l |= 1L;
  ASSERT(l == 1);

  l = 0;
  l |= 1;
  ASSERT(l == 1);
}