aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2025-04-16 08:42:35 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2025-04-16 08:44:37 +0200
commit45a708d7bf8369930f4f770bbb7047941727ba41 (patch)
treee27d9722e986514c36cee7308cf65a72c80e766e
parent31e16c8b75bd49a9c5c01ada340da340c6f15c99 (diff)
downloadgcc-45a708d7bf8369930f4f770bbb7047941727ba41.zip
gcc-45a708d7bf8369930f4f770bbb7047941727ba41.tar.gz
gcc-45a708d7bf8369930f4f770bbb7047941727ba41.tar.bz2
testsuite: Add testcase for already fixed PR [PR116093]
This testcase got fixed with r15-9397 PR119722 fix. 2025-04-16 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/116093 * gcc.dg/bitint-122.c: New test.
-rw-r--r--gcc/testsuite/gcc.dg/bitint-122.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/bitint-122.c b/gcc/testsuite/gcc.dg/bitint-122.c
new file mode 100644
index 0000000..c791969
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/bitint-122.c
@@ -0,0 +1,20 @@
+/* PR tree-optimization/116093 */
+/* { dg-do run { target bitint } } */
+/* { dg-options "-Og -ftree-vrp -fno-tree-dce" } */
+
+#if __BITINT_MAXWIDTH__ >= 129
+char
+foo (int a, _BitInt (129) b, char c)
+{
+ return c << (5 / b % (0xdb75dbf5 | a));
+}
+#endif
+
+int
+main ()
+{
+#if __BITINT_MAXWIDTH__ >= 129
+ if (foo (0, 6, 1) != 1)
+ __builtin_abort ();
+#endif
+}