Created attachment 44598 [details]
File to reproduce the issue
The new IO extension from GIL (boost 1.68.0) takes a very long time to compile with g++ 8.2.0 compared to clang++ 5 or 6. Note that this is also true with g++ 6 and 7 but not with g++ 5. I also opened an issue at boost::gil:
I was able to identify which code exactly takes so much time to compile and I was able to make it independent from any external libraries, in particular from boost (MPL and GIL). See the attached file "gcc-is-long-minimum-and-standalone.cpp".
With this particular program, g++ 8.2.0 is 53x longer than clang 6.0 on my x86_64 linux computer (8.175 s vs 0.152 s).
The command line is:
g++-8.2.0 -o out.o -c -O2 -DNDEBUG -std=c++14 Progs/gcc-is-long-minimum-and-standalone.cpp
clang++ -o out.o -c -O2 -DNDEBUG -std=c++14 Progs/gcc-is-long-minimum-and-standalone.cpp
There was similar bug reported to GCC 8.1, fixed in 8.2
However, I'm not seeing any improvement compiling the Frédéric's sample gcc-is-long-minimum-and-standalone.cpp with GCC 8.2 on Linux.
Yes, I've seen that one and saw it was fixed before 8.2.0. I wasn't sure actually if it was included in 8.2.0 as it was solved few weeks before 8.2.0 was out.