I was working on packaging rr [1] and one of the tests [2] fails to build when optimizations are turned on. I've reduced it to the following and still been able to reproduce the issue:
static const float xmm0 = 10;
int main() {
__asm__ __volatile__(
#if __i386__
"movss xmm0, %xmm0\n\t"
#elif __x86_64__
"movss xmm0(%rip), %xmm0\n\t"
#else
#error unexpected architecture
#endif
);
return 0;
}
static const float xmm0 = 10;
int main() {
__asm__ __volatile__(
#if __i386__
"movss xmm0, %xmm0\n\t"
#elif __x86_64__
"movss xmm0(%rip), %xmm0\n\t"
#else
#error unexpected architecture
#endif
);
return 0;
}
Here's the output on F23 x86_64:
$ gcc fxregs.c -O0
$ gcc fxregs.c -O1
/tmp/cccdze3O.o: In function `main':
fxregs.c:(.text+0x4): undefined reference to `xmm0'
collect2: error: ld returned 1 exit status
$ gcc fxregs.c -O0
$ gcc fxregs.c -O1
/tmp/cccdze3O.o: In function `main':
fxregs.c:(.text+0x4): undefined reference to `xmm0'
collect2: error: ld returned 1 exit status
-- devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxxx http://lists.fedoraproject.org/admin/lists/devel@xxxxxxxxxxxxxxxxxxxxxxx