summaryrefslogtreecommitdiff
path: root/support/regression/tests/gcc-torture-execute-20000717-4.c
blob: 9f4f87dc9ec9430e60f4611006f9b631ead38e6f (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
36
37
38
39
/*
   20000717-4.c from the execute part of the gcc torture tests.
 */

#include <testfwk.h>

#ifdef __SDCC
#pragma std_c99
#endif

/* Extracted from gas.  Incorrectly generated non-pic code at -O0 for
   IA-64, which produces linker errors on some operating systems.  */

#ifndef __SDCC_pdk14 // Lack of memory
struct
{
  int offset;
  struct slot
  {
    int field[6];
  }
  slot[4];
} s;

int
x ()
{
  int toggle = 0;
  int r = s.slot[0].field[!toggle];
  return r;
}
#endif

void
testTortureExecute (void)
{
  return;
}