summaryrefslogtreecommitdiff
path: root/support/regression/tests/gcc-torture-execute-20020225-2.c
blob: 0edb56d116df2377c7fe2b81607ed2efdd4c3b28 (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
/*
   20020225-2.c from the execute part of the gcc torture suite.
 */

#include <testfwk.h>

#ifdef __SDCC
#pragma disable_warning 93
#endif

#ifdef __SDCC
#pragma std_c99
#endif

static int 
ftest(int x)
{
  union 
    {
      int i;
      double d;
  } a;
  a.d = 0;
  a.i = 1;
  return x >> a.i;
}

void testTortureExecute (void)
{
  if (ftest (5) != 2)
    ASSERT (0);
  return;
}