1 /* { dg-do compile } */ 2 /* { dg-options "-O -fno-tree-sra -fdump-tree-fre1" } */ 3 foo(void)4int foo(void) 5 { 6 int a[16] = {}; 7 return a[3]; 8 } 9 bar(void)10int bar(void) 11 { 12 int a[16]; 13 __builtin_memset (a, 0, sizeof(a)); 14 return a[3]; 15 } 16 17 struct X { int i; }; baz(void)18int baz(void) 19 { 20 struct X a,b; 21 a.i = 0; 22 b = a; 23 return b.i; 24 } 25 bazzoo(void)26int bazzoo (void) 27 { 28 struct X b, a = {}; 29 b = a; 30 return b.i; 31 } 32 33 /* { dg-final { scan-tree-dump-times "return 0;" 4 "fre1" } } */ 34