This failure was hidden until we started to run the test by fixing the filename earlier: ignore -Wtemplate-body using a pragma like e.g. g++.dg/lto/20101010-1_0.C does because lto.exp doesn't support dg-additional-options.
gcc/testsuite/ChangeLog: PR lto/47333 * g++.dg/lto/pr47333_0.C: Ignore -Wtemplate-body. --- gcc/testsuite/g++.dg/lto/pr47333_0.C | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/testsuite/g++.dg/lto/pr47333_0.C b/gcc/testsuite/g++.dg/lto/pr47333_0.C index 60873ca07c7a..b171c8cb9604 100644 --- a/gcc/testsuite/g++.dg/lto/pr47333_0.C +++ b/gcc/testsuite/g++.dg/lto/pr47333_0.C @@ -1,3 +1,6 @@ +/* "WARNING: lto.exp does not support dg-additional-options" */ +#pragma GCC diagnostic ignored "-Wtemplate-body" + namespace std { typedef unsigned int size_t; -- 2.47.0