public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/55494] New: ICE for char array or int in variadic template
@ 2012-11-27 18:45 jondreads at gmail dot com
  2012-11-27 18:50 ` [Bug c++/55494] " mpolacek at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: jondreads at gmail dot com @ 2012-11-27 18:45 UTC (permalink / raw)
  To: gcc-bugs


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: unassigned@gcc.gnu.org
        ReportedBy: jondreads@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;
}


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-11-28 17:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-27 18:45 [Bug c++/55494] New: ICE for char array or int in variadic template jondreads at gmail dot com
2012-11-27 18:50 ` [Bug c++/55494] " mpolacek at gcc dot gnu.org
2012-11-27 18:55 ` mpolacek at gcc dot gnu.org
2012-11-28 12:38 ` rguenth at gcc dot gnu.org
2012-11-28 17:40 ` paolo.carlini at oracle dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).