mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-21 04:42:53 +08:00
37d7d56cae
ld/testsuite/ld-elf/check-ptr-eq.c fails for hppa, since function pointers may point at plabels. It isn't valid to cast two function pointers to void* and then compare the void pointers. * testsuite/ld-elf/check-ptr-eq.c (check_ptr_eq): Change params from void pointers to function pointers. * testsuite/ld-elf/pr18718.c: Update to suit. * testsuite/ld-elf/pr18720a.c: Update to suit.
13 lines
321 B
C
13 lines
321 B
C
extern void abort (void);
|
|
|
|
/* Since GCC 5 folds symbol address comparison, assuming each symbol has
|
|
different address, &foo == &bar is always false for GCC 5. Use
|
|
check_ptr_eq to check if two functions are the same. */
|
|
|
|
void
|
|
check_ptr_eq (void (*f1) (void), void (*f2) (void))
|
|
{
|
|
if (f1 != f2)
|
|
abort ();
|
|
}
|