This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug java/23620] [4.0/4.1 Regression] Segfault compiling inner interfaces


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]