Debian Codegraph @

gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-82.c

raw
1 /* { dg-do run } */
2 /* { dg-options "-O -fdump-tree-fre1-details" } */
3
4 struct S { _Bool x; };
5
6 void
7 foo (struct S *s)
8 {
9 __builtin_memset (s, 1, sizeof (struct S));
10 s->x = 1;
11 }
12
13 int
14 main ()
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" } } */