User account creation filtered due to spam.

Bug 55185 - Error generated on extern inline function which isn't called
Summary: Error generated on extern inline function which isn't called
Status: UNCONFIRMED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.8.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-03 01:48 UTC by H.J. Lu
Modified: 2013-07-12 22:26 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2012-11-03 01:48:17 UTC
On x86-64:

[hjl@gnu-tools-1 tmp]$ cat y.i
extern double strtod (const char *__restrict __nptr,
        char **__restrict __endptr);

extern __inline double
atof (const char *__nptr)
{
  return strtod (__nptr, (char **) ((void *)0));
}
[hjl@gnu-tools-1 tmp]$ gcc -S -O y.i
[hjl@gnu-tools-1 tmp]$ cat y.s
	.file	"y.i"
	.ident	"GCC: (GNU) 4.7.2 20120921 (Red Hat 4.7.2-2)"
	.section	.note.GNU-stack,"",@progbits
[hjl@gnu-tools-1 tmp]$ gcc -S -O y.i -mno-sse
y.i: In function ‘atof’:
y.i:6:1: error: SSE register return with SSE disabled
[hjl@gnu-tools-1 tmp]$
Comment 1 DaBler 2012-12-04 20:55:17 UTC
I have same problem here:

$  gcc -O3 -mno-sse -xc - <<END
> #include <stdlib.h>
> int main(){return 0;}
> END
In file included from <stdin>:1:0:
/usr/include/stdlib.h: In function ‘atof’:
/usr/include/stdlib.h:280:1: error: SSE register return with SSE disabled
Comment 2 Markus Trippelsdorf 2013-05-12 09:28:35 UTC
Ping.

I came across this issue while debugging a python problem.
Trying to compile python with "-mno-sse -mno-sse2 -mno-sse3 -mno-sse4a"
I get during configuration:
...
/usr/include/bits/stdlib-float.h: In function 'atof':
/usr/include/bits/stdlib-float.h:27:1: error: SSE register return with SSE disabled
Comment 3 Markus Trippelsdorf 2013-05-12 10:12:49 UTC
markus@x4 ~ % cat test.i
extern double foo();
void bar() { foo(); }
markus@x4 ~ % gcc -m32 -O2 -mno-sse -c test.i
markus@x4 ~ % gcc -O2 -mno-sse -c test.i
test.i: In function ‘bar’:
test.i:2:17: error: SSE register return with SSE disabled
 void bar() { foo(); }
                 ^
markus@x4 ~ % clang -O2 -mno-sse -c test.i
markus@x4 ~ %