aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/asan/red-align-2.c
blob: e0f00c57d58afcbd52ac41603378b5843d0d8b22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* This tests aligment propagation to structure elem and
   abcense of redundant & 7.  */

/* { dg-options "-fdump-tree-sanopt" } */
/* { dg-do compile } */
/* { dg-skip-if "" { *-*-* } { "-flto" } { "" } } */

struct st {
  int a;
  int b;
  int c;
} __attribute__((aligned(16)));

int foo (struct st * s_p)
{
  return s_p->b;
}

/* { dg-final { scan-tree-dump-times "& 7" 1 "sanopt" } } */