Bart Van Assche ae15c01f72 none/tests/ifunc.c: Fix a compiler warning
Fix the following compiler warning:

ifunc.c:9:15: warning: 'ifunc' resolver for 'test' should return 'void (*)(int)' [-Wattribute-alias=]
    9 | static void (*resolve_test(void))(void)
      |               ^~~~~~~~~~~~
2021-02-27 20:40:50 -08:00

22 lines
317 B
C

/* This test made valgrind run in an infinite loop. See bugzilla #301204 */
#include <stdio.h>
static void mytest(int d)
{
printf("%d\n", d);
}
static void (*resolve_test(void))(int)
{
return mytest;
}
void test(int d)
__attribute__((ifunc("resolve_test")));
int main()
{
test(5);
return 0;
}