PR middle-end/85602 - -Wsizeof-pointer-memaccess for strncat with size of source
[official-gcc.git] / gcc / testsuite / gcc.dg / uninit-pr65686.c
blob1962ab76b938b393475071ab017b21e2cb497f2f
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -Wall -fdump-tree-optimized" } */
4 typedef unsigned mytype;
6 struct S {
7 mytype *pu;
8 };
10 mytype f(struct S *e)
12 mytype x; /* { dg-bogus { "uninitialized" } } */
13 if(&x != e->pu)
14 __builtin_memcpy(&x, e->pu, sizeof(unsigned));
15 return x;
18 /* { dg-final { scan-tree-dump-not "if" "optimized" } } */