1 /* { dg-do run } */ 2 /* { dg-options "-O -fdump-tree-fre1-details" } */ 3 4 struct S { _Bool x; }; 5 6 void foo(struct S * s)7foo (struct S *s) 8 { 9 __builtin_memset (s, 1, sizeof (struct S)); 10 s->x = 1; 11 } 12 13 int main()14main () 15 { 16 struct S s; 17 foo (&s); 18 char c; 19 __builtin_memcpy (&c, &s.x, 1); 20 if (c != 1) 21 __builtin_abort (); 22 return 0; 23 } 24 25 /* { dg-final { scan-tree-dump "Deleted redundant store" "fre1" } } */ 26