summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/pr32355.c
blob: e88cf5cf79c71dac8aa0b2fc0ec6bf0eb14ba43b (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
typedef struct
{
}
__sigset_t;
typedef struct
{
    char coredump;
}
EMode;
extern EMode Mode;
struct sigaction
{
  __sigset_t sa_mask;
  int sa_flags;
};
doSignalsSetup (void)
{
  static const int signals[] = {
    1, 2 , 3, 4, 6, 8, 11, 13, 14, 15, 10, 12, 17, 7
  };
  unsigned int i, sig;
  struct sigaction sa;
  for (i = 0; i < sizeof (signals) / sizeof (int); i++)
    {
      sig = signals[i];
      if (Mode.coredump && (sig == 4 || sig == 8))
        continue;
      sa.sa_flags = (sig == 17);
      sigemptyset (&sa.sa_mask);
    }
}