summaryrefslogtreecommitdiff
path: root/support/regression/tests/gcc-torture-execute-pr67714.c
blob: a8b0c14160d4a63fa331f0ff1553f289ab9ca2a2 (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
28
29
30
31
32
33
34
35
36
37
/*
   pr67714.c from the execute part of the gcc torture tests.
 */

#include <testfwk.h>

#ifdef __SDCC
#pragma std_c99
#pragma disable_warning 84
#endif

unsigned int b;
int c;

signed char
fn1 ()
{
  signed char d;
  for (int i = 0; i < 1; i++)
    d = -15;
  return d;
}

void
testTortureExecute (void)
{
  for (c = 0; c < 1; c++)
    b = 0;
#if 0 // Enable when SDCC intermingles
  char e = fn1 ();
  signed char f = e ^ b;
  volatile int g = (int) f;

  ASSERT (g == -15);
#endif
  return;
}