aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2013-05-06 17:09:41 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2013-05-06 17:09:41 +0200
commitcb3f6a88f6c9cbcfccb171f4c83aa3beb4f59319 (patch)
treea53a8de3c7798f7e4f769d054f949cffe717d18e
parentaa06a9782f22abcf96b98e92e5b081ef872ec941 (diff)
downloadgcc-cb3f6a88f6c9cbcfccb171f4c83aa3beb4f59319.zip
gcc-cb3f6a88f6c9cbcfccb171f4c83aa3beb4f59319.tar.gz
gcc-cb3f6a88f6c9cbcfccb171f4c83aa3beb4f59319.tar.bz2
re PR libgcj/57074 (libgcj regression on 32bit Power architecture)
PR libgcj/57074 * class.c (emit_symbol_table): Use array type of the right size for the_syms_decl and its DECL_INITIAL, instead of symbols_array_type. Set TREE_TYPE (the_syms_decl) to it. (emit_assertion_table): Use array type of the right size for table_decl and its DECL_INITIAL. From-SVN: r198631
-rw-r--r--gcc/java/ChangeLog9
-rw-r--r--gcc/java/class.c14
2 files changed, 20 insertions, 3 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 4f786b4..993890d 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,12 @@
+2013-05-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR libgcj/57074
+ * class.c (emit_symbol_table): Use array type of the
+ right size for the_syms_decl and its DECL_INITIAL, instead
+ of symbols_array_type. Set TREE_TYPE (the_syms_decl) to it.
+ (emit_assertion_table): Use array type of the right size
+ for table_decl and its DECL_INITIAL.
+
2013-04-15 Gerald Pfeifer <gerald@pfeifer.com>
* gcj.texi (Configure-time Options): Refer to GCC, not gcc.
diff --git a/gcc/java/class.c b/gcc/java/class.c
index b3005a8..30679f7 100644
--- a/gcc/java/class.c
+++ b/gcc/java/class.c
@@ -2958,9 +2958,14 @@ emit_symbol_table (tree name, tree the_table,
null_pointer_node);
CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, null_symbol);
- table = build_constructor (symbols_array_type, v);
+ tree symbols_arr_type
+ = build_prim_array_type (symbol_type, vec_safe_length (v));
+
+ table = build_constructor (symbols_arr_type, v);
/* Make it the initial value for otable_syms and emit the decl. */
+ TREE_TYPE (the_syms_decl) = symbols_arr_type;
+ relayout_decl (the_syms_decl);
DECL_INITIAL (the_syms_decl) = table;
DECL_ARTIFICIAL (the_syms_decl) = 1;
DECL_IGNORED_P (the_syms_decl) = 1;
@@ -3109,12 +3114,15 @@ emit_assertion_table (tree klass)
null_pointer_node);
CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, null_entry);
+
+ tree type
+ = build_prim_array_type (assertion_entry_type, vec_safe_length (v));
- ctor = build_constructor (assertion_table_type, v);
+ ctor = build_constructor (type, v);
table_decl = build_decl (input_location,
VAR_DECL, mangled_classname ("_type_assert_", klass),
- assertion_table_type);
+ type);
TREE_STATIC (table_decl) = 1;
TREE_READONLY (table_decl) = 1;