public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "zsojka at seznam dot cz" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/46564] New: [4.6 Regression] ICE: in decl_constant_var_p, at cp/decl2.c:3562 on invalid recursive initialization
Date: Fri, 19 Nov 2010 16:12:00 -0000	[thread overview]
Message-ID: <bug-46564-4@http.gcc.gnu.org/bugzilla/> (raw)

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

           Summary: [4.6 Regression] ICE: in decl_constant_var_p, at
                    cp/decl2.c:3562 on invalid recursive initialization
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zsojka@seznam.cz


------- testcase.C --------
template < int N > struct X {
  static const int value = X<N>::value;
};
template struct X<1000>;
---------------------------

Compiler output:
$ gcc testcase.C
testcase.C:2:34: error: template instantiation depth exceeds maximum of 1024
(use -ftemplate-depth= to increase the maximum) instantiating 'X<1000>::value'
testcase.C:2:34:   recursively instantiated from 'const int X<1000>::value'
testcase.C:2:34:   instantiated from 'const int X<1000>::value'
testcase.C:4:17:   instantiated from here

testcase.C:2:34: error: template instantiation depth exceeds maximum of 1024
(use -ftemplate-depth= to increase the maximum) instantiating 'X<1000>::value'
testcase.C:2:34:   recursively instantiated from 'const int X<1000>::value'
testcase.C:2:34:   instantiated from 'const int X<1000>::value'
testcase.C:4:17:   instantiated from here

testcase.C:2:34: internal compiler error: in decl_constant_var_p, at
cp/decl2.c:3562
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Tested revisions:
r166936 - crash
r165699 - OK
4.5 r166509 - OK


             reply	other threads:[~2010-11-19 16:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-19 16:12 zsojka at seznam dot cz [this message]
2010-11-19 19:37 ` [Bug c++/46564] " jakub at gcc dot gnu.org
2010-11-19 21:47 ` hjl.tools at gmail dot com
2010-12-08 20:54 ` gcc at abeckmann dot de
2011-01-07 12:00 ` zsojka at seznam dot cz
2011-03-11 17:47 ` jason at gcc dot gnu.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=bug-46564-4@http.gcc.gnu.org/bugzilla/ \
    --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).