aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-elf/check-ptr-eq.c
blob: c1d5ef699452f43a4a808fdbb8dae5f864302899 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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 ();
}