| 1 |
/* { dg-do run } */ |
| 2 |
|
| 3 |
extern void abort (void); |
| 4 |
|
| 5 |
typedef struct { |
| 6 |
int msgLength; |
| 7 |
unsigned char data[1000]; |
| 8 |
} SMsg; |
| 9 |
|
| 10 |
typedef struct { |
| 11 |
int dummy; |
| 12 |
int d[0]; |
| 13 |
} SData; |
| 14 |
|
| 15 |
int condition = 3; |
| 16 |
|
| 17 |
int main() |
| 18 |
{ |
| 19 |
SMsg msg; |
| 20 |
SData *pData = (SData*)(msg.data); |
| 21 |
unsigned int i = 0; |
| 22 |
for (i = 0; i < 1; i++) |
| 23 |
{ |
| 24 |
pData->d[i] = 0; |
| 25 |
if(condition & 1) |
| 26 |
pData->d[i] |= 0x55; |
| 27 |
if(condition & 2) |
| 28 |
pData->d[i] |= 0xaa; |
| 29 |
} |
| 30 |
if (pData->d[0] != 0xff) |
| 31 |
abort (); |
| 32 |
return 0; |
| 33 |
} |