Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: amodra@gmail.com (Alan Modra)
Cc: james.greenhalgh@arm.com (James Greenhalgh),
	       sivachandra@google.com (Siva Chandra),
	       gdb-patches@sourceware.org (gdb-patches)
Subject: [push] Work around GCC bug 63748 (Re: [PATCH] PR c++/17494 - Fix evaluation of method calls under EVAL_SKIP)
Date: Mon, 10 Nov 2014 14:24:00 -0000	[thread overview]
Message-ID: <201411101423.sAAENgT5010159@d03av02.boulder.ibm.com> (raw)
In-Reply-To: <20141105125436.GE30857@bubble.grove.modra.org> from "Alan Modra" at Nov 05, 2014 11:24:36 PM

Alan Modra wrote:
> On Wed, Nov 05, 2014 at 11:00:26AM +0000, James Greenhalgh wrote:
> > For what it is worth, I'm seeing the same with my GCC 4.9.1 (x84_64-linux),
> > again nothing special in the configure options for GCC:
> 
> Thanks for the confirmation.  I've opened a gcc bugzilla.
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63748

While this GCC bug is in the process of being fixed, it would still be good
to allow GDB to be built with the affected GCC versions (in particular 4.9.x).

I've pushed the following workaround that changes the CFG of the affected
GDB routine in an equivalent way so that the GCC bug is no longer triggered.

Tested on x86_64-linux, pushed to mainline.

Bye,
Ulrich

gdb/ChangeLog:

	* eval.c (evaluate_subexp_standard): Work around GCC bug 63748.

diff --git a/gdb/eval.c b/gdb/eval.c
index c49f7b6..655ea22 100644
--- a/gdb/eval.c
+++ b/gdb/eval.c
@@ -1696,8 +1696,6 @@ evaluate_subexp_standard (struct type *expect_type,
 
     do_call_it:
 
-      if (noside == EVAL_SKIP)
-	goto nosideret;
       if (argvec[0] == NULL)
 	error (_("Cannot evaluate function -- may be inlined"));
       if (noside == EVAL_AVOID_SIDE_EFFECTS)
@@ -1804,6 +1802,8 @@ evaluate_subexp_standard (struct type *expect_type,
 	  for (; tem <= nargs; tem++)
 	    argvec[tem] = evaluate_subexp_with_coercion (exp, pos, noside);
 	  argvec[tem] = 0;	/* signal end of arglist */
+	  if (noside == EVAL_SKIP)
+	    goto nosideret;
 	  goto do_call_it;
 
 	default:

-- 
  Dr. Ulrich Weigand
  GNU/Linux compilers and toolchain
  Ulrich.Weigand@de.ibm.com


      reply	other threads:[~2014-11-10 14:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-20 19:11 [PATCH] PR c++/17494 - Fix evaluation of method calls under EVAL_SKIP Siva Chandra
2014-10-27 17:22 ` Siva Chandra
2014-11-03 14:35 ` Siva Chandra
2014-11-03 15:08 ` Ulrich Weigand
2014-11-04  2:08   ` Siva Chandra
2014-11-05  0:24     ` Alan Modra
2014-11-05  0:33       ` Siva Chandra
2014-11-05 11:00       ` James Greenhalgh
2014-11-05 12:54         ` Alan Modra
2014-11-10 14:24           ` Ulrich Weigand [this message]

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=201411101423.sAAENgT5010159@d03av02.boulder.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=amodra@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=james.greenhalgh@arm.com \
    --cc=sivachandra@google.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