https://gcc.gnu.org/g:45a708d7bf8369930f4f770bbb7047941727ba41

commit r15-9513-g45a708d7bf8369930f4f770bbb7047941727ba41
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Wed Apr 16 08:42:35 2025 +0200

    testsuite: Add testcase for already fixed PR [PR116093]
    
    This testcase got fixed with r15-9397 PR119722 fix.
    
    2025-04-16  Jakub Jelinek  <ja...@redhat.com>
    
            PR tree-optimization/116093
            * gcc.dg/bitint-122.c: New test.

Diff:
---
 gcc/testsuite/gcc.dg/bitint-122.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gcc/testsuite/gcc.dg/bitint-122.c 
b/gcc/testsuite/gcc.dg/bitint-122.c
new file mode 100644
index 000000000000..c7919698b573
--- /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
+}

Reply via email to