public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/111340] New: gcc.dg/bitint-12.c fails on x86_64-apple-darwin
@ 2023-09-08 15:14 fxcoudert at gcc dot gnu.org
2023-09-08 15:23 ` [Bug target/111340] " pinskia at gcc dot gnu.org
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2023-09-08 15:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111340
Bug ID: 111340
Summary: gcc.dg/bitint-12.c fails on x86_64-apple-darwin
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: fxcoudert at gcc dot gnu.org
Target Milestone: ---
gcc.dg/bitint-12.c fails on x86_64-apple-darwin, with excess error:
/Users/fx/gcc-upstream/gcc/testsuite/gcc.dg/bitint-12.c:18:3: error: invalid
'asm': invalid expression as operand
I am not sure what the cause is, I don't know x86_64 assembler :(
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/111340] gcc.dg/bitint-12.c fails on x86_64-apple-darwin
2023-09-08 15:14 [Bug c/111340] New: gcc.dg/bitint-12.c fails on x86_64-apple-darwin fxcoudert at gcc dot gnu.org
@ 2023-09-08 15:23 ` pinskia at gcc dot gnu.org
2023-09-08 15:24 ` fxcoudert at gcc dot gnu.org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-09-08 15:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111340
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Target|x86_64-apple-darwin |x86_64-*-*
Status|UNCONFIRMED |NEW
Build|x86_64-apple-darwin |
Last reconfirmed| |2023-09-08
Host|x86_64-apple-darwin |
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The testcase also fails on x86_64-linux-gnu with -fPIE too with the same error
message.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/111340] gcc.dg/bitint-12.c fails on x86_64-apple-darwin
2023-09-08 15:14 [Bug c/111340] New: gcc.dg/bitint-12.c fails on x86_64-apple-darwin fxcoudert at gcc dot gnu.org
2023-09-08 15:23 ` [Bug target/111340] " pinskia at gcc dot gnu.org
@ 2023-09-08 15:24 ` fxcoudert at gcc dot gnu.org
2023-09-08 15:47 ` [Bug target/111340] gcc.dg/bitint-12.c fails on x86_64-apple-darwin or fails on x86_64-linux-gnu with -fPIE jakub at gcc dot gnu.org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2023-09-08 15:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111340
--- Comment #2 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
Created attachment 55857
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55857&action=edit
Output of -fdump-rtl-final
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/111340] gcc.dg/bitint-12.c fails on x86_64-apple-darwin or fails on x86_64-linux-gnu with -fPIE
2023-09-08 15:14 [Bug c/111340] New: gcc.dg/bitint-12.c fails on x86_64-apple-darwin fxcoudert at gcc dot gnu.org
2023-09-08 15:23 ` [Bug target/111340] " pinskia at gcc dot gnu.org
2023-09-08 15:24 ` fxcoudert at gcc dot gnu.org
@ 2023-09-08 15:47 ` jakub at gcc dot gnu.org
2023-09-08 16:02 ` jakub at gcc dot gnu.org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-09-08 15:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111340
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Seems to be a pre-existing problem.
void
bar (void)
{
__asm ("# %0" : : "g" ((((unsigned __int128) 0x123456789abcdef0ULL) << 64) |
0x0fedcba987654321ULL));
}
fails the same way.
void
baz (void)
{
__asm ("# %0" : : "g" (0x0fedcba987654321ULL));
}
works with both -fpic and -fno-pic.
If it is solely about the testsuite FAIL, I can certainly add -fno-pic to
dg-options
in there.
But this is instead whether 128-bit integer constants work with "g" in
-fpic/-fpie modes (on 64-bit arches), 65..128 bit _BitInt on 32-bit arches
would expand like the 575 bit one into memory rather than CONST_WIDE_INT.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/111340] gcc.dg/bitint-12.c fails on x86_64-apple-darwin or fails on x86_64-linux-gnu with -fPIE
2023-09-08 15:14 [Bug c/111340] New: gcc.dg/bitint-12.c fails on x86_64-apple-darwin fxcoudert at gcc dot gnu.org
` (2 preceding siblings ...)
2023-09-08 15:47 ` [Bug target/111340] gcc.dg/bitint-12.c fails on x86_64-apple-darwin or fails on x86_64-linux-gnu with -fPIE jakub at gcc dot gnu.org
@ 2023-09-08 16:02 ` jakub at gcc dot gnu.org
2023-09-11 6:55 ` ubizjak at gmail dot com
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-09-08 16:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111340
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |uros at gcc dot gnu.org
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Of course, what exactly falls under the "g" constraint is target specific.
Though, because that constraint also allows the constant to be reload into a
register,
if such constant isn't valid, then RA should have reloaded it into register or
memory.
Seems the failure is that i386.cc (output_pic_addr_const) doesn't have the
CONST_WIDE_INT case unlike output_addr_const.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/111340] gcc.dg/bitint-12.c fails on x86_64-apple-darwin or fails on x86_64-linux-gnu with -fPIE
2023-09-08 15:14 [Bug c/111340] New: gcc.dg/bitint-12.c fails on x86_64-apple-darwin fxcoudert at gcc dot gnu.org
` (3 preceding siblings ...)
2023-09-08 16:02 ` jakub at gcc dot gnu.org
@ 2023-09-11 6:55 ` ubizjak at gmail dot com
2023-09-11 6:58 ` jakub at gcc dot gnu.org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: ubizjak at gmail dot com @ 2023-09-11 6:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111340
Uroš Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |ubizjak at gmail dot com
CC|uros at gcc dot gnu.org |
--- Comment #5 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Jakub Jelinek from comment #4)
> Of course, what exactly falls under the "g" constraint is target specific.
> Though, because that constraint also allows the constant to be reload into a
> register,
> if such constant isn't valid, then RA should have reloaded it into register
> or memory.
>
> Seems the failure is that i386.cc (output_pic_addr_const) doesn't have the
> CONST_WIDE_INT case unlike output_addr_const.
Indeed. Patch in testing:
--cut here--
diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc
index 1cef7ee8f1a..477e6cecc38 100644
--- a/gcc/config/i386/i386.cc
+++ b/gcc/config/i386/i386.cc
@@ -12344,8 +12344,8 @@ output_pic_addr_const (FILE *file, rtx x, int code)
assemble_name (asm_out_file, buf);
break;
- case CONST_INT:
- fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x));
+ CASE_CONST_SCALAR_INT:
+ output_addr_const (file, x);
break;
case CONST:
--cut here--
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/111340] gcc.dg/bitint-12.c fails on x86_64-apple-darwin or fails on x86_64-linux-gnu with -fPIE
2023-09-08 15:14 [Bug c/111340] New: gcc.dg/bitint-12.c fails on x86_64-apple-darwin fxcoudert at gcc dot gnu.org
` (4 preceding siblings ...)
2023-09-11 6:55 ` ubizjak at gmail dot com
@ 2023-09-11 6:58 ` jakub at gcc dot gnu.org
2023-09-11 18:57 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-09-11 6:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111340
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Thanks.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/111340] gcc.dg/bitint-12.c fails on x86_64-apple-darwin or fails on x86_64-linux-gnu with -fPIE
2023-09-08 15:14 [Bug c/111340] New: gcc.dg/bitint-12.c fails on x86_64-apple-darwin fxcoudert at gcc dot gnu.org
` (5 preceding siblings ...)
2023-09-11 6:58 ` jakub at gcc dot gnu.org
@ 2023-09-11 18:57 ` cvs-commit at gcc dot gnu.org
2023-09-11 21:47 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-09-11 18:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111340
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Uros Bizjak <uros@gcc.gnu.org>:
https://gcc.gnu.org/g:048927ed8561ca994ad853fe85ccf8c2ca07a8fe
commit r14-3854-g048927ed8561ca994ad853fe85ccf8c2ca07a8fe
Author: Uros Bizjak <ubizjak@gmail.com>
Date: Mon Sep 11 20:56:42 2023 +0200
i386: Handle CONST_WIDE_INT in output_pic_addr_const [PR111340]
PR target/111340
gcc/ChangeLog:
* config/i386/i386.cc (output_pic_addr_const): Handle
CONST_WIDE_INT.
Call output_addr_const for CASE_CONST_SCALAR_INT.
gcc/testsuite/ChangeLog:
* gcc.target/i386/pr111340.c: New test.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/111340] gcc.dg/bitint-12.c fails on x86_64-apple-darwin or fails on x86_64-linux-gnu with -fPIE
2023-09-08 15:14 [Bug c/111340] New: gcc.dg/bitint-12.c fails on x86_64-apple-darwin fxcoudert at gcc dot gnu.org
` (6 preceding siblings ...)
2023-09-11 18:57 ` cvs-commit at gcc dot gnu.org
@ 2023-09-11 21:47 ` cvs-commit at gcc dot gnu.org
2023-09-12 16:03 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-09-11 21:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111340
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Uros Bizjak <uros@gcc.gnu.org>:
https://gcc.gnu.org/g:65331a30922887304c183be4686ddaf12e990c6b
commit r13-7791-g65331a30922887304c183be4686ddaf12e990c6b
Author: Uros Bizjak <ubizjak@gmail.com>
Date: Mon Sep 11 20:56:42 2023 +0200
i386: Handle CONST_WIDE_INT in output_pic_addr_const [PR111340]
PR target/111340
gcc/ChangeLog:
* config/i386/i386.cc (output_pic_addr_const): Handle
CONST_WIDE_INT.
Call output_addr_const for CASE_CONST_SCALAR_INT.
gcc/testsuite/ChangeLog:
* gcc.target/i386/pr111340.c: New test.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/111340] gcc.dg/bitint-12.c fails on x86_64-apple-darwin or fails on x86_64-linux-gnu with -fPIE
2023-09-08 15:14 [Bug c/111340] New: gcc.dg/bitint-12.c fails on x86_64-apple-darwin fxcoudert at gcc dot gnu.org
` (7 preceding siblings ...)
2023-09-11 21:47 ` cvs-commit at gcc dot gnu.org
@ 2023-09-12 16:03 ` cvs-commit at gcc dot gnu.org
2023-09-12 21:11 ` cvs-commit at gcc dot gnu.org
2023-09-12 21:12 ` ubizjak at gmail dot com
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-09-12 16:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111340
--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Uros Bizjak <uros@gcc.gnu.org>:
https://gcc.gnu.org/g:724e9b12ce2b06cceeb59255a5eb0f31b0a7af65
commit r12-9874-g724e9b12ce2b06cceeb59255a5eb0f31b0a7af65
Author: Uros Bizjak <ubizjak@gmail.com>
Date: Mon Sep 11 20:56:42 2023 +0200
i386: Handle CONST_WIDE_INT in output_pic_addr_const [PR111340]
PR target/111340
gcc/ChangeLog:
* config/i386/i386.cc (output_pic_addr_const): Handle
CONST_WIDE_INT.
Call output_addr_const for CASE_CONST_SCALAR_INT.
gcc/testsuite/ChangeLog:
* gcc.target/i386/pr111340.c: New test.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/111340] gcc.dg/bitint-12.c fails on x86_64-apple-darwin or fails on x86_64-linux-gnu with -fPIE
2023-09-08 15:14 [Bug c/111340] New: gcc.dg/bitint-12.c fails on x86_64-apple-darwin fxcoudert at gcc dot gnu.org
` (8 preceding siblings ...)
2023-09-12 16:03 ` cvs-commit at gcc dot gnu.org
@ 2023-09-12 21:11 ` cvs-commit at gcc dot gnu.org
2023-09-12 21:12 ` ubizjak at gmail dot com
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-09-12 21:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111340
--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Uros Bizjak <uros@gcc.gnu.org>:
https://gcc.gnu.org/g:513bfd3271e7b425e91b0a55f72c134d917e9c12
commit r11-11005-g513bfd3271e7b425e91b0a55f72c134d917e9c12
Author: Uros Bizjak <ubizjak@gmail.com>
Date: Mon Sep 11 20:56:42 2023 +0200
i386: Handle CONST_WIDE_INT in output_pic_addr_const [PR111340]
PR target/111340
gcc/ChangeLog:
* config/i386/i386.c (output_pic_addr_const): Handle
CONST_WIDE_INT.
Call output_addr_const for CASE_CONST_SCALAR_INT.
gcc/testsuite/ChangeLog:
* gcc.target/i386/pr111340.c: New test.
(cherry picked from commit 048927ed8561ca994ad853fe85ccf8c2ca07a8fe)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug target/111340] gcc.dg/bitint-12.c fails on x86_64-apple-darwin or fails on x86_64-linux-gnu with -fPIE
2023-09-08 15:14 [Bug c/111340] New: gcc.dg/bitint-12.c fails on x86_64-apple-darwin fxcoudert at gcc dot gnu.org
` (9 preceding siblings ...)
2023-09-12 21:11 ` cvs-commit at gcc dot gnu.org
@ 2023-09-12 21:12 ` ubizjak at gmail dot com
10 siblings, 0 replies; 12+ messages in thread
From: ubizjak at gmail dot com @ 2023-09-12 21:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111340
Uroš Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Target Milestone|--- |11.5
Status|ASSIGNED |RESOLVED
--- Comment #11 from Uroš Bizjak <ubizjak at gmail dot com> ---
Fixed.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2023-09-12 21:12 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-08 15:14 [Bug c/111340] New: gcc.dg/bitint-12.c fails on x86_64-apple-darwin fxcoudert at gcc dot gnu.org
2023-09-08 15:23 ` [Bug target/111340] " pinskia at gcc dot gnu.org
2023-09-08 15:24 ` fxcoudert at gcc dot gnu.org
2023-09-08 15:47 ` [Bug target/111340] gcc.dg/bitint-12.c fails on x86_64-apple-darwin or fails on x86_64-linux-gnu with -fPIE jakub at gcc dot gnu.org
2023-09-08 16:02 ` jakub at gcc dot gnu.org
2023-09-11 6:55 ` ubizjak at gmail dot com
2023-09-11 6:58 ` jakub at gcc dot gnu.org
2023-09-11 18:57 ` cvs-commit at gcc dot gnu.org
2023-09-11 21:47 ` cvs-commit at gcc dot gnu.org
2023-09-12 16:03 ` cvs-commit at gcc dot gnu.org
2023-09-12 21:11 ` cvs-commit at gcc dot gnu.org
2023-09-12 21:12 ` ubizjak 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).