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

#include <testfwk.h>

#ifdef __SDCC
#pragma std_c99
#pragma disable_warning 85
#endif

int a = 1, b;

int g () { return 0; }
void h (int x) {}

int f ()
{
  if (g () == -1)
    return 0;
  a = g ();
  if (b >= 1)
    h (a);
  return 0;
}

void
testTortureExecute (void)
{
  f ();
  if (a != 0)
    ASSERT (0);
  return;
}