-
- Downloads
[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.
Showing
- gcc/doc/sourcebuild.texi 7 additions, 1 deletiongcc/doc/sourcebuild.texi
- gcc/testsuite/lib/g++.exp 1 addition, 1 deletiongcc/testsuite/lib/g++.exp
- gcc/testsuite/lib/gcc-defs.exp 30 additions, 5 deletionsgcc/testsuite/lib/gcc-defs.exp
- gcc/testsuite/lib/gcc.exp 1 addition, 1 deletiongcc/testsuite/lib/gcc.exp
- gcc/testsuite/lib/gdc.exp 1 addition, 1 deletiongcc/testsuite/lib/gdc.exp
- gcc/testsuite/lib/gfortran.exp 1 addition, 1 deletiongcc/testsuite/lib/gfortran.exp
- gcc/testsuite/lib/go.exp 1 addition, 1 deletiongcc/testsuite/lib/go.exp
- gcc/testsuite/lib/obj-c++.exp 1 addition, 1 deletiongcc/testsuite/lib/obj-c++.exp
- gcc/testsuite/lib/objc.exp 1 addition, 1 deletiongcc/testsuite/lib/objc.exp
- gcc/testsuite/lib/profopt.exp 1 addition, 1 deletiongcc/testsuite/lib/profopt.exp
- gcc/testsuite/lib/rust.exp 1 addition, 1 deletiongcc/testsuite/lib/rust.exp
Loading
Please register or sign in to comment