On 11/9/23 17:34, Jeff Law wrote: > > > On 11/3/23 00:18, Patrick O'Neill wrote: >> 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. > Sorry, I must be missing something here.  I fail to see how adding an > effective target check would/should impact the problem you've > described above with the dg-additional-sources interaction with -S. It's not intuitive (& probably not the cleanest way of solving it). pr95401.cc is an invalid testcase when run with dg-do compile (for the reasons above). pr95401.cc does not define a dg-do, which means it uses the testcase uses dg-do-what-default to determine what to do. dg-do-what-default is set by target-supports.exp . The two options here are set dg-do-what-default run or compile. On non-vector targets the pr95401 is set to compile (which is invalid). Ideally we would say if dg-do-what-default == compile don't run, but AFAIK that isn't possible. I didn't want to duplicate the check_vect_support_and_set_flags logic to return true/false since that'll probably get out of sync. I used require-effective-target vect_int as a proxy for check_vect_support_and_set_flags (also since the testcase only contains integer arrays). That way we do this now: dg-do-what-default run -> run dg-do-what-default compile -> skip test If there's a cleaner/better approach I'm happy to revise. Patrick > > Jeff >>