public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/11432] New: ICE with int templates and static members, regression from 2.95 and 3.3
@ 2003-07-04  9:57 benko at sztaki dot hu
  2003-07-04 21:49 ` [Bug c++/11432] " bangerth at dealii dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: benko at sztaki dot hu @ 2003-07-04  9:57 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: ICE with int templates and static members, regression
                    from 2.95 and 3.3
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: benko at sztaki dot hu
                CC: gcc-bugs at gcc dot gnu dot org

This example is a brainless reduction of a code I can't understand,
but it compiled so long.  I know no workaround.


arta:~/c/proba$ cat templ_shift1.cc
template <int A>
struct a
{
  static int const value = A - 1;
};

template <int B>
struct b
{
  static int foo()
  {
    return a<L>::value;
  }

  static int const L = a<B + 1>::value;
};


int
main()
{
  return b<1>::foo();
}
arta:~/c/proba$ g++-cvs -v
Reading specs from /gml/shared/gcc-cvs/lib/gcc-lib/i686-pc-linux-gnu/3.4/specs
Configured with: ../gcc/configure --prefix=/gml/shared/gcc-cvs
--enable-languages=c++
Thread model: posix
gcc version 3.4 20030703 (experimental)
arta:~/c/proba$ g++-cvs templ_shift1.cc
templ_shift1.cc: In static member function `static int b<B>::foo() [with int B 
   = 1]':
templ_shift1.cc:4:   instantiated from `const int a<1>::value'
templ_shift1.cc:12:   instantiated from `static int b<B>::foo() [with int B =
1]'
templ_shift1.cc:22:   instantiated from here
templ_shift1.cc:4: internal compiler error: in instantiate_decl, at cp/pt.c:
   10812
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
zsh: exit 1     g++-cvs templ_shift1.cc
arta:~/c/proba$


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

end of thread, other threads:[~2003-09-07  3:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-04  9:57 [Bug c++/11432] New: ICE with int templates and static members, regression from 2.95 and 3.3 benko at sztaki dot hu
2003-07-04 21:49 ` [Bug c++/11432] " bangerth at dealii dot org
2003-07-15 15:24 ` [Bug c++/11432] [3.4 Regression] " pinskia at physics dot uc dot edu
2003-07-29 14:19 ` pinskia at physics dot uc dot edu
2003-09-07  3:43 ` cvs-commit 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).