aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/bitint-122.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/bitint-122.c')
-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
+}