gcc/testsuite/g++.dg/tree-ssa/nonzero-2.C
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 -fdump-tree-ccp1 -fdelete-null-pointer-checks" } */ |
| 3 | struct t |
| 4 | { |
| 5 | static inline void tt() |
| 6 | { |
| 7 | } |
| 8 | virtual void q(); |
| 9 | }; |
| 10 | int m() |
| 11 | { |
| 12 | void *q = (void *)&t::tt; |
| 13 | return q != 0; |
| 14 | } |
| 15 | /* { dg-final { scan-tree-dump "return 1" "ccp1"} } */ |