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]

c++/1638: ICE: two void_type nodes in arg_types list



>Number:         1638
>Category:       c++
>Synopsis:       ICE: two void_type nodes in arg_types list
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 12 15:06:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Artem Khodush
>Release:        20010108 snapshot
>Organization:
>Environment:
RedHat Linux 6.2 i386
>Description:
The testcase

template< class T > struct S {
  int f( T ) { return 0; }
};

int main() {
	S<void> s;
	return s.f();
}


bug3.cxx: In instantiation of `S<void>':
bug3.cxx:7:   instantiated from here
bug3.cxx:3: Internal error #20000523.
bug3.cxx:3: Internal compiler error in write_method_parms, at cp/mangle.c:1580
Please submit a full bug report.
 See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

When a template argument is void, arg_types list for S::f after tsubst() contains two void_type_nodes, which causes an
ICE at cp/mangle.c:1580.


>How-To-Repeat:

>Fix:
?? Check for this special case somewhere in tsubst, and remove extra void_type_node ?
>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]