https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128455
Bug ID: 128455
Summary: Build-tree libgomp/C++, libitm/C++ testing vs. DejaGnu
1.5.3 'find_g++'
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Keywords: testsuite-fail
Severity: minor
Priority: P3
Component: testsuite
Assignee: unassigned at gcc dot gnu.org
Reporter: tschwinge at gcc dot gnu.org
CC: pietro at gcc dot gnu.org
Target Milestone: ---
Per 'gcc/doc/install.texi', we require "DejaGnu version 1.5.3 (or later)"
(2015).
cfarm220 has DejaGnu 1.5.3 installed ('/usr/local/').
With this, I'm seeing all build-tree libgomp/C++ testing fail, for example:
FAIL: libgomp.c++/../libgomp.c-c++-common/atomic-18.c (test for excess
errors)
Excess errors:
default_target_compile: Can't find g++.
UNRESOLVED: libgomp.c++/../libgomp.c-c++-common/atomic-18.c compilation
failed to produce executable
This is because 'libgomp/testsuite/lib/libgomp.exp:libgomp_init', 'set
GXX_UNDER_TEST "[find_g++]"' sets 'GXX_UNDER_TEST' to plain 'g++' instead of
pointing to the build-tree 'xg++' (which works fine for 'GCC_UNDER_TEST',
'GFORTRAN_UNDER_TEST').
'find_g++' is in DejaGnu 'libgloss.exp', and that 1.5.3 one only looks for
'g++'; slightly more modern ones first look for 'xg++' (as is necessary for
build-tree GCC testing). (Implemented in DejaGnu 1.6, via 2016-03-28 DejaGnu
commit d8cd1783d80409d2a6258724810023465f331194: "lib/libgloss.exp (find_g++):
Look for xgcc++ to use the freshly built compiler, then look in the path.")
Same for libitm/C++ testing, which uses the same idioms.
FAIL: libitm.c++/dropref.C (test for excess errors)
Excess errors:
default_target_compile: Can't find g++.
UNRESOLVED: libitm.c++/dropref.C compilation failed to produce executable
C++ compiler-side testing doesn't run into this issue as
'gcc/testsuite/lib/g++.exp:g++_init' has a variant of 'find_g++' inlined that
directly points to the build-tree 'xg++'.
Similarly in 'libstdc++-v3/testsuite/lib/libstdc++.exp:libstdc++_init'.
For reference: I introduced the libgomp 'find_g++' usage in commit
r14-853-g982c869ec00c72176ddede9c0e3068c76dc871d2 "libgomp testsuite: As
appropriate, use the 'gcc', 'g++', 'gfortran' driver [PR91884]", which in
libitm Pietro similarly implemented recently in commit
r16-7479-g66ce317036f2eb5aeb96d5e4b9e468799d7566b6 "libitm: Fix recent libitm
testsuite regression [PR69018]".