Skip to content
Snippets Groups Projects
Commit 9223d171 authored by Alexandre Oliva's avatar Alexandre Oliva Committed by Alexandre Oliva
Browse files

[testsuite] add linkonly to dg-additional-sources [PR115295]

The D testsuite shows it was a mistake to assume that
dg-additional-sources are never to be used for compilation tests.
Even if an output file is specified for compilation, extra module
files can be named and used in the compilation without being flagged
as errors.

Introduce a 'linkonly' flag for dg-additional-sources, and use it in
pr95401.cc and other vector tests that default to run, so that its
additional sources get discarded when vector tests downgrade to
compile-only.  This reverts previous workarounds for this very
circumstance, that relied on being able to run vector tests anyway,
even after failing to detect runtime or hardware vector support.


for  gcc/ChangeLog

	PR d/115295
	* doc/sourcebuild.texi (dg-additional-sources): Add linkonly.

for  gcc/testsuite/ChangeLog

	PR d/115295
	* g++.dg/vect/pr95401.cc: Add linkonly to dg-additional-sources.
	* g++.dg/vect/pr68762-1.cc: Likewise.
	* g++.dg/vect/simd-clone-3.cc: Likewise.
	* g++.dg/vect/simd-clone-5.cc: Likewise.
	* gcc.dg/vect/vect-simd-clone-10.c: Likewise.  Drop dg-do run.
	* gcc.dg/vect/vect-simd-clone-12.c: Likewise.  Likewise.
	* lib/gcc-defs.exp (additional_sources_omit_on_compile): New.
	(dg-additional-sources): Add to it on linkonly.
	(dg-additional-files-options): Omit select sources on compile.
parent b9bf0c3f
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment