* [Committed] RISC-V: Add test for PR112469
@ 2023-11-10 23:27 Juzhe-Zhong
0 siblings, 0 replies; only message in thread
From: Juzhe-Zhong @ 2023-11-10 23:27 UTC (permalink / raw)
To: gcc-patches; +Cc: Juzhe-Zhong
As PR: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112469
which has been fixed by Richard patch:
https://gcc.gnu.org/pipermail/gcc-patches/2023-November/635994.html
Add tests to avoid regression. Committed.
PR target/112469
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/autovec/pr112469.c: New test.
---
.../gcc.target/riscv/rvv/autovec/pr112469.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/pr112469.c
diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/pr112469.c b/gcc/testsuite/gcc.target/riscv/rvv/autovec/pr112469.c
new file mode 100644
index 00000000000..e647028b558
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/pr112469.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-march=rv64gcv -mabi=lp64d -O3" } */
+
+int a, b, c;
+static int *d = &a;
+int e(int f) { return f == 0 ?: f; }
+int g() {
+ a = 1;
+ for (; a <= 8; a++) {
+ b = e(*d);
+ c = -b;
+ }
+}
--
2.36.3
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-11-10 23:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-10 23:27 [Committed] RISC-V: Add test for PR112469 Juzhe-Zhong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).