g++ crashes on the following code: $ g++ -c x.cc x.cc: In member function `void Message<Sender>::ostr() const [with Sender = int]': x.cc:16: instantiated from here x.cc:12: internal compiler error: in build_base_path, at cp/class.c:274 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions. $ Release: 3.3 20020917 (experimental) Environment: System: Linux karma 2.4.19-emp_2419p5a829i #1 Tue Sep 3 17:42:17 EST 2002 i686 unknown Architecture: i686 <machine, os, target, libraries (multiple lines)> host: i686-pc-linux-gnu build: i686-pc-linux-gnu target: i686-pc-linux-gnu configured with: ../gcc/configure --prefix=/usr/local/gcc --enable-threads=posix --enable-long-long : (reconfigured) : (reconfigured) How-To-Repeat: ---------------------- struct AbsMessage { virtual void ostr() const; }; class SenderMessage : public virtual AbsMessage {}; template<class Sender> struct Message : public SenderMessage { void ostr() const { SenderMessage::ostr(); } }; template Message<int>; ---------------------- Unformatted: SEND-PR: Leave "Confidential" as "no"; all GCC PRs are public. SEND-PR: critical GCC is completely not operational; no work-around known. SEND-PR: serious GCC is not working properly; a work-around is possible. SEND-PR: non-critical Report indicates minor problem. SEND-PR: medium The problem should be solved in the next release. SEND-PR: low The problem should be solve in a future release. SEND-PR: doc-bug The documentation is incorrect. SEND-PR: accepts-illegal GCC fails to reject erroneous code. SEND-PR: rejects-legal GCC gives an error message for correct code. SEND-PR: wrong-code The machine code generated by gcc is incorrect. SEND-PR: ice-on-legal-code GCC gives an Internal Compiler Error (ICE) SEND-PR: for correct code SEND-PR: ice-on-illegal-code GCC gives an ICE instead of reporting an error SEND-PR: pessimizes-code GCC misses an important optimization opportunity SEND-PR: sw-bug Software bug of some other class than above SEND-PR: change-request A feature in GCC is missing. SEND-PR: support I need help with gcc.
Fix: <how to correct or work around the problem, if known (multiple lines)>
State-Changed-From-To: open->analyzed State-Changed-Why: Confirmed.
Responsible-Changed-From-To: unassigned->nathan Responsible-Changed-Why: investigating
From: Reichelt <reichelt@igpm.rwth-aachen.de> To: snyder@fnal.gov, gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org Cc: Subject: Re: c++/7964: [mainline regression] ICE in build_base_path Date: Sun, 27 Oct 2002 18:21:47 +0200 Hi, here's a slightly cleaned-up testcase: -------------------------snip here-------------------------- struct A { virtual void foo() const; }; struct B : virtual A {}; template<typename T> struct C : B { void bar() const { B::foo(); } }; template struct C<int>; -------------------------snip here-------------------------- Greetings, Volker http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7964
From: Janis Johnson <janis187@us.ibm.com> To: snyder@fnal.gov, gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org, nathan@gcc.gnu.org, gcc-bugs@gcc.gnu.org, nathan@gcc.gnu.org, reichelt@igpm.rwth-aachen.de, rodrigc@gcc.gnu.org Cc: Subject: Re: c++/7964: [3.3 regression] ICE in build_base_path Date: Wed, 18 Dec 2002 12:38:41 -0800 The regression reported in PR c++/7964 showed up starting with this patch: 2002-08-02 Mark Mitchell <mark@codesourcery.com> * init.c (build_member_call): Use build_new_method_call, not build_method_call. Output from the compiler: 7964.C: In member function `void C<T>::bar() const [with T = int]': 7964.C:13: instantiated from here 7964.C:10: internal compiler error: in build_base_path, at cp/class.c:284 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7964
State-Changed-From-To: analyzed->closed State-Changed-Why: 2002-12-24 Nathan Sidwell <nathan@codesourcery.com> PR C++/7964 * cp-tree.h (resolve_scoped_fn_name): Prototype. * call.c (resolve_scoped_fn_name): New function. Deal with more template expansion. Broken out of ... * parse.y (parse_finish_call_expr): ... here. Call it. * decl2.c (build_expr_from_tree, CALL_EXPR): Use resolve_scoped_fn_name and build_call_from_tree.