[gcc r16-6979] testsuite: Add testcase for already fixed PR [PR123753]
Jakub Jelinek
jakub@gcc.gnu.org
Thu Jan 22 12:55:52 GMT 2026
https://gcc.gnu.org/g:d52669acc6829c93270b9014af7a681dbd694c39
commit r16-6979-gd52669acc6829c93270b9014af7a681dbd694c39
Author: Jakub Jelinek <jakub@redhat.com>
Date: Thu Jan 22 13:54:08 2026 +0100
testsuite: Add testcase for already fixed PR [PR123753]
This testcase started to ICE with r16-6671, since r16-6741
it has been miscompiled and finally fixed with r16-6976.
2026-01-22 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/123753
* gcc.c-torture/execute/pr123753.c: New test.
Diff:
---
gcc/testsuite/gcc.c-torture/execute/pr123753.c | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr123753.c b/gcc/testsuite/gcc.c-torture/execute/pr123753.c
new file mode 100644
index 000000000000..e3d403d95ad8
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr123753.c
@@ -0,0 +1,25 @@
+/* PR tree-optimization/123753 */
+
+typedef int V __attribute__((__vector_size__ (8)));
+typedef short W __attribute__((__vector_size__ (8)));
+
+union { unsigned short u[4]; W w; } u;
+V v;
+
+V
+foo ()
+{
+ u.w--;
+ V r = v + u.u[0];
+ return r;
+}
+
+int
+main ()
+{
+ if (sizeof (int) != 4 || sizeof (short) != 2)
+ return 0;
+ V x = foo ();
+ if (x[0] != (unsigned short) -1 || x[1] != (unsigned short) -1)
+ __builtin_abort ();
+}
More information about the Gcc-cvs
mailing list