comparison gcc/testsuite/c-c++-common/asan/pr70712.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 /* PR sanitizer/70712 */
2 /* { dg-do run } */
3
4 struct __attribute__((aligned (64))) S
5 {
6 char s[4];
7 };
8
9 struct T
10 {
11 char t[8];
12 char u[480];
13
14 };
15
16 __attribute__((noinline, noclone)) void
17 foo (struct T *p, struct S *q)
18 {
19 __builtin_memset (p->t, '\0', sizeof (p->t));
20 __builtin_memset (p->u, '\0', sizeof (p->u));
21 __builtin_memset (q->s, '\0', sizeof (q->s));
22 }
23
24 int
25 main ()
26 {
27 struct S s;
28 struct T t;
29 foo (&t, &s);
30 asm volatile ("" : : "r" (&t), "r" (&s) : "memory");
31 return 0;
32 }