summaryrefslogtreecommitdiff
path: root/support/regression/tests/gcc-torture-execute-20020127-1.c
blob: 07835eb6aed8b8676f9efb8f00cccaae0422cdb7 (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
/*
   20020127-1.c from the execute part of the gcc torture suite.
 */

#include <testfwk.h>

#ifdef __SDCC
#pragma std_c99
#endif

/* This used to fail on h8300.  */

unsigned long
foo (unsigned long n)
{
  return (~n >> 3) & 1;
}

void
testTortureExecute (void)
{
  if (foo (1 << 3) != 0)
    ASSERT (0);;

  if (foo (0) != 1)
    ASSERT (0);;
}