This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c++/10150: Internal compiler error generated by stupid template code


>Number:         10150
>Category:       c++
>Synopsis:       Internal compiler error generated by stupid template code
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          ice-on-illegal-code
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 19 14:26:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Tom Evans
>Release:        3.2.1
>Organization:
>Environment:
djgpp, Win98.
>Description:
When I try to compile the code given, I get an internal compiler error.  I can't test it on a proper gcc easily, so this is only in djgpp.  So if you can't reproduce it straight away, chuck this report in the bin.

Note no workaround is needed - the code is stupid, I just thought it still shouldn't generate an internal error.

Attempted compile with 'gxx -c a.cc', got:

a.cc: In instantiation of `Pow<0>::In<0>':
a.cc:9:   instantiated from here
a.cc:9: Internal compiler error in resolve_offset_ref, at cp/init.c:1891
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
>How-To-Repeat:
template <int N>
struct Pow {
  template <int Val>
  struct In {
    enum { value = Val * Pow<N-1>::In };
  };
};

Pow<0>::In<0> a;
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]