aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/init/constant1.C
blob: 386b926100664ac16c98318d1bcb9b3abd2128fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// PR c++/51554

typedef unsigned char uint8;
typedef unsigned int uint32;

const uint32 XX[] = { 1, 3, 7 };

const uint8 V[] = {
  *(((const uint8*)&XX[0]) + 0),
  *(((const uint8*)&XX[0]) + 1),
  *(((const uint8*)&XX[0]) + 2),
  *(((const uint8*)&XX[0]) + 3),
  *(((const uint8*)&XX[1]) + 0),
  *(((const uint8*)&XX[1]) + 1),
  *(((const uint8*)&XX[1]) + 2),
  *(((const uint8*)&XX[1]) + 3),
};