OSDN Git Service

For Greta Yorsh.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / pr46647.c
1 /* PR middle-end/46647 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fdump-tree-optimized" } */
4
5 int a;
6
7 int
8 func1 (void)
9 {
10   __builtin_memset (&a, -1, sizeof (a));
11   return 0;
12 }
13
14 int
15 func2 (void)
16 {
17   __builtin_memset (&a, 123, sizeof (a));
18   return 0;
19 }
20
21 int
22 func3 (void)
23 {
24   __builtin_memset (&a, 0, sizeof (a));
25   return 0;
26 }
27
28 /* { dg-final { scan-tree-dump-not "memset" "optimized" } } */
29 /* { dg-final { cleanup-tree-dump "optimized" } } */