public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gianni at mariani dot ws" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/13289] New: internal compiler error : regenerate_decl_from_template, at cp/pt.c:10131
Date: Wed, 03 Dec 2003 23:50:00 -0000	[thread overview]
Message-ID: <20031203235040.13289.gianni@mariani.ws> (raw)

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


             reply	other threads:[~2003-12-03 23:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-03 23:50 gianni at mariani dot ws [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20031203235040.13289.gianni@mariani.ws \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).