public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Carlo Wood <carlo@alinoe.com>
To: Richard Henderson <rth@redhat.com>,
	gcc@gcc.gnu.org, wilson@specifixinc.com, jason@redhat.com
Subject: Re: RFA: Adding a location_t (or pointer) to tree_exp for 3.4 only.
Date: Mon, 06 Oct 2003 23:49:00 -0000	[thread overview]
Message-ID: <20031006234940.GA3134@alinoe.com> (raw)
In-Reply-To: <20031006231706.GB4839@redhat.com>

On Mon, Oct 06, 2003 at 04:17:06PM -0700, Richard Henderson wrote:
> Sure.  But previously the code must have been looking for CALL_EXPR
> by virtue of a switch/test/whatever.  This is obvious because we 
> were not aborting in get_callee_fndecl.  I expect this to change 
> not at all.
> 
> I would expect wrapping with WFL would not change this at all.  I
> would expect that we'd simply call expand_expr one extra time, and
> the subsequent recursion on the contained call_expr to do exactly
> what we would have done before your change.
> 
> So your comment re get_callee_fndecl continues to make no sense.

~>/usr/src/GNU/builds-gcc/mainline-native/gcc/xgcc -B/usr/src/GNU/builds-gcc/mainline-native/gcc/ -B/usr/src/GNU/install/i686-pc-linux-gnu/bin/ -B/usr/src/GNU/install/i686-pc-linux-gnu/lib/ -isystem /usr/src/GNU/install/i686-pc-linux-gnu/include -isystem /usr/src/GNU/install/i686-pc-linux-gnu/sys-include -g3 -finline -c troep.cc -S ; egrep -n '(call|\.loc)' troep.s | grep -B1 call
troep.cc:12: internal compiler error: in get_callee_fndecl, at tree.c:4440
Please submit a full bug report,

Thats the abort() that I ran into.  It made me feel unsecure about
how safe it would be to just-like-that wrap every CALL_EXPR in a WFL.

> r~
> 
> 
> PS: Your response should include a *detailed* explanation for how
> we would get into the situation that you describe.

Breakpoint 1, get_callee_fndecl (call=0x40266360)
    at ../../../gcc/gcc-mainline/gcc/tree.c:4440
4440        abort ();
(gdb) bt
#0  get_callee_fndecl (call=0x40266360) at ../../../gcc/gcc-mainline/gcc/tree.c:4440
#1  0x08058d10 in build_cxx_call (fn=0x40266360, args=0x0, converted_args=0x0)
    at ../../../gcc/gcc-mainline/gcc/cp/call.c:4626
#2  0x08058a61 in build_over_call (cand=0x402cff28, flags=3)
    at ../../../gcc/gcc-mainline/gcc/cp/call.c:4597
#3  0x08052139 in build_new_function_call (fn=0x402f4510, args=0x0)
    at ../../../gcc/gcc-mainline/gcc/cp/call.c:2751
#4  0x0817482e in finish_call_expr (fn=0x402f4510, args=0x0, disallow_virtual=false,
    koenig_p=false) at ../../../gcc/gcc-mainline/gcc/cp/semantics.c:1693
#5  0x08120ee6 in cp_parser_postfix_expression (parser=0x402f9140, address_p=false)
    at ../../../gcc/gcc-mainline/gcc/cp/parser.c:3588
[...]

Frame #1, cp/call.c:

  fn = build_call (fn, converted_args);

  /* If this call might throw an exception, note that fact.  */
  fndecl = get_callee_fndecl (fn);


build_call now returns a WFL.
If we replacing the get_callee_fndecl call here with:

  fndecl = get_callee_fndecl (EXPR_WFL_NODE (fn));

it seems to work fine.

I guess more investigation IS warranted ;).
But I was already working on that, I'll get back with a full
report on the need to unwrap WFL-ed CALL_EXPR later...

Thanks for your patience so far,

-- 
Carlo Wood <carlo@alinoe.com>

  reply	other threads:[~2003-10-06 23:49 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-22  2:31 RFC: debug line info & inlining; patch proposal and request for comments Carlo Wood
2003-09-23  5:33 ` Jim Wilson
2003-09-27 16:38 ` RFA: Adding a location_t (or pointer) to tree_exp for 3.4 only Carlo Wood
2003-10-06 12:58   ` Hans-Peter Nilsson
2003-10-06 17:41   ` Richard Henderson
2003-10-06 17:51     ` Daniel Jacobowitz
2003-10-06 18:03       ` Daniel Berlin
2003-10-06 19:20         ` Carlo Wood
2003-10-06 19:08     ` Carlo Wood
2003-10-06 20:11       ` Richard Henderson
2003-10-06 20:14         ` Daniel Jacobowitz
2003-10-06 20:20           ` Richard Henderson
2003-10-06 20:24             ` Daniel Jacobowitz
2003-10-06 21:54               ` Richard Henderson
2003-10-06 21:53             ` Carlo Wood
2003-10-06 21:55               ` Richard Henderson
2003-10-06 22:30                 ` Carlo Wood
2003-10-06 23:17                   ` Richard Henderson
2003-10-06 23:49                     ` Carlo Wood [this message]
2003-10-07  0:07                       ` Richard Henderson
2003-10-07  0:43                         ` Carlo Wood
2003-10-07  0:46                           ` Richard Henderson
2003-10-07  2:40                             ` Carlo Wood
2003-10-07 18:32                             ` Carlo Wood
2003-10-07 19:08                               ` Carlo Wood
2003-10-07 19:46                               ` Richard Henderson
2003-10-07 21:12                                 ` Carlo Wood
2003-10-07 23:43                                   ` Carlo Wood
2003-10-07 19:41                 ` Carlo Wood
2003-10-12  4:32             ` law
2003-10-12 12:02               ` Daniel Berlin

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=20031006234940.GA3134@alinoe.com \
    --to=carlo@alinoe.com \
    --cc=gcc@gcc.gnu.org \
    --cc=jason@redhat.com \
    --cc=rth@redhat.com \
    --cc=wilson@specifixinc.com \
    /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).