public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/55220] New: [c++11] Internal error when doing partial template specialization on variadic template
@ 2012-11-06 12:52 alex.irger at gmail dot com
  2012-11-06 13:09 ` [Bug c++/55220] " redi at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: alex.irger at gmail dot com @ 2012-11-06 12:52 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 55220
           Summary: [c++11] Internal error when doing partial template
                    specialization on variadic template
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: alex.irger@gmail.com


GCC is reporting internal error when compiling the following well-formed (to my
belief) code:

#include <iostream>

template <typename ...> struct something_like_tuple 
{

};

template <typename, typename> struct is_last
{
    static const bool value = false;
};

template <typename T, template <typename ...> class Tuple, typename ... Head> 
struct is_last<T, Tuple<Head ..., T>>
{
    static const bool value = true;
};

int main(int argc, char* argv[])
{
    typedef something_like_tuple<char, int, float> something_like_tuple_t;

    std::cout << is_last<float, something_like_tuple_t>::value << std::endl; /*
<-- line 23 */
    std::cout << is_last<int, something_like_tuple_t>::value << std::endl;
}

g++ invoked as following:

g++ --std=c++11 test.cpp -o test

Output:
test.cpp: In function âint main(int, char**)â:
test.cpp:23:53: internal compiler error: in unify, at cp/pt.c:16952
Please submit a full bug report,
with preprocessed source if appropriate.

g++ -v
Using built-in specs.
COLLECT_GCC=##I believe not relevant##
COLLECT_LTO_WRAPPER=##I believe not relevant##
Target: i686-pc-linux-gnu
Configured with: ./configure --prefix=##I believe not relevant##
--enable-threads=posix --enable-shared --enable-checking=release
--enable-languages=c,c++ i686-pc-linux-gnu --with-mpc-include=##I believe not
relevant## --with-mpc-lib=##I believe not relevant##
Thread model: posix
gcc version 4.7.1 (GCC)


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

end of thread, other threads:[~2013-02-15 11:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-06 12:52 [Bug c++/55220] New: [c++11] Internal error when doing partial template specialization on variadic template alex.irger at gmail dot com
2012-11-06 13:09 ` [Bug c++/55220] " redi at gcc dot gnu.org
2012-11-06 13:28 ` redi at gcc dot gnu.org
2012-11-06 14:11 ` [Bug c++/55220] [c++11] ICE " paolo.carlini at oracle dot com
2012-11-06 14:39 ` redi at gcc dot gnu.org
2013-02-15  1:27 ` jason at gcc dot gnu.org
2013-02-15 11:18 ` 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).