public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/111007] New: [14 Regression] Wrong code at -O0 on x86_64-pc-linux-gnu
@ 2023-08-13 13:31 jwzeng at nuaa dot edu.cn
2023-08-13 17:29 ` [Bug middle-end/111007] " pinskia at gcc dot gnu.org
2023-08-13 17:50 ` pinskia at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: jwzeng at nuaa dot edu.cn @ 2023-08-13 13:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111007
Bug ID: 111007
Summary: [14 Regression] Wrong code at -O0 on
x86_64-pc-linux-gnu
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: jwzeng at nuaa dot edu.cn
Target Milestone: ---
gcc at -O0 produces the wrong code.
$ cat bug.c
int printf(const char *, ...);
unsigned int a = 1111847502U;
unsigned int b = 1864610367U;
#define max(a, b) ((a) > (b) ? (a) : (b))
int main() {
a = max(b && 1071974078U, 0 ^ (!b));
printf("%u\n", a);
}
$
$ gcc-trunk bug.c; ./a.out
4294967295
$ gcc-13 bug.c; ./a.out
1
$ gcc-9 bug.c; ./a.out
1
$
$ gcc-trunk --version
Target: x86_64-pc-linux-gnu
gcc (GCC) 14.0.0 20230811 (experimental) [master r14-3137-g4271b7422f]
$ gcc-13 --version
gcc (GCC) 13.1.0
$ gcc-9 --version
gcc-9 (Ubuntu 9.4.0-1ubuntu1~16.04) 9.4.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug middle-end/111007] [14 Regression] Wrong code at -O0 on x86_64-pc-linux-gnu
2023-08-13 13:31 [Bug middle-end/111007] New: [14 Regression] Wrong code at -O0 on x86_64-pc-linux-gnu jwzeng at nuaa dot edu.cn
@ 2023-08-13 17:29 ` pinskia at gcc dot gnu.org
2023-08-13 17:50 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-08-13 17:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111007
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I think this was fixed by r14-3140 .
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug middle-end/111007] [14 Regression] Wrong code at -O0 on x86_64-pc-linux-gnu
2023-08-13 13:31 [Bug middle-end/111007] New: [14 Regression] Wrong code at -O0 on x86_64-pc-linux-gnu jwzeng at nuaa dot edu.cn
2023-08-13 17:29 ` [Bug middle-end/111007] " pinskia at gcc dot gnu.org
@ 2023-08-13 17:50 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-08-13 17:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111007
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Yes it is a dup.
*** This bug has been marked as a duplicate of bug 110954 ***
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-08-13 17:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-13 13:31 [Bug middle-end/111007] New: [14 Regression] Wrong code at -O0 on x86_64-pc-linux-gnu jwzeng at nuaa dot edu.cn
2023-08-13 17:29 ` [Bug middle-end/111007] " pinskia at gcc dot gnu.org
2023-08-13 17:50 ` pinskia at gcc dot gnu.org
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).