public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/1731: Internal compiler error 191 for inherited overloaded operator[] on NULL
@ 2001-12-12  0:26 rodrigc
  0 siblings, 0 replies; 3+ messages in thread
From: rodrigc @ 2001-12-12  0:26 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/1731; it has been noted by GNATS.

From: rodrigc@gcc.gnu.org
To: C.vanReeuwijk@twi.tudelft.nl, gcc-bugs@gcc.gnu.org, gcc-gnats@gcc.gnu.org,
  gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org
Cc:  
Subject: Re: c++/1731: Internal compiler error 191 for inherited overloaded operator[] on NULL
Date: 12 Dec 2001 08:19:37 -0000

 Synopsis: Internal compiler error 191 for inherited overloaded operator[] on NULL
 
 State-Changed-From-To: analyzed->closed
 State-Changed-By: rodrigc
 State-Changed-When: Wed Dec 12 00:19:37 2001
 State-Changed-Why:
     Fixed in gcc 3.1 CVS.
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=1731&database=gcc


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

* Re: c++/1731: Internal compiler error 191 for inherited overloaded operator[] on NULL
@ 2001-12-12  0:19 rodrigc
  0 siblings, 0 replies; 3+ messages in thread
From: rodrigc @ 2001-12-12  0:19 UTC (permalink / raw)
  To: C.vanReeuwijk, gcc-bugs, gcc-gnats, gcc-prs, nobody

Synopsis: Internal compiler error 191 for inherited overloaded operator[] on NULL

State-Changed-From-To: analyzed->closed
State-Changed-By: rodrigc
State-Changed-When: Wed Dec 12 00:19:37 2001
State-Changed-Why:
    Fixed in gcc 3.1 CVS.

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


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

* c++/1731: Internal compiler error 191 for inherited overloaded operator[] on NULL
@ 2001-04-01  0:00 C.vanReeuwijk
  0 siblings, 0 replies; 3+ messages in thread
From: C.vanReeuwijk @ 2001-04-01  0:00 UTC (permalink / raw)
  To: gcc-gnats

>Number:         1731
>Category:       c++
>Synopsis:       Internal compiler error 191 for inherited overloaded operator[] on NULL
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 22 09:56:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Kees van Reeuwijk
>Release:        gcc version 2.95.2 19991024 (release)
>Organization:
>Environment:
Debian linux 2.2
>Description:
This is a refinement of my bug report c++/1065 of
december 2000: I have simplified the example program considerably.

The following C++ program causes an internal compiler error:

--------
class ShapeBase
{
  public:
    int& operator[]( const int i ) const { 0; }
 
};
 
class ShapeD1: public ShapeBase
{
};
 
int main( int argc, char *argv[] )
{
    int n = (*(ShapeD1 *) 0)[0];
}                                                          ---------------

The fact that operator[] is inherited is important:
replacing ShapeD1 with ShapeBase in main() causes the
problem to go away.

It may be argued that the shown program is incorrect, since it tries to use a NULL pointer, but that's not a reason for an ICE. Moreover, constant propagation by the
compiler can cause the same situation and hence the same ICE.
>How-To-Repeat:
Compile the program above. No special flags are necessary.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
>From neil@gcc.gnu.org Sun Apr 01 00:00:00 2001
From: neil@gcc.gnu.org
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org
Subject: Re: c/1012
Date: Sun, 01 Apr 2001 00:00:00 -0000
Message-id: <20010226195603.8647.qmail@sourceware.cygnus.com>
X-SW-Source: 2001-q1/msg01758.html
Content-length: 507

The following reply was made to PR c/1012; it has been noted by GNATS.

From: neil@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org, nobody@gcc.gnu.org, peter.dufault@efi.com
Cc:  
Subject: Re: c/1012
Date: 26 Feb 2001 19:51:45 -0000

 Synopsis: Linker output error; cannot find a description
 
 State-Changed-From-To: open->closed
 State-Changed-By: neil
 State-Changed-When: Mon Feb 26 11:51:44 2001
 State-Changed-Why:
     Not a bug report.
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=1012&database=gcc


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

end of thread, other threads:[~2001-12-12  8:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-12  0:26 c++/1731: Internal compiler error 191 for inherited overloaded operator[] on NULL rodrigc
  -- strict thread matches above, loose matches on Subject: below --
2001-12-12  0:19 rodrigc
2001-04-01  0:00 C.vanReeuwijk

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