Jakub Jelinek | 6f53852 | 2006-02-13 22:28:03 +0100 | [diff] [blame] | 1 | /* PR middle-end/26092 */ |
Jose E. Marchesi | a5362c6 | 2019-09-09 11:55:10 +0200 | [diff] [blame] | 2 | /* { dg-require-effective-target indirect_calls } */ |
Rainer Orth | 4f4b0ab | 2017-06-17 15:32:28 +0000 | [diff] [blame] | 3 | /* { dg-skip-if "can't take address of malloc" { nvptx-*-* } } */ |
Jose E. Marchesi | a5362c6 | 2019-09-09 11:55:10 +0200 | [diff] [blame] | 4 | |
Jakub Jelinek | 6f53852 | 2006-02-13 22:28:03 +0100 | [diff] [blame] | 5 | typedef __SIZE_TYPE__ size_t; |
| 6 | extern void *malloc (size_t); |
| 7 | |
| 8 | void *(*const foo) (size_t) = malloc; |
| 9 | |
| 10 | void *test (void) |
| 11 | { |
| 12 | return (*foo) (3); |
| 13 | } |