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

#include <testfwk.h>

#ifdef __SDCC
#pragma std_c99
#endif

/* PR middle-end/36013 */

void
foo (int **restrict p, int **restrict q)
{
  *p[0] = 1;
  *q[0] = 2;
  if (*p[0] != 2)
    ASSERT (0);
}

void
testTortureExecute (void)
{
#if !(defined (__GNUC__) && (__GNUC__ < 5))
  int a;
  int *p1 = &a, *p2 = &a;
  foo (&p1, &p2);
  return;
#endif
}