https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77787
--- Comment #1 from petschy at gmail dot com --- That last function in json.hpp was gutted: //template<typename T> int foo(int div_) { ASSERT(div_ == 0); return 0; } Removed the assertions from all the template functions, as this moved the crash location upward, then section type conflicts started to appear. Commented out the assertions from back to front until the point where the code compiled. Lots of assertions remained that didn't cause trouble. Now I have an assert() in a plain member function of a plain class. Then lots of assertions in inline functions and static functions of fully specialized class templates. At the end I have the foo fn as above. If the template line is commented out, 'section type conflict' is the result, no crash. If I comment out the assert in foo() or in the plain member, it compiles. If both assertions are active, and I uncomment the //template line, it crashes. Unfortunately, the test still can't reproduce the behaviour, though I put in there a class, and a class template specialization, too. It also turned out that function templates ignore the section attribute on the static variable inside, gotcha. That's why I didn't get conflicts in the first version of the test. Moreover, the 'inline' on the Helper::Get() function is ignored, so the section of the static variable inside will not be flagged as "aG" always, but as "a" or as "aG" depending on the inline status of the outside function using the assert(). That's why I did get conflicts at all.