https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110395
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- On the trunk it takes no time at all: [apinski@xeond2 upstream-gcc-git]$ ~/upstream-gcc/bin/g++ t.cc --coverage [apinski@xeond2 upstream-gcc-git]$ LD_LIBRARY_PATH=~/upstream-gcc/lib64 ./a.out [apinski@xeond2 upstream-gcc-git]$ LD_LIBRARY_PATH=~/upstream-gcc/lib64 ~/upstream-gcc/bin/gcov t.cc t.gcno:cannot open notes file t.gcda:cannot open data file, assuming not executed No executable lines [apinski@xeond2 upstream-gcc-git]$ LD_LIBRARY_PATH=~/upstream-gcc/lib64 ~/upstream-gcc/bin/gcov a-t.cc File '/home/apinski/upstream-gcc/include/c++/14.0.0/bits/stl_construct.h' Lines executed:100.00% of 4 Creating 'stl_construct.h.gcov' File '/home/apinski/upstream-gcc/include/c++/14.0.0/bits/new_allocator.h' Lines executed:50.00% of 4 Creating 'new_allocator.h.gcov' File '/home/apinski/upstream-gcc/include/c++/14.0.0/bits/stl_vector.h' Lines executed:95.45% of 22 Creating 'stl_vector.h.gcov' File '/home/apinski/upstream-gcc/include/c++/14.0.0/bits/alloc_traits.h' Lines executed:66.67% of 3 Creating 'alloc_traits.h.gcov' File '/home/apinski/upstream-gcc/include/c++/14.0.0/bits/allocator.h' Lines executed:100.00% of 1 Creating 'allocator.h.gcov' File 't.cc' Lines executed:100.00% of 5 Creating 't.cc.gcov' File '/home/apinski/upstream-gcc/include/c++/14.0.0/array' No executable lines Removing 'array.gcov' Lines executed:89.74% of 39 real 0m0.043s user 0m0.004s sys 0m0.002s