aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20110906-1.c
blob: 50ea9e241b4ea0d95fedf019258faaf3cec25cd1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* PR middle-end/50266 */
/* Testcase by <bero@arklinux.org> */

struct a {
 unsigned int a;
 unsigned int b;
};

struct a *const p = (struct a *)0x4A004100;

void foo(void)
{
 unsigned int i = 0;
 unsigned int *const x[] = {
  &p->a,
  &p->b,
  0
 };

 (*(volatile unsigned int *)((x[i]))
   = (unsigned int)((unsigned int)((*(volatile unsigned int *)(x[i])))));
}