mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-15 04:31:49 +08:00
465197842a
* testsuite/ld-ifunc/pr18808b.c (bar): Fix compile time warning about non-void function returning without a result.
27 lines
299 B
C
27 lines
299 B
C
int foo (int) __attribute__ ((ifunc ("resolve_foo")));
|
|
extern void abort (void);
|
|
|
|
static int
|
|
foo_impl (int x)
|
|
{
|
|
return x;
|
|
}
|
|
|
|
void
|
|
bar (void)
|
|
{
|
|
int (*f)(int) = foo;
|
|
|
|
if (foo (5) != 5)
|
|
abort ();
|
|
|
|
if (f (42) != 42)
|
|
abort ();
|
|
}
|
|
|
|
void *
|
|
resolve_foo (void)
|
|
{
|
|
return (void *) foo_impl;
|
|
}
|