public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13289] New: internal compiler error : regenerate_decl_from_template, at cp/pt.c:10131
@ 2003-12-03 23:50 gianni at mariani dot ws
  2003-12-03 23:54 ` [Bug c++/13289] [3.3/3.4 Regression] " pinskia at gcc dot gnu dot org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: gianni at mariani dot ws @ 2003-12-03 23:50 UTC (permalink / raw)
  To: gcc-bugs

I can understand why this code has problems - it is recursive, I need to find a
way to make it not be so !  But the compiler spits out an "internal compiler
error" that probably needs a look at.

template <typename T, T N>
struct bit_count_templ
{
        static const T bit_count;
};

template <typename T, T N>
const T bit_count_templ<T,N>::bit_count = 1 + ( N == 0 ? 0 : bit_count_templ<T,
N & ( N -1 ) >::bit_count );


#include <iostream>

int main()
{
        std::cout << bit_count_templ<long,0x256500LL>::bit_count;
}

g++ -Wreturn-type -W -Wpointer-arith -pipe -ggdb3 -fcheck-new -fPIC 
-D_POSIX_THREADS -D_POSIX_THREAD_SAFE_FUNCTIONS -D_REENTRANT  templ_bitcount.cpp
  -o templ_bitcount
templ_bitcount.cpp: In instantiation of `const long int bit_count_templ<long
int, 0>::bit_count':
templ_bitcount.cpp:10:   instantiated from `const long int bit_count_templ<long
int, 0>::bit_count'
templ_bitcount.cpp:10:   instantiated from `const long int bit_count_templ<long
int, 2097152>::bit_count'
templ_bitcount.cpp:10:   instantiated from `const long int bit_count_templ<long
int, 2359296>::bit_count'
templ_bitcount.cpp:10:   instantiated from `const long int bit_count_templ<long
int, 2424832>::bit_count'
templ_bitcount.cpp:10:   instantiated from `const long int bit_count_templ<long
int, 2441216>::bit_count'
templ_bitcount.cpp:10:   instantiated from `const long int bit_count_templ<long
int, 2449408>::bit_count'
templ_bitcount.cpp:10:   instantiated from `const long int bit_count_templ<long
int, 2450432>::bit_count'
templ_bitcount.cpp:10:   instantiated from `const long int bit_count_templ<long
int, 2450688>::bit_count'
templ_bitcount.cpp:17:   instantiated from here
templ_bitcount.cpp:10: internal compiler error: in 
   regenerate_decl_from_template, at cp/pt.c:10131
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

-- 
           Summary: internal compiler error : regenerate_decl_from_template,
                    at cp/pt.c:10131
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gianni at mariani dot ws
                CC: gcc-bugs at gcc dot gnu dot org


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


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

end of thread, other threads:[~2004-01-21  3:26 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-03 23:50 [Bug c++/13289] New: internal compiler error : regenerate_decl_from_template, at cp/pt.c:10131 gianni at mariani dot ws
2003-12-03 23:54 ` [Bug c++/13289] [3.3/3.4 Regression] " pinskia at gcc dot gnu dot org
2003-12-04 17:11 ` [Bug c++/13289] ICE in regenerate_decl_from_template on recursive template bangerth at dealii dot org
2003-12-04 17:15 ` bangerth at dealii dot org
2003-12-04 17:26 ` [Bug c++/13289] [3.3/3.4 regression] " reichelt at gcc dot gnu dot org
2003-12-04 19:54 ` bangerth at dealii dot org
2003-12-19 14:39 ` lerdsuwa at gcc dot gnu dot org
2003-12-20 20:35 ` pinskia at gcc dot gnu dot org
2003-12-24 16:21 ` lerdsuwa at gcc dot gnu dot org
2003-12-29 11:35 ` cvs-commit at gcc dot gnu dot org
2003-12-29 11:58 ` lerdsuwa at gcc dot gnu dot org
2004-01-12 20:10 ` cvs-commit at gcc dot gnu dot org
2004-01-12 20:11 ` [Bug c++/13289] [3.3 " pinskia at gcc dot gnu dot org
2004-01-21  3:26 ` cvs-commit at gcc dot gnu dot org
2004-01-21  3:26 ` gdr at gcc dot gnu dot org

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).