blob: 5025463d7efa04080de5094e30d07c6f0af03ef8 [file] [log] [blame]
Jakub Jelinek6f538522006-02-13 22:28:03 +01001/* PR middle-end/26092 */
Jose E. Marchesia5362c62019-09-09 11:55:10 +02002/* { dg-require-effective-target indirect_calls } */
Rainer Orth4f4b0ab2017-06-17 15:32:28 +00003/* { dg-skip-if "can't take address of malloc" { nvptx-*-* } } */
Jose E. Marchesia5362c62019-09-09 11:55:10 +02004
Jakub Jelinek6f538522006-02-13 22:28:03 +01005typedef __SIZE_TYPE__ size_t;
6extern void *malloc (size_t);
7
8void *(*const foo) (size_t) = malloc;
9
10void *test (void)
11{
12 return (*foo) (3);
13}