1/* { dg-do run } */ 2/* { dg-options "-fsanitize=undefined -fno-sanitize-recover=undefined" } */ 3 4struct S { int a; char b; long long c; short d[10]; }; 5struct T { char a; long long b; }; 6struct U { char a; int b; int c; long long d; struct S e; struct T f; }; 7struct V { long long a; struct S b; struct T c; struct U u; } v; 8 9__attribute__((noinline, noclone)) void 10f1 (int *p, int *q, char *r, long long *s) 11{ 12 *p = *q + *r + *s; 13} 14 15 16__attribute__((noinline, noclone)) int 17f2 (struct S *p) 18{ 19 return p->a; 20} 21 22__attribute__((noinline, noclone)) long long 23f3 (struct S *p, int i) 24{ 25 return p->c + p->d[1] + p->d[i]; 26} 27 28__attribute__((noinline, noclone)) long long 29f4 (long long *p) 30{ 31 return *p; 32} 33 34int 35main () 36{ 37 f1 (&v.u.b, &v.u.c, &v.u.a, &v.u.d); 38 if (f2 (&v.u.e) + f3 (&v.u.e, 4) + f4 (&v.u.f.b) != 0) 39 __builtin_abort (); 40 return 0; 41} 42