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



             Bug #: 55494

           Summary: ICE for char array or int in variadic template

    Classification: Unclassified

           Product: gcc

           Version: 4.7.2

            Status: UNCONFIRMED

          Severity: normal

          Priority: P3

         Component: c++

        AssignedTo: unassig...@gcc.gnu.org

        ReportedBy: jondre...@gmail.com





The following code generates internal compiler error: in unify_one_argument, at

cp/pt.c:15267

The error is generated if the template argument to Foo is a char array or int.

It is not generated if it is a struct.



gcc version 4.7.2.20120921 (Red Hat 4.7.2-2)

Target: x86_64-redhat-linux







struct S {};



template <char const * Name>

struct Foo {};



template <typename...Args>

void operator<<(S& os, Foo<Args...>& m)

{

}



char test[] = "test";



int main()

{

    S s;

    Foo<test> m;

    s << m;

}

Reply via email to