This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/6273: GCC 2.95.3-5 prints internal error.
- From: comer at mailru dot com
- To: gcc-gnats at gcc dot gnu dot org
- Date: 12 Apr 2002 13:20:32 -0000
- Subject: c++/6273: GCC 2.95.3-5 prints internal error.
- Reply-to: comer at mailru dot com
>Number: 6273
>Category: c++
>Synopsis: GCC 2.95.3-5 prints internal error.
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: ice-on-legal-code
>Submitter-Id: net
>Arrival-Date: Fri Apr 12 06:26:03 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Sergey Shandar
>Release: 2.95.3-5
>Organization:
>Environment:
Windows 2000 and Linux Mandrake.
>Description:
main.cpp: In instantiation of `TableMap<int>':
main.cpp:18: instantiated from here
main.cpp:10: Internal compiler error 19970302.
main.cpp:10: Please submit a full bug report.
main.cpp:10: See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
>How-To-Repeat:
class Map
{
};
template<class Type> class TableMap : public Map
{
public:
enum { Index_max = 10 };
int items[Index_max+1];
};
template<class TypeA, class TypeB>
TypeA operator+(const TypeA& a, const TypeB& b)
{
return TypeA(a)+=b;
}
TableMap<int> CharDFS;
int main(void)
{
}
>Fix:
I don't know how to fix the problem.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="main.cpp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="main.cpp"
Y2xhc3MgTWFwDQp7DQp9Ow0KDQp0ZW1wbGF0ZTxjbGFzcyBUeXBlPiBjbGFzcyBUYWJsZU1hcCA6
IHB1YmxpYyBNYXANCnsNCnB1YmxpYzoNCgllbnVtIHsgSW5kZXhfbWF4ID0gMTAgfTsNCglpbnQg
aXRlbXNbSW5kZXhfbWF4KzFdOw0KfTsNCg0KdGVtcGxhdGU8Y2xhc3MgVHlwZUEsIGNsYXNzIFR5
cGVCPg0KVHlwZUEgb3BlcmF0b3IrKGNvbnN0IFR5cGVBJiBhLCBjb25zdCBUeXBlQiYgYikNCnsN
CglyZXR1cm4gVHlwZUEoYSkrPWI7DQp9DQoNClRhYmxlTWFwPGludD4gQ2hhckRGUzsNCg0KaW50
IG1haW4odm9pZCkNCnsNCn0NCg0K