The testcase below generates a segmentation fault in g++ 4.0.0 to 4.2.0.

/tmp/test.cpp:3: internal compiler error: Segmentation fault

--GCC Info--
Version: g++ (GCC) 4.2.0 20060615 (experimental) SVN revision 114692
(Also tested on g++ (GCC) 4.0.2 20051125 (Red Hat 4.0.2-8))

Configure command: ../configure --prefix=`pwd`/../install
--enable-languages=c++
System: Linux 2.6.16-1.2111_FC4 #1 Sat May 20 19:59:40 EDT 2006 i686 i686 i386
GNU/Linux

--Testcase--
template<typename T> struct Boom;

template<typename T, bool D = Boom<T>::Internal::Value> // <--ICE
    struct Foo
{
};

template<typename T> struct Boom
{
    struct Internal
    {
        static const bool Value = false;
    };
};


-- 
           Summary: ICC on accessing member of dependent name
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gcc dot gnu dot org at chosenones dot dyndns dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28048

Reply via email to