summaryrefslogtreecommitdiff
path: root/support/regression/tests/gcc-torture-execute-921202-2.c
blob: f56af093c3735debd8e3a0447876753552d0bb5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
   921202-2.c from the execute part of the gcc torture suite.
 */

#include <testfwk.h>

#ifdef __SDCC
#pragma std_c99
#endif

// Some ports do not support long long yet.
#if !defined(__SDCC_pic14) && !defined(__SDCC_pic16)
int
f(long long x)
{
  x >>= 8;
  return x & 0xff;
}
#endif

void
testTortureExecute (void)
{
// Some ports do not support long long yet.
#if !defined(__SDCC_pic14) && !defined(__SDCC_pic16)
  if (f(0x0123456789ABCDEFLL) != 0xCD)
    ASSERT(0);
  return;
#endif
}