Open
Description
Bugzilla Link | 33033 |
Version | unspecified |
OS | Linux |
CC | @zmodem,@zygoloid |
Extended Description
If the linker places a zero-length function at the same address as another function, function pointer equality may be broken.
$ cat addr-taken.c
#include <stdio.h>
void f1() { __builtin_unreachable(); }
void f2() { __builtin_unreachable(); }
int main() {
printf("%p %p\n", &f1, &f2);
}
$ clang -Os addr-taken.c
$ ./a.out
0x400510 0x400510