gcc/testsuite/c-c++-common/torture/strub-data2.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-fstrub=strict -fdump-ipa-strub" } */ |
| 3 | /* { dg-require-effective-target strub } */ |
| 4 | |
| 5 | /* The pointer itself is a strub variable, enabling internal strubbing when |
| 6 | its value is used. */ |
| 7 | int __attribute__ ((__strub__)) *ptr; |
| 8 | |
| 9 | int *f() { |
| 10 | return ptr; |
| 11 | } |
| 12 | |
| 13 | /* { dg-final { scan-ipa-dump "strub_enter" "strub" } } */ |
| 14 | /* { dg-final { scan-ipa-dump "strub_leave" "strub" } } */ |
| 15 | /* { dg-final { scan-ipa-dump "strub_update" "strub" } } */ |