https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123184
Bug ID: 123184
Summary: libstdc++ parallel_mode tests include omp.h without a
proper include path
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: testsuite
Assignee: unassigned at gcc dot gnu.org
Reporter: xry111 at gcc dot gnu.org
Target Milestone: ---
For example, testsuite/17_intro/headers/c++2011/parallel_mode.cc contains:
#if __has_include(<omp.h>)
# define _GLIBCXX_PARALLEL 1
# include <bits/extc++.h>
#endif
But it's not compiled with a proper -I/path/to/build/$triple/libgomp, making
the test useless unless the build is installed first.
To make things worse, if at the prefix configured for this GCC build there is
already a previous GCC installation, the omp.h from the old installation will
be picked up, causing strange test failures that we cannot debug easily.