summaryrefslogtreecommitdiff
path: root/support/regression/tests/gcc-torture-execute-bf-pack-1.c
blob: b2cf526a76212c959b18a676fb052d361d88d741 (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
30
31
32
33
34
/*
bf-pack-1.c from the execute part of the gcc torture tests.
*/

#include <testfwk.h>

#if 0 // Enable when SDCC supports bit-fields wider than 16 bits
struct foo
{
  unsigned half:16;
  unsigned long whole:32;
};

f (struct foo *q)
{
  if (q->half != 0x1234)
    ASSERT (0);
  if (q->whole != 0x56789abcL)
    ASSERT (0);
}
#endif

void
testTortureExecute (void)
{
#if 0
  struct foo bar;

  bar.half = 0x1234;
  bar.whole = 0x56789abcL;
  f (&bar);
  return;
#endif
}