Bug 27600 - <stdlib.h> doesn't work with -mno-sse -O
Summary: <stdlib.h> doesn't work with -mno-sse -O
Status: RESOLVED MOVED
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: 2.34
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-18 00:47 UTC by H.J. Lu
Modified: 2021-03-23 19:40 UTC (History)
1 user (show)

See Also:
Host:
Target: x86-64
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2021-03-18 00:47:15 UTC
[hjl@gnu-cfl-2 tmp]$ cat x.c
#include <stdlib.h>
[hjl@gnu-cfl-2 tmp]$ gcc -S -mno-sse x.c
[hjl@gnu-cfl-2 tmp]$ gcc -S -mno-sse x.c -O
In file included from /usr/include/stdlib.h:1014,
                 from x.c:1:
/usr/include/bits/stdlib-float.h: In function ‘atof’:
/usr/include/bits/stdlib-float.h:26:1: error: SSE register return with SSE disabled
   26 | {
      | ^
[hjl@gnu-cfl-2 tmp]$
Comment 1 Andreas Schwab 2021-03-18 09:20:25 UTC
Does -mno-sse actually make sense with x86-64 as SSE is a required part of the ABI?  I think this is a GCC bug.
Comment 2 H.J. Lu 2021-03-18 19:53:06 UTC
GCC bug:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99652
Comment 3 H.J. Lu 2021-03-23 19:40:50 UTC
Fixed for GCC 11.