1 /* PR middle-end/46647 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fdump-tree-optimized" } */
4 
5 int a;
6 
7 int
func1(void)8 func1 (void)
9 {
10   __builtin_memset (&a, -1, sizeof (a));
11   return 0;
12 }
13 
14 int
func2(void)15 func2 (void)
16 {
17   __builtin_memset (&a, 123, sizeof (a));
18   return 0;
19 }
20 
21 int
func3(void)22 func3 (void)
23 {
24   __builtin_memset (&a, 0, sizeof (a));
25   return 0;
26 }
27 
28 /* The xfail for cris-* and crisv32-* is due to PR53535.  */
29 /* { dg-final { scan-tree-dump-not "memset" "optimized" { xfail cris-*-* crisv32-*-* } } } */
30 /* { dg-final { cleanup-tree-dump "optimized" } } */
31