summaryrefslogtreecommitdiff
path: root/support/regression/tests/gcc-torture-execute-20060110-1.c
blob: fdd40d2d436a98b4aed2286a92c98c92f7a8da74 (plain) (blame)
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
/*
   20060110-1.c from the execute part of the gcc torture suite.
 */

#include <testfwk.h>

#ifdef __SDCC
#pragma std_c99
#endif

#if !defined(__SDCC_pic14) && !defined(__SDCC_pic16)
long long 
f (long long a) 
{ 
  return (a << 32) >> 32; 
} 
long long a = 0x1234567876543210LL;
long long b = (0x1234567876543210LL << 32) >> 32;
#endif

void
testTortureExecute (void)
{
#if !defined (__SDCC_mcs51)
  if (f (a) != b)
    ASSERT (0);
  return;
#endif
}