public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/46564] New: [4.6 Regression] ICE: in decl_constant_var_p, at cp/decl2.c:3562 on invalid recursive initialization
@ 2010-11-19 16:12 zsojka at seznam dot cz
  2010-11-19 19:37 ` [Bug c++/46564] " jakub at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: zsojka at seznam dot cz @ 2010-11-19 16:12 UTC (permalink / raw)
  To: gcc-bugs

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


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

end of thread, other threads:[~2011-03-11 17:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-19 16:12 [Bug c++/46564] New: [4.6 Regression] ICE: in decl_constant_var_p, at cp/decl2.c:3562 on invalid recursive initialization zsojka at seznam dot cz
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

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