aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Pinski <quic_apinski@quicinc.com>2025-04-14 08:40:24 -0700
committerAndrew Pinski <quic_apinski@quicinc.com>2025-04-14 09:08:22 -0700
commitd45a6502d1ec87d43f1a39f87cca58f1e28369c8 (patch)
tree0b48ac477914ece4513a4a1ad1d9d4cc71211523
parent00966a7fdb1478b3af5254ff3a80a3ef336c5a94 (diff)
downloadgcc-d45a6502d1ec87d43f1a39f87cca58f1e28369c8.zip
gcc-d45a6502d1ec87d43f1a39f87cca58f1e28369c8.tar.gz
gcc-d45a6502d1ec87d43f1a39f87cca58f1e28369c8.tar.bz2
testcase: Add testcase for already fixed PR [PR118476]
This testcase was fixed by r15-3052-gc7b76a076cb2c6ded but is a testcase that failed in a different fashion and a much older failure than the one added with r15-3052. Pushed as obvious after a quick test. PR tree-optimization/118476 gcc/testsuite/ChangeLog: * gcc.dg/torture/pr118476-1.c: New test. Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr118476-1.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/pr118476-1.c b/gcc/testsuite/gcc.dg/torture/pr118476-1.c
new file mode 100644
index 0000000..33509403
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr118476-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+
+/* PR tree-optimization/118476 */
+
+typedef unsigned long long poly64x1 __attribute__((__vector_size__(1*sizeof(long long))));
+
+poly64x1 vext_p64(poly64x1 a, poly64x1 b, const int n)
+{
+ poly64x1 r = a;
+ unsigned src = (unsigned)n;
+ long long t = b[0];
+ r[0] = (src < 1) ? a[src] : t;
+ return r;
+}