summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/pr22098-2.c
blob: 249647dc5705d4841b83fab9ff0e9e6de24048ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
extern void abort (void);
extern void exit (int);
typedef __SIZE_TYPE__ size_t;
int
main (void)
{
  int a = 0;
  int *p;
  size_t b;
  b = (size_t)(p = &(int []){0, 1, 2}[1]);
  if (*p != 1 || *(int *)b != 1)
    abort ();
  exit (0);
}