This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

c++:ICE on typename ::template scoperef combo


The attached file causes the following error messages when submitted to the online compiler
at http://www.codesourcery.com/cgi-bin/gcc-compile.py:

Exit code: 256

Messages:

     /tmp/@16991.7.cc: In instantiation of `TdefTmpl':
     /tmp/@16991.7.cc:62: instantiated from here
     /tmp/@16991.7.cc:50: Internal error: Segmentation fault.
     Please submit a full bug report.
     See for instructions.

I believe the problem occurs in  pt.c:convert_template_argument because
no provision is made for  the following condition:

            TREE_CODE (arg) == SCOPE_REF
    && TREE_CODE (TREE_OPERAND (arg, 0)) == NAMESPACE_DECL
    && TREE_CODE (TREE_OPERAND (arg, 1)) == IDENTIFIER_NODE

the segfault occurs in convert_nontype_argument where  TREE_TYPE(expr),
where, if TREE_CODE(expr)==SCOPE_REF, a null is returned.


  namespace
EnumNs
  {
    enum
  Enum0
    { E0_0
    , E0_1
    , E0_2
    }
    ;
	}
	;//end EnumNs namespace
//================================= 
template
  < typename Out_Type_FARG0
  >
  class
OutTmpl
  {
  public:
    template
      < EnumNs::Enum0 In_Enum_FARG0
      >
      class
    InTmpl
      {
      }
      ;//end InTmpl class
  }
  ;//end OutTmpl class
//================================= 
template
  < EnumNs::Enum0 Tdef_Enum_FARG0
  , typename Tdef_Type_FARG1
  >
  class
TdefTmpl
  {
  public:
        typedef
      OutTmpl<Tdef_Type_FARG1>
    OutType
      ;
        typedef
      typename 
			OutType::
			template
        InTmpl<EnumNs::E0_1>
    OutInType
      ;
  }
  ;//end TdefTmpl class
//================================= 
  class
TestType
  {
  }
  ;//end TestType class
//================================= 
  TdefTmpl<EnumNs::E0_2, TestType> 
w
  ;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]