public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Zopolis0 <creatorsmithmdt@gmail.com>
To: gcc-help <gcc-help@gcc.gnu.org>
Subject: Incorrect replacement of TYPE_METHODS with TYPE_FIELDS causing segfault.
Date: Wed, 8 Jun 2022 14:47:14 +1000	[thread overview]
Message-ID: <CAEYL+X-c5ptW7A+4E5t6Hq3Sc-0+Q43y5rAqJR+2fBB=A5d5oA@mail.gmail.com> (raw)

While compiling gcj on my mstermerge branch (
https://github.com/Zopolis4/gcj/tree/mstermerge) it breaks on, amongst
other things, an internal compiler error:
echo ../../../../gcj/libjava/classpath/lib/java/lang/ref/*.class >
java/lang/ref.list
echo ../../../../gcj/libjava/classpath/lib/java/lang/reflect/*.class >
java/lang/reflect.list
In file included from <built-in>:31:
../../../../gcj/libjava/java/lang/Object.java: internal compiler error:
tree check: expected function_decl, have field_decl in layout_class_method,
at java/class.cc:2627
In file included from <built-in>:63:
java/lang/Object.java: internal compiler error: tree check: expected
function_decl, have field_decl in layout_class_method, at java/class.cc:2627

I believe that this error is due to the following incorrect code at line
2589 at gcc/java/class.cc:
  for (tree method_decl = TYPE_FIELDS (this_class);

Before it was removed, this line was:
  for (method_decl = TYPE_METHODS (this_class);

But I have since modified it (
https://github.com/Zopolis4/gcj/commit/1f38bc896a704290ca0b742c60c60a88d5e1fb07#diff-bf49cdc948b20b9f25afd3fbb36922a10e979a55ff9600b3b51d0ec54175b752L2592)
in accordance with 5aaa8fb40681ee66282d73dab8c8eccbf5ee0518

Given that this was incorrect, what would be the correct way to replace
this instance of TYPE_METHODS? Were all my replacements of TYPE_METHODS in
gcc/java/class.cc wrong?

             reply	other threads:[~2022-06-08  4:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-08  4:47 Zopolis0 [this message]
2022-06-08  7:02 ` Xi Ruoyao
2022-06-08  8:13   ` Zopolis0

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='CAEYL+X-c5ptW7A+4E5t6Hq3Sc-0+Q43y5rAqJR+2fBB=A5d5oA@mail.gmail.com' \
    --to=creatorsmithmdt@gmail.com \
    --cc=gcc-help@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).