public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/99652] New: inline doesn't with -mno-sse
@ 2021-03-18 18:41 hjl.tools at gmail dot com
2021-03-18 18:48 ` [Bug target/99652] " pinskia at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2021-03-18 18:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99652
Bug ID: 99652
Summary: inline doesn't with -mno-sse
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: hjl.tools at gmail dot com
CC: ubizjak at gmail dot com
Target Milestone: ---
[hjl@gnu-cfl-2 tmp]$ cat x.c
inline double
foo (void)
{
return 1.0;
}
[hjl@gnu-cfl-2 tmp]$ gcc -S x.c
[hjl@gnu-cfl-2 tmp]$ cat x.s
.file "x.c"
.text
.ident "GCC: (GNU) 10.2.1 20210130 (Red Hat 10.2.1-11)"
.section .note.GNU-stack,"",@progbits
[hjl@gnu-cfl-2 tmp]$ gcc -S x.c -mno-sse
x.c: In function ‘foo’:
x.c:3:1: error: SSE register return with SSE disabled
3 | {
| ^
[hjl@gnu-cfl-2 tmp]$
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/99652] inline doesn't with -mno-sse
2021-03-18 18:41 [Bug target/99652] New: inline doesn't with -mno-sse hjl.tools at gmail dot com
@ 2021-03-18 18:48 ` pinskia at gcc dot gnu.org
2021-03-18 19:03 ` hjl.tools at gmail dot com
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-03-18 18:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99652
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
Status|UNCONFIRMED |RESOLVED
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I don't see why this is a bug. GCC decides the return register early on and
that is a good thing.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/99652] inline doesn't with -mno-sse
2021-03-18 18:41 [Bug target/99652] New: inline doesn't with -mno-sse hjl.tools at gmail dot com
2021-03-18 18:48 ` [Bug target/99652] " pinskia at gcc dot gnu.org
@ 2021-03-18 19:03 ` hjl.tools at gmail dot com
2021-03-18 19:05 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2021-03-18 19:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99652
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2021-03-18
Status|RESOLVED |NEW
Resolution|INVALID |---
Ever confirmed|0 |1
--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Andrew Pinski from comment #1)
> I don't see why this is a bug. GCC decides the return register early on and
> that is a good thing.
On arm64, I got
[hjl@gnu-cfl-2 gcc]$ cat /tmp/x.c
inline double
foo (void)
{
return 1.0;
}
[hjl@gnu-cfl-2 gcc]$ ./xgcc -B./ -mgeneral-regs-only /tmp/x.c -S
[hjl@gnu-cfl-2 gcc]$
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/99652] inline doesn't with -mno-sse
2021-03-18 18:41 [Bug target/99652] New: inline doesn't with -mno-sse hjl.tools at gmail dot com
2021-03-18 18:48 ` [Bug target/99652] " pinskia at gcc dot gnu.org
2021-03-18 19:03 ` hjl.tools at gmail dot com
@ 2021-03-18 19:05 ` jakub at gcc dot gnu.org
2021-03-18 19:09 ` hjl.tools at gmail dot com
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-03-18 19:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99652
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Doesn't really matter. On x86_64 the ABI says that double is returned in a SSE
register, so people either can't return floating point types (and pass floating
point arguments to functions), or shouldn't disable SSE.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/99652] inline doesn't with -mno-sse
2021-03-18 18:41 [Bug target/99652] New: inline doesn't with -mno-sse hjl.tools at gmail dot com
` (2 preceding siblings ...)
2021-03-18 19:05 ` jakub at gcc dot gnu.org
@ 2021-03-18 19:09 ` hjl.tools at gmail dot com
2021-03-18 21:14 ` ubizjak at gmail dot com
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2021-03-18 19:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99652
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://sourceware.org/bugz
| |illa/show_bug.cgi?id=27600
--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> ---
We run into this with Intel UINTR on <stdlib.h>:
https://sourceware.org/bugzilla/show_bug.cgi?id=27600
We'd like to allow <stdlib.h> with -mgeneral-regs-only.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/99652] inline doesn't with -mno-sse
2021-03-18 18:41 [Bug target/99652] New: inline doesn't with -mno-sse hjl.tools at gmail dot com
` (3 preceding siblings ...)
2021-03-18 19:09 ` hjl.tools at gmail dot com
@ 2021-03-18 21:14 ` ubizjak at gmail dot com
2021-03-19 13:40 ` cvs-commit at gcc dot gnu.org
2021-03-19 13:44 ` hjl.tools at gmail dot com
6 siblings, 0 replies; 8+ messages in thread
From: ubizjak at gmail dot com @ 2021-03-18 21:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99652
--- Comment #5 from Uroš Bizjak <ubizjak at gmail dot com> ---
inline long double
foo (void)
{
return 1.0;
}
gcc -S -O2 -mno-80387 double.c
double.c: In function ‘foo’:
double.c:3:1: error: x87 register return with x87 disabled
3 | {
| ^
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/99652] inline doesn't with -mno-sse
2021-03-18 18:41 [Bug target/99652] New: inline doesn't with -mno-sse hjl.tools at gmail dot com
` (4 preceding siblings ...)
2021-03-18 21:14 ` ubizjak at gmail dot com
@ 2021-03-19 13:40 ` cvs-commit at gcc dot gnu.org
2021-03-19 13:44 ` hjl.tools at gmail dot com
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-03-19 13:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99652
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by H.J. Lu <hjl@gcc.gnu.org>:
https://gcc.gnu.org/g:5e2eabe1eed1e53d39923517122d3c7de2013ad4
commit r11-7735-g5e2eabe1eed1e53d39923517122d3c7de2013ad4
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Thu Mar 18 11:47:46 2021 -0700
x86: Issue error for return/argument only with function body
If we never generate function body, we shouldn't issue errors for return
nor argument. Add silent_p to i386 machine_function to avoid issuing
errors for return and argument without function body.
gcc/
PR target/99652
* config/i386/i386-options.c (ix86_init_machine_status): Set
silent_p to true.
* config/i386/i386.c (init_cumulative_args): Set silent_p to
false.
(construct_container): Return early for return and argument
errors if silent_p is true.
* config/i386/i386.h (machine_function): Add silent_p.
gcc/testsuite/
PR target/99652
* gcc.dg/torture/pr99652-1.c: New test.
* gcc.dg/torture/pr99652-2.c: Likewise.
* gcc.target/i386/pr57655.c: Adjusted.
* gcc.target/i386/pr59794-6.c: Likewise.
* gcc.target/i386/pr70738-1.c: Likewise.
* gcc.target/i386/pr96744-1.c: Likewise.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/99652] inline doesn't with -mno-sse
2021-03-18 18:41 [Bug target/99652] New: inline doesn't with -mno-sse hjl.tools at gmail dot com
` (5 preceding siblings ...)
2021-03-19 13:40 ` cvs-commit at gcc dot gnu.org
@ 2021-03-19 13:44 ` hjl.tools at gmail dot com
6 siblings, 0 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2021-03-19 13:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99652
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |11.0
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #7 from H.J. Lu <hjl.tools at gmail dot com> ---
Fixed for GCC 11.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-03-19 13:44 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-18 18:41 [Bug target/99652] New: inline doesn't with -mno-sse hjl.tools at gmail dot com
2021-03-18 18:48 ` [Bug target/99652] " pinskia at gcc dot gnu.org
2021-03-18 19:03 ` hjl.tools at gmail dot com
2021-03-18 19:05 ` jakub at gcc dot gnu.org
2021-03-18 19:09 ` hjl.tools at gmail dot com
2021-03-18 21:14 ` ubizjak at gmail dot com
2021-03-19 13:40 ` cvs-commit at gcc dot gnu.org
2021-03-19 13:44 ` hjl.tools at gmail dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).