This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug java/23620] [4.0/4.1 Regression] Segfault compiling inner interfaces
- From: "wmahan at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Sep 2005 19:18:45 -0000
- Subject: [Bug java/23620] [4.0/4.1 Regression] Segfault compiling inner interfaces
- References: <20050829094413.23620.wmahan@gmail.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From wmahan at gmail dot com 2005-09-01 19:18 -------
I think I found the root of the problem. In 3.4.x, make_class() in java/class.c
looks like this:
type = make_node (RECORD_TYPE);
TYPE_BINFO (type) = make_tree_vec (BINFO_ELTS);
MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC (type);
but in 4.0.1 it becomes this:
type = make_node (RECORD_TYPE);
MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC (type);
The crash was caused by TYPE_BINFO not being set for a certain type. I added the
line
TYPE_BINFO (type) = make_tree_binfo (0);
to make_class(). This seems consistent with the changes made in 4.0, and it
fixes the problem for me.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23620