aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/arm/pr59923.c
blob: 86a4e7d8350b15fb344c7793be3328e51a04d2cc (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
/* PR target/59923 */
/* { dg-do compile } */
/* { dg-require-effective-target arm_thumb2_ok } */
/* { dg-options "-O2 -mcpu=cortex-a15 -fno-strict-aliasing -mthumb -g" } */

struct S
{
  void *s;
  struct T { unsigned short a; unsigned char b[4], c[4]; } *t;
} s;
void bar (void *);

void
foo (struct S *x, int *y)
{
  if (*y > 0)
    return;
  else if (x->t->b[0] == 0x43 && x->t->b[1] == 0x6d && x->t->c[0] == 1)
    x->s = &s;
  else
    *y = 16384;
  if (*y > 0)
    bar (x);
}