]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: Add testcase for already fixed PR [PR112734]
authorJakub Jelinek <jakub@redhat.com>
Wed, 10 Jan 2024 16:18:38 +0000 (17:18 +0100)
committerJakub Jelinek <jakub@redhat.com>
Wed, 10 Jan 2024 16:18:38 +0000 (17:18 +0100)
This test was already fixed by r14-6051 aka PR112770 fix.

2024-01-10  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/112734
* gcc.dg/bitint-64.c: New test.

gcc/testsuite/gcc.dg/bitint-64.c [new file with mode: 0644]

diff --git a/gcc/testsuite/gcc.dg/bitint-64.c b/gcc/testsuite/gcc.dg/bitint-64.c
new file mode 100644 (file)
index 0000000..0c7524c
--- /dev/null
@@ -0,0 +1,16 @@
+/* PR tree-optimization/112734 */
+/* { dg-do compile { target bitint } } */
+/* { dg-options "-std=c23 -fnon-call-exceptions -ftrapv" } */
+
+#if __BITINT_MAXWIDTH__ >= 128
+_BitInt(128) out;
+#else
+int out;
+#endif
+
+int
+main ()
+{
+  _BitInt(8) q[1];
+  out -= 1;
+}