* [Bug c++/107551] gcc 12.2 test fails
2022-11-07 13:00 [Bug c++/107551] New: gcc 12.2 test fails brjd_epdjq36 at kygur dot com
@ 2022-11-07 13:35 ` brjd_epdjq36 at kygur dot com
2022-11-07 15:51 ` [Bug target/107551] g++ " pinskia at gcc dot gnu.org
` (25 subsequent siblings)
26 siblings, 0 replies; 28+ messages in thread
From: brjd_epdjq36 at kygur dot com @ 2022-11-07 13:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107551
--- Comment #1 from Brjd <brjd_epdjq36 at kygur dot com> ---
Maybe the error is since it is a new test appearing firstly in 12.2.0.
^ permalink raw reply [flat|nested] 28+ messages in thread
* [Bug target/107551] g++ 12.2 test fails
2022-11-07 13:00 [Bug c++/107551] New: gcc 12.2 test fails brjd_epdjq36 at kygur dot com
2022-11-07 13:35 ` [Bug c++/107551] " brjd_epdjq36 at kygur dot com
@ 2022-11-07 15:51 ` pinskia at gcc dot gnu.org
2022-11-07 16:08 ` brjd_epdjq36 at kygur dot com
` (24 subsequent siblings)
26 siblings, 0 replies; 28+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-11-07 15:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107551
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Can you attach the output of your /proc/cpuinfo ?
This testcase depends on the target you are running on.
^ permalink raw reply [flat|nested] 28+ messages in thread
* [Bug target/107551] g++ 12.2 test fails
2022-11-07 13:00 [Bug c++/107551] New: gcc 12.2 test fails brjd_epdjq36 at kygur dot com
2022-11-07 13:35 ` [Bug c++/107551] " brjd_epdjq36 at kygur dot com
2022-11-07 15:51 ` [Bug target/107551] g++ " pinskia at gcc dot gnu.org
@ 2022-11-07 16:08 ` brjd_epdjq36 at kygur dot com
2022-11-07 16:10 ` brjd_epdjq36 at kygur dot com
` (23 subsequent siblings)
26 siblings, 0 replies; 28+ messages in thread
From: brjd_epdjq36 at kygur dot com @ 2022-11-07 16:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107551
--- Comment #3 from Brjd <brjd_epdjq36 at kygur dot com> ---
Created attachment 53844
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53844&action=edit
cpuinfo
^ permalink raw reply [flat|nested] 28+ messages in thread
* [Bug target/107551] g++ 12.2 test fails
2022-11-07 13:00 [Bug c++/107551] New: gcc 12.2 test fails brjd_epdjq36 at kygur dot com
` (2 preceding siblings ...)
2022-11-07 16:08 ` brjd_epdjq36 at kygur dot com
@ 2022-11-07 16:10 ` brjd_epdjq36 at kygur dot com
2022-11-08 9:23 ` rguenth at gcc dot gnu.org
` (22 subsequent siblings)
26 siblings, 0 replies; 28+ messages in thread
From: brjd_epdjq36 at kygur dot com @ 2022-11-07 16:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107551
--- Comment #4 from Brjd <brjd_epdjq36 at kygur dot com> ---
I understand that this old cpu is not supported.
^ permalink raw reply [flat|nested] 28+ messages in thread
* [Bug target/107551] g++ 12.2 test fails
2022-11-07 13:00 [Bug c++/107551] New: gcc 12.2 test fails brjd_epdjq36 at kygur dot com
` (3 preceding siblings ...)
2022-11-07 16:10 ` brjd_epdjq36 at kygur dot com
@ 2022-11-08 9:23 ` rguenth at gcc dot gnu.org
2022-11-08 9:49 ` brjd_epdjq36 at kygur dot com
` (21 subsequent siblings)
26 siblings, 0 replies; 28+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-11-08 9:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107551
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2022-11-08
Ever confirmed|0 |1
Target| |x86_64-*-* i?86-*-*
Status|UNCONFIRMED |WAITING
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
The issue likely also appears on trunk, it shows disconnect between the runtime
dispatch and the __builtin_cpu_supports for your CPU. Can you please provide
the version of glibc you have installed and maybe your OS and version?
^ permalink raw reply [flat|nested] 28+ messages in thread
* [Bug target/107551] g++ 12.2 test fails
2022-11-07 13:00 [Bug c++/107551] New: gcc 12.2 test fails brjd_epdjq36 at kygur dot com
` (4 preceding siblings ...)
2022-11-08 9:23 ` rguenth at gcc dot gnu.org
@ 2022-11-08 9:49 ` brjd_epdjq36 at kygur dot com
2022-11-21 12:28 ` marxin at gcc dot gnu.org
` (20 subsequent siblings)
26 siblings, 0 replies; 28+ messages in thread
From: brjd_epdjq36 at kygur dot com @ 2022-11-08 9:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107551
--- Comment #6 from Brjd <brjd_epdjq36 at kygur dot com> ---
glibc 2.19 on utopic 14.10
You may have already noticed it but just to make sure it may be helpful too,
this is where it crashes in the main for all 4 cases:
gcc/testsuite/g++.target/i386/mv30.C:45:
int main(): Assertion `val == 1' failed.
FAIL: g++.target/i386/mv30.C -std=gnu++20 execution test
else if (__builtin_cpu_supports ("x86-64"))
assert (val == 1);
^ permalink raw reply [flat|nested] 28+ messages in thread
* [Bug target/107551] g++ 12.2 test fails
2022-11-07 13:00 [Bug c++/107551] New: gcc 12.2 test fails brjd_epdjq36 at kygur dot com
` (5 preceding siblings ...)
2022-11-08 9:49 ` brjd_epdjq36 at kygur dot com
@ 2022-11-21 12:28 ` marxin at gcc dot gnu.org
2022-11-24 23:31 ` brjd_epdjq36 at kygur dot com
` (19 subsequent siblings)
26 siblings, 0 replies; 28+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-11-21 12:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107551
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |marxin at gcc dot gnu.org
Assignee|unassigned at gcc dot gnu.org |marxin at gcc dot gnu.org
--- Comment #7 from Martin Liška <marxin at gcc dot gnu.org> ---
Can you please run:
$ cat cpuid.c
#include "cpuid.h"
int main()
{
int eax, ebx, ecx, edx;
__get_cpuid (0, &eax, &ebx, &ecx, &edx);
__builtin_printf ("__get_cpuid(0): eax=%#x, ebx=%#x, ecx=%#x, edx=%#x\n",
eax, ebx, ecx, edx);
__get_cpuid (1, &eax, &ebx, &ecx, &edx);
__builtin_printf ("__get_cpuid(1): eax=%#x, ebx=%#x, ecx=%#x, edx=%#x\n",
eax, ebx, ecx, edx);
}
$ gcc cpuid.c && ./a.out
And paste here the output?
^ permalink raw reply [flat|nested] 28+ messages in thread
* [Bug target/107551] g++ 12.2 test fails
2022-11-07 13:00 [Bug c++/107551] New: gcc 12.2 test fails brjd_epdjq36 at kygur dot com
` (6 preceding siblings ...)
2022-11-21 12:28 ` marxin at gcc dot gnu.org
@ 2022-11-24 23:31 ` brjd_epdjq36 at kygur dot com
2022-11-25 11:46 ` [Bug target/107551] __builtin_cpu_is returns a negative integer for x86-64 marxin at gcc dot gnu.org
` (18 subsequent siblings)
26 siblings, 0 replies; 28+ messages in thread
From: brjd_epdjq36 at kygur dot com @ 2022-11-24 23:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107551
--- Comment #8 from Brjd <brjd_epdjq36 at kygur dot com> ---
__get_cpuid(0): eax=0xa, ebx=0x756e6547, ecx=0x6c65746e, edx=0x49656e69
__get_cpuid(1): eax=0x106ca, ebx=0x20800, ecx=0x40e39d, edx=0xbfe9fbff
^ permalink raw reply [flat|nested] 28+ messages in thread
* [Bug target/107551] __builtin_cpu_is returns a negative integer for x86-64
2022-11-07 13:00 [Bug c++/107551] New: gcc 12.2 test fails brjd_epdjq36 at kygur dot com
` (7 preceding siblings ...)
2022-11-24 23:31 ` brjd_epdjq36 at kygur dot com
@ 2022-11-25 11:46 ` marxin at gcc dot gnu.org
2022-11-25 11:46 ` marxin at gcc dot gnu.org
` (17 subsequent siblings)
26 siblings, 0 replies; 28+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-11-25 11:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107551
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|g++ 12.2 test fails |__builtin_cpu_is returns a
| |negative integer for x86-64
Status|WAITING |ASSIGNED
--- Comment #9 from Martin Liška <marxin at gcc dot gnu.org> ---
Thanks a lot for the values! It's the same story as PR103661, grr. Apparently,
I didn't fix it entirely.
^ permalink raw reply [flat|nested] 28+ messages in thread
* [Bug target/107551] __builtin_cpu_is returns a negative integer for x86-64
2022-11-07 13:00 [Bug c++/107551] New: gcc 12.2 test fails brjd_epdjq36 at kygur dot com
` (8 preceding siblings ...)
2022-11-25 11:46 ` [Bug target/107551] __builtin_cpu_is returns a negative integer for x86-64 marxin at gcc dot gnu.org
@ 2022-11-25 11:46 ` marxin at gcc dot gnu.org
2022-11-29 9:15 ` [Bug target/107551] __builtin_cpu_supports returns a negative integer for "x86-64" brjd_epdjq36 at kygur dot com
` (16 subsequent siblings)
26 siblings, 0 replies; 28+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-11-25 11:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107551
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
--- Comment #10 from Martin Liška <marxin at gcc dot gnu.org> ---
One can easily reproduce that locally with:
assert (__builtin_cpu_supports ("x86-64") >= 0);
^ permalink raw reply [flat|nested] 28+ messages in thread
* [Bug target/107551] __builtin_cpu_supports returns a negative integer for "x86-64"
2022-11-07 13:00 [Bug c++/107551] New: gcc 12.2 test fails brjd_epdjq36 at kygur dot com
` (9 preceding siblings ...)
2022-11-25 11:46 ` marxin at gcc dot gnu.org
@ 2022-11-29 9:15 ` brjd_epdjq36 at kygur dot com
2022-11-30 12:22 ` marxin at gcc dot gnu.org
` (15 subsequent siblings)
26 siblings, 0 replies; 28+ messages in thread
From: brjd_epdjq36 at kygur dot com @ 2022-11-29 9:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107551
--- Comment #11 from Brjd <brjd_epdjq36 at kygur dot com> ---
Thank you.
Best regards.
^ permalink raw reply [flat|nested] 28+ messages in thread
* [Bug target/107551] __builtin_cpu_supports returns a negative integer for "x86-64"
2022-11-07 13:00 [Bug c++/107551] New: gcc 12.2 test fails brjd_epdjq36 at kygur dot com
` (10 preceding siblings ...)
2022-11-29 9:15 ` [Bug target/107551] __builtin_cpu_supports returns a negative integer for "x86-64" brjd_epdjq36 at kygur dot com
@ 2022-11-30 12:22 ` marxin at gcc dot gnu.org
2022-12-02 13:11 ` marxin at gcc dot gnu.org
` (14 subsequent siblings)
26 siblings, 0 replies; 28+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-11-30 12:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107551
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
--- Comment #12 from Martin Liška <marxin at gcc dot gnu.org> ---
Can you please check that the patch candidate fixes the test for you:
https://gcc.gnu.org/pipermail/gcc-patches/2022-November/607278.html
?
^ permalink raw reply [flat|nested] 28+ messages in thread
* [Bug target/107551] __builtin_cpu_supports returns a negative integer for "x86-64"
2022-11-07 13:00 [Bug c++/107551] New: gcc 12.2 test fails brjd_epdjq36 at kygur dot com
` (11 preceding siblings ...)
2022-11-30 12:22 ` marxin at gcc dot gnu.org
@ 2022-12-02 13:11 ` marxin at gcc dot gnu.org
2022-12-05 11:24 ` brjd_epdjq36 at kygur dot com
` (13 subsequent siblings)
26 siblings, 0 replies; 28+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-12-02 13:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107551
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |12.3
^ permalink raw reply [flat|nested] 28+ messages in thread
* [Bug target/107551] __builtin_cpu_supports returns a negative integer for "x86-64"
2022-11-07 13:00 [Bug c++/107551] New: gcc 12.2 test fails brjd_epdjq36 at kygur dot com
` (12 preceding siblings ...)
2022-12-02 13:11 ` marxin at gcc dot gnu.org
@ 2022-12-05 11:24 ` brjd_epdjq36 at kygur dot com
2022-12-05 11:28 ` brjd_epdjq36 at kygur dot com
` (12 subsequent siblings)
26 siblings, 0 replies; 28+ messages in thread
From: brjd_epdjq36 at kygur dot com @ 2022-12-05 11:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107551
--- Comment #13 from Brjd <brjd_epdjq36 at kygur dot com> ---
I am not sure how I can run only this patched test against the newly built gcc.
Would you post instruction how it is done. I know it can run in the build tree
when building gcc itself, but never test it against the testsuite when ready. I
unpack the source, patch the test and then what next?
^ permalink raw reply [flat|nested] 28+ messages in thread
* [Bug target/107551] __builtin_cpu_supports returns a negative integer for "x86-64"
2022-11-07 13:00 [Bug c++/107551] New: gcc 12.2 test fails brjd_epdjq36 at kygur dot com
` (13 preceding siblings ...)
2022-12-05 11:24 ` brjd_epdjq36 at kygur dot com
@ 2022-12-05 11:28 ` brjd_epdjq36 at kygur dot com
2022-12-05 11:30 ` marxin at gcc dot gnu.org
` (11 subsequent siblings)
26 siblings, 0 replies; 28+ messages in thread
From: brjd_epdjq36 at kygur dot com @ 2022-12-05 11:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107551
--- Comment #14 from Brjd <brjd_epdjq36 at kygur dot com> ---
Maybe it is better if we test it in the next release 12.3 or 13.1 since now the
test will be correct, ok, but when building source with the compiler, it will
not make any difference and make no problems at all?
^ permalink raw reply [flat|nested] 28+ messages in thread
* [Bug target/107551] __builtin_cpu_supports returns a negative integer for "x86-64"
2022-11-07 13:00 [Bug c++/107551] New: gcc 12.2 test fails brjd_epdjq36 at kygur dot com
` (14 preceding siblings ...)
2022-12-05 11:28 ` brjd_epdjq36 at kygur dot com
@ 2022-12-05 11:30 ` marxin at gcc dot gnu.org
2022-12-05 11:54 ` brjd_epdjq36 at kygur dot com
` (10 subsequent siblings)
26 siblings, 0 replies; 28+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-12-05 11:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107551
--- Comment #15 from Martin Liška <marxin at gcc dot gnu.org> ---
Sure, I'm pretty sure about what's the problem, so you can wait for 13.1 or
12.3 where I would like to get the fix.
^ permalink raw reply [flat|nested] 28+ messages in thread
* [Bug target/107551] __builtin_cpu_supports returns a negative integer for "x86-64"
2022-11-07 13:00 [Bug c++/107551] New: gcc 12.2 test fails brjd_epdjq36 at kygur dot com
` (15 preceding siblings ...)
2022-12-05 11:30 ` marxin at gcc dot gnu.org
@ 2022-12-05 11:54 ` brjd_epdjq36 at kygur dot com
2022-12-05 12:08 ` marxin at gcc dot gnu.org
` (9 subsequent siblings)
26 siblings, 0 replies; 28+ messages in thread
From: brjd_epdjq36 at kygur dot com @ 2022-12-05 11:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107551
--- Comment #16 from Brjd <brjd_epdjq36 at kygur dot com> ---
I mean that as I can see, your patch makes changes only to the test and not to
the compiler ? If it does not, and it changes the compiler source also, then I
have to rebuild the whole compiler to test it again. But If only the test is
misconfigured, forget about it, and the compiler works great, then I will use
it for the next build. Thank you a lot.
^ permalink raw reply [flat|nested] 28+ messages in thread
* [Bug target/107551] __builtin_cpu_supports returns a negative integer for "x86-64"
2022-11-07 13:00 [Bug c++/107551] New: gcc 12.2 test fails brjd_epdjq36 at kygur dot com
` (16 preceding siblings ...)
2022-12-05 11:54 ` brjd_epdjq36 at kygur dot com
@ 2022-12-05 12:08 ` marxin at gcc dot gnu.org
2022-12-05 13:22 ` brjd_epdjq36 at kygur dot com
` (8 subsequent siblings)
26 siblings, 0 replies; 28+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-12-05 12:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107551
--- Comment #17 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Brjd from comment #16)
> I mean that as I can see, your patch makes changes only to the test and not
> to the compiler ?
No, it also modifies:
gcc/config/i386/i386-builtins.cc
which is part of the compiler itself.
^ permalink raw reply [flat|nested] 28+ messages in thread
* [Bug target/107551] __builtin_cpu_supports returns a negative integer for "x86-64"
2022-11-07 13:00 [Bug c++/107551] New: gcc 12.2 test fails brjd_epdjq36 at kygur dot com
` (17 preceding siblings ...)
2022-12-05 12:08 ` marxin at gcc dot gnu.org
@ 2022-12-05 13:22 ` brjd_epdjq36 at kygur dot com
2022-12-05 13:26 ` marxin at gcc dot gnu.org
` (7 subsequent siblings)
26 siblings, 0 replies; 28+ messages in thread
From: brjd_epdjq36 at kygur dot com @ 2022-12-05 13:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107551
--- Comment #18 from Brjd <brjd_epdjq36 at kygur dot com> ---
Then rebuild is necessary and impending
gcc/config/i386/i386-builtins.cc for the compiler ?
gcc/testsuite/gcc.target/i386/builtin_target.c for the test ?
gcc/doc/extend.texi is not needed since I am not building docs?
^ permalink raw reply [flat|nested] 28+ messages in thread
* [Bug target/107551] __builtin_cpu_supports returns a negative integer for "x86-64"
2022-11-07 13:00 [Bug c++/107551] New: gcc 12.2 test fails brjd_epdjq36 at kygur dot com
` (18 preceding siblings ...)
2022-12-05 13:22 ` brjd_epdjq36 at kygur dot com
@ 2022-12-05 13:26 ` marxin at gcc dot gnu.org
2022-12-05 15:02 ` brjd_epdjq36 at kygur dot com
` (6 subsequent siblings)
26 siblings, 0 replies; 28+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-12-05 13:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107551
--- Comment #19 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Brjd from comment #18)
> Then rebuild is necessary and impending
> gcc/config/i386/i386-builtins.cc for the compiler ?
> gcc/testsuite/gcc.target/i386/builtin_target.c for the test ?
Yes.
^ permalink raw reply [flat|nested] 28+ messages in thread
* [Bug target/107551] __builtin_cpu_supports returns a negative integer for "x86-64"
2022-11-07 13:00 [Bug c++/107551] New: gcc 12.2 test fails brjd_epdjq36 at kygur dot com
` (19 preceding siblings ...)
2022-12-05 13:26 ` marxin at gcc dot gnu.org
@ 2022-12-05 15:02 ` brjd_epdjq36 at kygur dot com
2022-12-05 15:04 ` brjd_epdjq36 at kygur dot com
` (5 subsequent siblings)
26 siblings, 0 replies; 28+ messages in thread
From: brjd_epdjq36 at kygur dot com @ 2022-12-05 15:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107551
--- Comment #20 from Brjd <brjd_epdjq36 at kygur dot com> ---
The test gcc/testsuite/gcc.target/i386/builtin_target.c is patched.
But gcc/config/i386/i386-builtins.cc looks like it is from another version.
I attached it as i386-builtins-orig-12.2.0.cc to compare them and asking if you
could correct it with your patch.
^ permalink raw reply [flat|nested] 28+ messages in thread
* [Bug target/107551] __builtin_cpu_supports returns a negative integer for "x86-64"
2022-11-07 13:00 [Bug c++/107551] New: gcc 12.2 test fails brjd_epdjq36 at kygur dot com
` (20 preceding siblings ...)
2022-12-05 15:02 ` brjd_epdjq36 at kygur dot com
@ 2022-12-05 15:04 ` brjd_epdjq36 at kygur dot com
2022-12-05 15:17 ` brjd_epdjq36 at kygur dot com
` (4 subsequent siblings)
26 siblings, 0 replies; 28+ messages in thread
From: brjd_epdjq36 at kygur dot com @ 2022-12-05 15:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107551
--- Comment #21 from Brjd <brjd_epdjq36 at kygur dot com> ---
Created attachment 54012
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54012&action=edit
i386-builtins-orig-12.2.0.cc
^ permalink raw reply [flat|nested] 28+ messages in thread
* [Bug target/107551] __builtin_cpu_supports returns a negative integer for "x86-64"
2022-11-07 13:00 [Bug c++/107551] New: gcc 12.2 test fails brjd_epdjq36 at kygur dot com
` (21 preceding siblings ...)
2022-12-05 15:04 ` brjd_epdjq36 at kygur dot com
@ 2022-12-05 15:17 ` brjd_epdjq36 at kygur dot com
2022-12-09 9:21 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
26 siblings, 0 replies; 28+ messages in thread
From: brjd_epdjq36 at kygur dot com @ 2022-12-05 15:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107551
--- Comment #22 from Brjd <brjd_epdjq36 at kygur dot com> ---
Maybe not changing now is the correct way for now since I may change it blindly
not knowing completely what I am doing. Let the developers correct it and will
include it in next releases. The compiler is excellent and at least it may
build older sourced while the newer ones will be waiting for revisions.
^ permalink raw reply [flat|nested] 28+ messages in thread
* [Bug target/107551] __builtin_cpu_supports returns a negative integer for "x86-64"
2022-11-07 13:00 [Bug c++/107551] New: gcc 12.2 test fails brjd_epdjq36 at kygur dot com
` (22 preceding siblings ...)
2022-12-05 15:17 ` brjd_epdjq36 at kygur dot com
@ 2022-12-09 9:21 ` cvs-commit at gcc dot gnu.org
2022-12-09 9:29 ` marxin at gcc dot gnu.org
` (2 subsequent siblings)
26 siblings, 0 replies; 28+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-12-09 9:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107551
--- Comment #23 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Liska <marxin@gcc.gnu.org>:
https://gcc.gnu.org/g:d71b20fc30965ba8326ad9363d0aca9d61eb4ed3
commit r13-4581-gd71b20fc30965ba8326ad9363d0aca9d61eb4ed3
Author: Martin Liska <mliska@suse.cz>
Date: Fri Nov 25 13:05:56 2022 +0100
i386: fix assert (__builtin_cpu_supports ("x86-64") >= 0)
Similar story as PR103661, we again return a negative number
for __builtin_cpu_supports:
Documentation says:
int __builtin_cpu_supports(const char *feature)
This function returns a positive integer if the run-time CPU supports
feature and returns 0 otherwise.
while we return -2147483648.
Moreover, I noticed "x86-64" is not a valid option for __builtin_cpu_is,
but for __builtin_cpu_supports.
PR target/107551
gcc/ChangeLog:
* config/i386/i386-builtins.cc (fold_builtin_cpu): Use same path
as for PR103661.
* doc/extend.texi: Fix "x86-64" use.
gcc/testsuite/ChangeLog:
* gcc.target/i386/builtin_target.c: Add more checks.
^ permalink raw reply [flat|nested] 28+ messages in thread
* [Bug target/107551] __builtin_cpu_supports returns a negative integer for "x86-64"
2022-11-07 13:00 [Bug c++/107551] New: gcc 12.2 test fails brjd_epdjq36 at kygur dot com
` (23 preceding siblings ...)
2022-12-09 9:21 ` cvs-commit at gcc dot gnu.org
@ 2022-12-09 9:29 ` marxin at gcc dot gnu.org
2022-12-09 13:25 ` cvs-commit at gcc dot gnu.org
2022-12-09 13:26 ` marxin at gcc dot gnu.org
26 siblings, 0 replies; 28+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-12-09 9:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107551
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |12.2.0
Known to work| |13.0
--- Comment #24 from Martin Liška <marxin at gcc dot gnu.org> ---
Fixed on master so far.
^ permalink raw reply [flat|nested] 28+ messages in thread
* [Bug target/107551] __builtin_cpu_supports returns a negative integer for "x86-64"
2022-11-07 13:00 [Bug c++/107551] New: gcc 12.2 test fails brjd_epdjq36 at kygur dot com
` (24 preceding siblings ...)
2022-12-09 9:29 ` marxin at gcc dot gnu.org
@ 2022-12-09 13:25 ` cvs-commit at gcc dot gnu.org
2022-12-09 13:26 ` marxin at gcc dot gnu.org
26 siblings, 0 replies; 28+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-12-09 13:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107551
--- Comment #25 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Martin Liska
<marxin@gcc.gnu.org>:
https://gcc.gnu.org/g:5ec102e3290ff1cac457420a1219fa1ca3bbbb70
commit r12-8966-g5ec102e3290ff1cac457420a1219fa1ca3bbbb70
Author: Martin Liska <mliska@suse.cz>
Date: Fri Nov 25 13:05:56 2022 +0100
i386: fix assert (__builtin_cpu_supports ("x86-64") >= 0)
Similar story as PR103661, we again return a negative number
for __builtin_cpu_supports:
Documentation says:
int __builtin_cpu_supports(const char *feature)
This function returns a positive integer if the run-time CPU supports
feature and returns 0 otherwise.
while we return -2147483648.
Moreover, I noticed "x86-64" is not a valid option for __builtin_cpu_is,
but for __builtin_cpu_supports.
PR target/107551
gcc/ChangeLog:
* config/i386/i386-builtins.cc (fold_builtin_cpu): Use same path
as for PR103661.
* doc/extend.texi: Fix "x86-64" use.
gcc/testsuite/ChangeLog:
* gcc.target/i386/builtin_target.c: Add more checks.
(cherry picked from commit d71b20fc30965ba8326ad9363d0aca9d61eb4ed3)
^ permalink raw reply [flat|nested] 28+ messages in thread
* [Bug target/107551] __builtin_cpu_supports returns a negative integer for "x86-64"
2022-11-07 13:00 [Bug c++/107551] New: gcc 12.2 test fails brjd_epdjq36 at kygur dot com
` (25 preceding siblings ...)
2022-12-09 13:25 ` cvs-commit at gcc dot gnu.org
@ 2022-12-09 13:26 ` marxin at gcc dot gnu.org
26 siblings, 0 replies; 28+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-12-09 13:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107551
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #26 from Martin Liška <marxin at gcc dot gnu.org> ---
Fixed for gcc-12 branch.
^ permalink raw reply [flat|nested] 28+ messages in thread