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

#include <testfwk.h>

#ifdef __SDCC
#pragma std_c99
#endif

struct delay_block {
  struct delay_block *succ;
};

static struct delay_block Timer_Queue;

struct delay_block* time_enqueue (struct delay_block *d)
{
  struct delay_block *q = Timer_Queue.succ; 
  d->succ =  (void *)0;
  return Timer_Queue.succ;
}

void
testTortureExecute (void)
{
  Timer_Queue.succ = &Timer_Queue;
  if (time_enqueue (&Timer_Queue) != (void*)0)
    ASSERT (0);
  return;
}