public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Volker Reichelt <reichelt@igpm.rwth-aachen.de>
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: c++/9443: ICE in resolve_scoped_fn_name, at cp/call.c:2604
Date: Fri, 31 Jan 2003 15:56:00 -0000	[thread overview]
Message-ID: <20030131155601.18844.qmail@sources.redhat.com> (raw)

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

From: Volker Reichelt <reichelt@igpm.rwth-aachen.de>
To: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org, larsbj@gullik.net
Cc:  
Subject: Re: c++/9443: ICE in resolve_scoped_fn_name, at cp/call.c:2604
Date: Fri, 31 Jan 2003 17:50:18 +0100

 That was really a tough one, but here's a shorter testcase, nevertheless:
 
 -----------------------------snip here------------------------------
 struct A
 {
     int i;
 };
 
 template <int> struct B
 {
     int foo() { return A::i; } // illegal
 };
 
 void bar() { B<0>().foo(); }
 -----------------------------snip here------------------------------
 
 With gcc 3.4-20030127 I get the following ICE (which matches the submitter's):
 
 PR9443.ii: In member function `void* B<<anonymous> >::foo() [with int 
    <anonymous> = 0]':
 PR9443.ii:11:   instantiated from here
 PR9443.ii:8: internal compiler error: in c_expand_expr, at c-common.c:4338
 Please submit a full bug report, [etc.]
 
 So that's in fact an ice-on-illegal-code. (Wolfgang, you got a different
 ICE, did you configure your compiler with --enable-checking?)
 
 When I get rid of the unused template parameter, I get a segfault instead.
 
 Even stranger: If I replace "return A::i;" by "return A::j;" the code compiles,
 although "j" is defined nowhere. So that's an additional accepts-illegal.
 
 Since we get no error message with 3.2/3.3 branch, I rate this as a
 regression. (Although the error message is a little misleading:
 PR9443.ii:8: error: type `A' is not a base type for type `B<0>')
 
 Regards,
 Volker
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9443
 
 


             reply	other threads:[~2003-01-31 15:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-31 15:56 Volker Reichelt [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-01-31 16:16 Volker Reichelt
2003-01-29  9:46 Giovanni Bajo
2003-01-28 15:36 bangerth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030131155601.18844.qmail@sources.redhat.com \
    --to=reichelt@igpm.rwth-aachen.de \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=nobody@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).