class.c (build_utf8_ref): Set DECL_SIZE and DECL_SIZE_UNIT from ctype's sizes.
authorJakub Jelinek <jakub@redhat.com>
Tue, 29 Jul 2008 16:31:18 +0000 (18:31 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 29 Jul 2008 16:31:18 +0000 (18:31 +0200)
* class.c (build_utf8_ref): Set DECL_SIZE and DECL_SIZE_UNIT
from ctype's sizes.

From-SVN: r138252

gcc/java/ChangeLog
gcc/java/class.c

index 9fad320913096856a96c85a81798d6df7f397c77..5811a224cda42274d902de1730d80df2050b69eb 100644 (file)
@@ -1,5 +1,8 @@
 2008-07-29  Jakub Jelinek  <jakub@redhat.com>
 
+       * class.c (build_utf8_ref): Set DECL_SIZE and DECL_SIZE_UNIT
+       from ctype's sizes.
+
        * class.c (build_utf8_ref): Pad initializer string to utf8const_type's
        alignment.
 
index fecd962b8b657beccdfe6b508b3e4e5b67822b74..2d8a1c21999eeaf3b07da98811e9eaa34cab916d 100644 (file)
@@ -990,6 +990,8 @@ build_utf8_ref (tree name)
 
   TREE_CHAIN (decl) = utf8_decl_list;
   layout_decl (decl, 0);
+  DECL_SIZE (decl) = TYPE_SIZE (ctype);
+  DECL_SIZE_UNIT (decl) = TYPE_SIZE_UNIT (ctype);
   pushdecl (decl);
   rest_of_decl_compilation (decl, global_bindings_p (), 0);
   varpool_mark_needed_node (varpool_node (decl));