c++/508: ICE on ,unusual´ template use

tanis@gaspode.franken.de tanis@gaspode.franken.de
Tue Sep 5 14:26:00 GMT 2000


>Number:         508
>Category:       c++
>Synopsis:       ICE on ,unusual´ template use
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Tue Sep 05 14:26:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     German Tischler
>Release:        unknown-1.0
>Organization:
>Environment:
gcc version 2.95.2 19991024 (release)
FreeBSD
>Description:
gcc ices during template instantiation of an operator
when two (or more) template parameters are present
and template parameter m is of type provided by
parameter n (n < m). Source code is

//---

template <typename N,N e> struct A {};
template <typename N,N e> void operator<< (int, A<N,e> const & o) {}

int main()
{ 
        A<bool,0> a;
        operator<< <bool,0>(0,a); 
}

//---
>How-To-Repeat:
try to compile the above source
>Fix:
workaround: don´t use the above construction
(I cannot imagine where it would be hard to work around
it)
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="dumb4.ii"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="dumb4.ii"

IyAxICJkdW1iNC5jcHAiCnRlbXBsYXRlIDx0eXBlbmFtZSBOLE4gZT4gc3RydWN0IEEge307CnRl
bXBsYXRlIDx0eXBlbmFtZSBOLE4gZT4gdm9pZCBvcGVyYXRvcjw8IChpbnQsIEE8TixlPiBjb25z
dCAmIG8pIHt9CgppbnQgbWFpbigpCnsgCglBPGJvb2wsMD4gYTsKCW9wZXJhdG9yPDwgPGJvb2ws
MD4oMCxhKTsgCn0K


More information about the Gcc-bugs mailing list