gcc/testsuite/gcc.dg/tree-ssa/pr83648-2.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -fno-delete-null-pointer-checks -fdump-tree-local-pure-const-details" } */ |
| 3 | |
| 4 | void *g(unsigned n) |
| 5 | { |
| 6 | return n ? __builtin_malloc (n) : 0; |
| 7 | } |
| 8 | |
| 9 | void *h() |
| 10 | { |
| 11 | return 0; |
| 12 | } |
| 13 | |
| 14 | /* { dg-final { scan-tree-dump-not "Function found to be malloc: g" "local-pure-const1" } } */ |
| 15 | /* { dg-final { scan-tree-dump-not "Function found to be malloc: h" "local-pure-const1" } } */ |