From: Patrick O'Neill <patrick@rivosinc.com>
To: gcc-patches@gcc.gnu.org
Cc: jeffreyalaw@gmail.com, gnu-toolchain@rivosinc.com,
Patrick O'Neill <patrick@rivosinc.com>
Subject: [PATCH] g++: Add require-effective-target to multi-input file testcase pr95401.cc
Date: Thu, 2 Nov 2023 23:18:49 -0700 [thread overview]
Message-ID: <20231103061849.79159-1-patrick@rivosinc.com> (raw)
On non-vector targets dejagnu attempts dg-do compile for pr95401.cc.
This produces a command like this:
g++ pr95401.cc pr95401a.cc -S -o pr95401.s
which isn't valid (gcc does not accept multiple input files when using
-S with -o).
This patch adds require-effective-target vect_int to avoid the case
where the testcase is invoked with dg-do compile.
gcc/testsuite/ChangeLog:
* g++.dg/vect/pr95401.cc: Add require-effective-target vect_int.
Signed-off-by: Patrick O'Neill <patrick@rivosinc.com>
---
Tested using rv64gc & rv64gcv to make sure the testcase runs/doesn't
compile as expected.
Somewhat related/similar problem (running vector test on non-vector
target):
https://inbox.sourceware.org/gcc-patches/20231102190911.66763-1-patrick@rivosinc.com/T/#u
https://inbox.sourceware.org/gcc-patches/20231102234527.77231-1-patrick@rivosinc.com/T/#u
Ideally we would have a way to ban a dejagnu dg-do or an equivalent to
check_vect_support_and_set_flags that returns true/false based on
if it emits run/compile as the default dg-do command.
require-effective-target seems to be a reasonable alternative.
pr95401.cc and pr95401a.cc only use int variables and arrays.
---
gcc/testsuite/g++.dg/vect/pr95401.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/gcc/testsuite/g++.dg/vect/pr95401.cc b/gcc/testsuite/g++.dg/vect/pr95401.cc
index 6a56dab0957..6a1b65ff0e7 100644
--- a/gcc/testsuite/g++.dg/vect/pr95401.cc
+++ b/gcc/testsuite/g++.dg/vect/pr95401.cc
@@ -1,5 +1,6 @@
// { dg-additional-options "-mavx2 -O3" { target avx2_runtime } }
// { dg-additional-sources pr95401a.cc }
+// { dg-require-effective-target vect_int }
extern int var_9;
extern unsigned var_14;
--
2.34.1
next reply other threads:[~2023-11-03 6:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-03 6:18 Patrick O'Neill [this message]
2023-11-10 1:34 ` Jeff Law
2023-11-10 18:00 ` Patrick O'Neill
2023-11-19 4:08 ` Jeff Law
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231103061849.79159-1-patrick@rivosinc.com \
--to=patrick@rivosinc.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=gnu-toolchain@rivosinc.com \
--cc=jeffreyalaw@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).