https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65126
Bug ID: 65126 Summary: additional_sources not defined anymore during dg-final Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: testsuite Assignee: unassigned at gcc dot gnu.org Reporter: vries at gcc dot gnu.org [ Reported before as PR65116. That one got hijacked for an unrelated problem. ] When running vect-simd-clone-10.c, a file vect-simd-clone-10a.c.126t.vect is left in the test directory. The testcase lists vect-simd-clone-10a.c as addditional source: ... /* { dg-additional-sources vect-simd-clone-10a.c } */ ... Then the test-case cleans up the respective tree-dump: ... /* { dg-final { cleanup-tree-dump "vect" } } */ ... The cleanup-tree-dump calls cleanup-dump, which intends to take additional_sources into account. However, the global additional_sources declaration is missing, so the exists additional_sources will always return false. And if we add the global additional_sources declaration, it still fails, because additional_sources is empty. It has been reset by dg-additional-files-options, which is called by gcc_target_compile, which is called by gcc-dg-test-1, which is called by gcc-dg-test, which is called by dg-test as ${tool}-dg-test. dg-test does the the dg-final-code processing after the ${tool}-dg-test so at that point additional_sources is empty.