https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68010
--- Comment #6 from Andrey Chistyakov <ghoort1 at gmail dot com> --- I simplified the Marcus' code: Ghoort@blade /cygdrive/c/Projects/bug $ cat c2.cpp namespace boost {} template <typename> struct C { }; template <typename Skipper> class StructDecoder : C<Skipper> { public: StructDecoder() { namespace bs = boost; using namespace bs; } }; void NFGParserparse() { StructDecoder<int> q_syslog_desc; } Ghoort@blade /cygdrive/c/Projects/bug $ g++ -c -g c2.cpp c2.cpp: In constructor «StructDecoder<Skipper>::StructDecoder() [with Skipper = int]»: c2.cpp:12:3: internal compiler error: в tree_to_shwi, в tree.h:3661 } ^ Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions.