Automatic date update in version.in
[binutils-gdb.git] / ld / testsuite / ld-elf / pr18718.c
blobbbf8e037c132ab0b02af7f4d1ba62e4785772e1a
1 #include <stdio.h>
2 #include <stdint.h>
4 extern void foo (void);
5 extern void check_ptr_eq (void (*) (void), void (*) (void));
7 void
8 new_foo (void)
12 __asm__(".symver new_foo, foo@@VERS_2.0");
13 #if defined __powerpc64__ && defined _CALL_AIXDESC && !defined _CALL_LINUX
14 __asm__(".symver .new_foo, .foo@@VERS_2.0");
15 #endif
17 #if defined(__GNUC__) && (__GNUC__ * 1000 + __GNUC_MINOR__) >= 4005
18 __attribute__ ((noinline, noclone))
19 #else
20 __attribute__ ((noinline))
21 #endif
22 int
23 bar (void)
25 return (intptr_t) &foo == 0x12345678 ? 1 : 0;
28 int
29 main(void)
31 bar ();
32 check_ptr_eq (&foo, &new_foo);
33 printf("PASS\n");
34 return 0;