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]
Other format: [Raw text]

[Bug c++/33965] New: internal compiler error: tree check: expected class 'type', have 'constant' (integer_cst) in cp_type_quals, at cp/typeck.c:6955 (vararg templates)


In the following SFINAE scenario involving vararg templates an non-type
template parameters, the compiler ICEs instead of ignoring the specialization.

Latest SVN g++ with patches from Doug Gregor for vararg templates.

template<typename T>
struct foo
{
    static bool const value = false;
};

template<template<typename...> class T, typename... Args>
struct foo<T<Args...> >
{
    static bool const value = false;
};

template<int I>
struct int_
{};

int main()
{
    foo<int_<0> > f; // ICE
}


-- 
           Summary: internal compiler error: tree check: expected class
                    'type', have 'constant' (integer_cst) in cp_type_quals,
                    at cp/typeck.c:6955 (vararg templates)
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: eric dot niebler at gmail dot com


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


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