gcc/testsuite/gcc.dg/gomp/dispatch-3.c
raw| 1 | /* { dg-do compile } */ |
| 2 | |
| 3 | /* Check that the assignment from pointer to integer does not trigger an ICE but |
| 4 | is rejected as invalid code. */ |
| 5 | |
| 6 | long long *f(); |
| 7 | int *variant_fn(); |
| 8 | |
| 9 | #pragma omp declare variant(variant_fn) match(construct={dispatch}) |
| 10 | int *bar(); |
| 11 | |
| 12 | void sub() |
| 13 | { |
| 14 | #pragma omp dispatch |
| 15 | *f() = bar(); /* { dg-error "assignment to 'long long int' from 'int \\*' makes integer from pointer without a cast" } */ |
| 16 | } |