public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
From: "rguenther at suse dot de" <gcc-bugzilla@gcc.gnu.org>
To: java-prs@gcc.gnu.org
Subject: [Bug middle-end/40867] [4.5 Regression] FAIL: StackTrace2 output - source compiled test
Date: Fri, 31 Jul 2009 09:19:00 -0000 [thread overview]
Message-ID: <20090731091930.30222.qmail@sourceware.org> (raw)
In-Reply-To: <bug-40867-276@http.gcc.gnu.org/bugzilla/>
------- Comment #7 from rguenther at suse dot de 2009-07-31 09:19 -------
Subject: Re: [4.5 Regression] FAIL: StackTrace2 output
- source compiled test
On Thu, 30 Jul 2009, aph at gcc dot gnu dot org wrote:
> ------- Comment #6 from aph at gcc dot gnu dot org 2009-07-30 17:24 -------
> This seems to be happening very early, because the very first tree dump shows:
>
> StackTrace2$Inner.doCrash(java.lang.Object) (struct StackTrace2$Inner * this,
> struct java.lang.Object * o)
> [StackTrace2.java : 0:0] {
> struct java.lang.Object * #ref#2#2.146;
> struct
> {
> struct java.lang.Class * class;
> void * methods[2];
> } * D.1837;
> void * * D.1838;
> void * D.1839;
> struct java.lang.String * java.lang.Object::<Tb5> (struct java.lang.Object *)
> * D.1840;
>
> [StackTrace2.java : 34:0] {
> void * #ref#1#0;
> struct java.lang.Object * D.252;
> void * #ref#2#2;
>
> [StackTrace2.java : 33:0] D.252 = o;
> [StackTrace2.java : 34:0] #ref#2#2 = D.252;
> [StackTrace2.java : 34:0] #ref#2#2.146 = (struct java.lang.Object *)
> #ref#2#2;
> [StackTrace2.java : 34:0] D.1837 = #ref#2#2.146->vtable;
> [StackTrace2.java : 34:0] D.1838 = &D.1837->methods[4];
> ...
>
> All this code should be marked as Line 33, not line 34. I don't know
> why this has changed recently.
Could it be now that all the java_replace_references is done at
a different time we fail to properly update / copy locations in
that function? I don't see that it changed really, and nothing
uses locators there before or after the patch, but ... certainly
the MODIFY_EXPR doesn't get its location copied from the original
one.
So, maybe the following would make a difference? (untested)
Index: decl.c
===================================================================
--- decl.c (revision 150221)
+++ decl.c (working copy)
@@ -361,9 +361,10 @@ java_replace_references (tree *tp, int *
tree new_lhs = java_replace_reference (lhs, /* want_lvalue */
true);
tree new_rhs = build1 (NOP_EXPR, TREE_TYPE (new_lhs),
TREE_OPERAND (*tp, 1));
- *tp = build2 (MODIFY_EXPR, TREE_TYPE (new_lhs),
- new_lhs, new_rhs);
- *tp = build1 (NOP_EXPR, TREE_TYPE (lhs), *tp);
+ tree tem = build2 (MODIFY_EXPR, TREE_TYPE (new_lhs),
+ new_lhs, new_rhs);
+ SET_EXPR_LOCATION (tem, EXPR_LOCATION (*tp));
+ *tp = build1 (NOP_EXPR, TREE_TYPE (lhs), tem);
}
}
if (TREE_CODE (*tp) == VAR_DECL)
Richard.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40867
next prev parent reply other threads:[~2009-07-31 9:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-26 22:37 [Bug libgcj/40867] New: " danglin at gcc dot gnu dot org
2009-07-27 19:07 ` [Bug libgcj/40867] " hjl dot tools at gmail dot com
2009-07-28 8:02 ` [Bug middle-end/40867] " aph at gcc dot gnu dot org
2009-07-29 23:07 ` jsm28 at gcc dot gnu dot org
2009-07-30 7:37 ` aph at gcc dot gnu dot org
2009-07-30 11:24 ` joseph at codesourcery dot com
2009-07-30 11:36 ` aph at gcc dot gnu dot org
2009-07-30 17:24 ` aph at gcc dot gnu dot org
2009-07-31 9:19 ` rguenther at suse dot de [this message]
2009-08-03 17:55 ` aph at gcc dot gnu dot org
2009-08-24 15:48 ` hjl dot tools at gmail dot com
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=20090731091930.30222.qmail@sourceware.org \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=java-prs@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).