This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c++/9524: ICE in c_expand_expr, at c-common.c:4319 whencompiling boost 1.29.0


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

From: Michael Matz <matz@suse.de>
To: <reichelt@igpm.rwth-aachen.de>
Cc: <gcc-bugs@gcc.gnu.org>, <gcc-prs@gcc.gnu.org>,
	<gcc-gnats@gcc.gnu.org>, <larsbj@gullik.net>,
	Mark Mitchell <mark@codesourcery.com>
Subject: Re: c++/9524: ICE in   c_expand_expr, at c-common.c:4319 when
 compiling boost 1.29.0
Date: Fri, 14 Feb 2003 13:27:43 +0100 (CET)

 Hi,
 
 reichelt@igpm.rwth-aachen.de writes:
 > State-Changed-From-To: open->analyzed
 > State-Changed-Why:
 >     The code does indeed crash the compiler.
 >     I bet this is the same failure as in PR 9443.
 >     Just to be sure, however, I'm leaving the PR open.
 
 A very reduced testcase for this error is:
 -------- snip -------------
 struct B {
   void (*f)(void);
   void g();
 };
 void B::g()
 {
   B::f();
 }
 --------- snap ------------
 
 This compiled with either 3.3 CVS or HEAD ICEs the compiler exhibits the
 abort.  The causing patch for this is a big one from Mark, ChangeLog
 starting with:
 
 +2002-07-31  Mark Mitchell  <mark@codesourcery.com>
 +
 +       * call.c (build_field_call): Do not look up the field by name.
 +       (build_method_call): Simplify.
 +       (struct z_candidate): Add access_path and conversion_path.  Remove
 +       basetype_path.
 +       (convert_class_to_reference): Adjust use of
 +       add_function_candidate.
 +       (add_candidate): Add conversion_path argument.
 ....
 
 When one removes the qualification from the call (i.e. replace 'B::f()'
 with 'f()'), the file compiles.  The difference is, that while expanding
 the call, in the working case it's a:
  <call_expr 0x40159d00
    ...
     arg 0 <component_ref 0x40159ce0
         type <pointer_type 0x40189e70 type <function_type 0x4015e2a0>
    ...
 
 while in the broken case the call expressions is a:
  <call_expr 0x40159ce0
    ...
     arg 0 <field_decl 0x40189ee0 f
    ...
 
 A field_decl is never expected as the first elem of a call_expr, and this
 makes finally the expansion functions crash.
 
 
 Ciao,
 Michael.
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]