* [committed] testsuite: Add another testcase from PR107131
@ 2023-01-13 16:40 Jakub Jelinek
0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2023-01-13 16:40 UTC (permalink / raw)
To: gcc-patches
Hi!
This one is hand reduced to problematic code from optimized dump
that used to be miscompiled during combine starting with
r12-303 and fixed with r13-3530 aka PR107172 fix.
2023-01-13 Jakub Jelinek <jakub@redhat.com>
PR target/107131
* gcc.c-torture/execute/pr107131.c: New test.
--- gcc/testsuite/gcc.c-torture/execute/pr107131.c.jj 2023-01-13 17:29:42.713370475 +0100
+++ gcc/testsuite/gcc.c-torture/execute/pr107131.c 2023-01-13 17:29:33.366503884 +0100
@@ -0,0 +1,18 @@
+/* PR target/107131 */
+
+__attribute__((noipa)) unsigned long long
+foo (unsigned char o)
+{
+ unsigned long long t1 = -(long long) (o == 0);
+ unsigned long long t2 = -(long long) (t1 > 10439075533421201520ULL);
+ unsigned long long t3 = -(long long) (t1 <= t2);
+ return t3;
+}
+
+int
+main ()
+{
+ if (foo (0) != -1ULL)
+ __builtin_abort ();
+ return 0;
+}
Jakub
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-01-13 16:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-13 16:40 [committed] testsuite: Add another testcase from PR107131 Jakub Jelinek
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).