summaryrefslogtreecommitdiff
path: root/support/regression/tests/gcc-torture-execute-pr89826.c
blob: 91a912efea0a8d2d79342a02d2cb915cd67eadef (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
/*
   pr89826.c from the execute part of the gcc torture tests.
 */

#include <testfwk.h>

typedef unsigned int u32;
typedef unsigned long long u64;
u64 a;
u32 b;

u64
foo (u32 d)
{
  a -= d ? 0 : ~a;
  return a + b;
}

void
testTortureExecute (void)
{
  u64 x = foo (2);
  if (x != 0)
    ASSERT (0);
  return;
}