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

#include <testfwk.h>

#ifdef __SDCC
#pragma std_c99
#endif

int g1, g2;

void foo (int x)
{
  int y;

  if (x)
    y = 793;
  else
    y = 793;
  g1 = 7930 / y;
  g2 = 7930 / x;
}

void
testTortureExecute (void)
{
  foo (793);
  if (g1 != 10 || g2 != 10)
    ASSERT (0);
  return;
}