aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/vect/pr28952.c
blob: 7305e607cfb882b33f99ddfa26f38dd6ba4b4218 (plain)
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
/* { dg-do compile } */

/* We were  ICE because we wanted to check the type of the
   elements of a conditional before we knew it was a conditional.  */

struct player_spaceship
{
  _Bool structure[32];
};
struct player
{
  struct player_spaceship spaceship;
};
struct packet_spaceship_info
{
  char structure[32 + 1];
};
send_spaceship_info (void)
{
  int j;
  struct player *pplayer;
  struct packet_spaceship_info info;
  struct player_spaceship *ship = &pplayer->spaceship;
  for (j = 0; j < 32; j++)
  {
    info.structure[j] = ship->structure[j] ? '1' : '0';
  }
  lsend_packet_spaceship_info (&info);
}

/* { dg-final { cleanup-tree-dump "vect" } } */