public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/6273: GCC 2.95.3-5 prints internal error.
@ 2002-04-12 18:20 rodrigc
  0 siblings, 0 replies; 2+ messages in thread
From: rodrigc @ 2002-04-12 18:20 UTC (permalink / raw)
  To: comer, gcc-bugs, gcc-prs, nobody

Synopsis: GCC 2.95.3-5 prints internal error.

State-Changed-From-To: open->analyzed
State-Changed-By: rodrigc
State-Changed-When: Fri Apr 12 18:20:13 2002
State-Changed-Why:
    Compiling with gcc 3.1 results in the following compiler
    error:
    
    main.cpp: In instantiation of `TableMap<int>':
    main.cpp:18:   instantiated from here
    main.cpp:6: Internal compiler error in tree_low_cst, at tree.c:3471
    Please submit a full bug report,
    with preprocessed source if appropriate.
    See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
    
    
    If I compile with:
    g++ -Wall -pedantic-errors main.cpp
    
    I get:
    
    main.cpp: In instantiation of `TableMap<int>':
    main.cpp:18:   instantiated from here
    main.cpp:9: ISO C++ forbids variable-size array
    main.cpp:6: confused by earlier errors, bailing out
    
    
    You can work around this problem by changing:
    
    int items[Index_max+1];
    
    to:
    
    int items[Index_max];
    
    
    This is a problem in gcc that should be fixed.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6273


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

* c++/6273: GCC 2.95.3-5 prints internal error.
@ 2002-04-12  6:26 comer
  0 siblings, 0 replies; 2+ messages in thread
From: comer @ 2002-04-12  6:26 UTC (permalink / raw)
  To: gcc-gnats


>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


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

end of thread, other threads:[~2002-04-13  1:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-12 18:20 c++/6273: GCC 2.95.3-5 prints internal error rodrigc
  -- strict thread matches above, loose matches on Subject: below --
2002-04-12  6:26 comer

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).