diff options
author | Alexandre Oliva <oliva@adacore.com> | 2024-05-30 04:01:19 -0300 |
---|---|---|
committer | Alexandre Oliva <oliva@gnu.org> | 2024-05-30 04:01:19 -0300 |
commit | 1d71818602f2a7f3b15a811fb20a84d2a177a8e5 (patch) | |
tree | c369621ec903d3eb62ff8a6ed428f400f774e588 | |
parent | 5955c18dfb970740d55d432aeee5cb5a6f51cf65 (diff) | |
download | gcc-1d71818602f2a7f3b15a811fb20a84d2a177a8e5.zip gcc-1d71818602f2a7f3b15a811fb20a84d2a177a8e5.tar.gz gcc-1d71818602f2a7f3b15a811fb20a84d2a177a8e5.tar.bz2 |
[testsuite] conditionalize dg-additional-sources on target and type
g++.dg/vect/pr95401.cc has dg-additional-sources, and that fails when
check_vect_support_and_set_flags finds vector support lacking for
execution tests: tests decay to compile tests, and additional sources
are rejected by the compiler when compiling to a named output file.
At first I considered using some effective target to conditionalize
the additional sources. There was no support for target-specific
additional sources, so I added that.
But then, I found that adding an effective target to check whether the
test involves linking would just make for busy work in this case, and
so I went ahead and adjusted the handling of additional sources to
refrain from adding them on compile tests, reporting them as
unsupported.
That solves the problem without using the newly-added machinery for
per-target additional sources, but I figured since I'd implemented it
I might as well contribute it, since there might be other uses for it.
for gcc/ChangeLog
* doc/sourcebuild.texi (dg-additional-sources): Document
newly-added support for target selectors, and implicit discard
on non-linking tests that name the compiler output explicitly.
for gcc/testsuite/ChangeLog
* lib/gcc-defs.exp (dg-additional-sources): Support target
selectors. Make it cumulative.
(dg-additional-files-options): Take dest and type. Note
unsupported additional sources when not linking and naming the
compiler output. Adjust source dirname prepending to cope
with leading blanks.
* lib/g++.exp (g++_target_compile): Pass dest and type on to
dg-additional-files-options.
* lib/gcc.exp (gcc_target_compile): Likewise.
* lib/gdc.exp (gdb_target_compile): Likewise.
* lib/gfortran.exp (gfortran_target_compile): Likewise.
* lib/go.exp (go_target_compile): Likewise.
* lib/obj-c++.exp (obj-c++_target_compile): Likewise.
* lib/objc.exp (objc_target_compile): Likewise.
* lib/rust.exp (rust_target_compile): Likewise.
* lib/profopt.exp (profopt-execute): Likewise-ish.
0 files changed, 0 insertions, 0 deletions