gcc/testsuite/gdc.dg/attr_restrict1.d
raw| 1 | // { dg-do compile } |
| 2 | // { dg-options "-fdump-tree-optimized" } |
| 3 | |
| 4 | import gcc.attributes; |
| 5 | |
| 6 | int func(@restrict int ignored) // { dg-warning ".restrict. attribute ignored" } |
| 7 | { |
| 8 | return 0; |
| 9 | } |
| 10 | |
| 11 | int func(@restrict int *parm) |
| 12 | { |
| 13 | return 0; |
| 14 | } |
| 15 | |
| 16 | @restrict int var = 0; // { dg-warning ".restrict. attribute ignored" } |
| 17 | |
| 18 | // { dg-final { scan-tree-dump "restrict parm" "optimized" } } |