]>
Commit | Line | Data |
---|---|---|
b3d8d88e MS |
1 | /* PR tree-optimization/80934 - bzero should be assumed not to escape |
2 | pointer argument | |
3 | { dg-do compile } | |
4 | { dg-options "-O2 -fdump-tree-alias" } */ | |
5 | ||
6 | void foobar (void); | |
7 | ||
8 | void f (void); | |
9 | ||
10 | void g (void) | |
11 | { | |
12 | char d[32]; | |
13 | __builtin_memset (d, 0, sizeof d); | |
14 | f (); | |
15 | if (*d != 0) | |
16 | foobar (); | |
17 | } | |
18 | ||
19 | void h (void) | |
20 | { | |
21 | char d[32]; | |
22 | __builtin_bzero (d, sizeof d); | |
23 | f (); | |
24 | if (*d != 0) | |
25 | foobar (); | |
26 | } | |
27 | ||
28 | /* { dg-final { scan-tree-dump-not "memset|foobar|bzero" "alias" } } */ |