aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2009-11-28 13:12:32 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2009-11-28 13:12:32 +0100
commit76dcaf33d5bd891cfdf8cd376d06dac81e950f48 (patch)
treef214593704a2b6dafdfc0d338d3399a7d144b7a4
parent11895e28ee808512e3ae725fb77e6df6c61f43a4 (diff)
downloadgcc-76dcaf33d5bd891cfdf8cd376d06dac81e950f48.zip
gcc-76dcaf33d5bd891cfdf8cd376d06dac81e950f48.tar.gz
gcc-76dcaf33d5bd891cfdf8cd376d06dac81e950f48.tar.bz2
re PR objc++/42156 (Hundreds of objc++ testsuite regressions)
PR obj-c++/42156 * objc-act.c (objc_build_struct): INIT_TYPE_OBJC_INFO for type variants that don't have it initialized yet. From-SVN: r154721
-rw-r--r--gcc/objc/ChangeLog6
-rw-r--r--gcc/objc/objc-act.c13
2 files changed, 16 insertions, 3 deletions
diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog
index 4a18ead..65d0282 100644
--- a/gcc/objc/ChangeLog
+++ b/gcc/objc/ChangeLog
@@ -1,3 +1,9 @@
+2009-11-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR obj-c++/42156
+ * objc-act.c (objc_build_struct): INIT_TYPE_OBJC_INFO for
+ type variants that don't have it initialized yet.
+
2009-09-14 Jan Hubicka <jh@suse.cz>
* objc-act.c (objc_add_static_instance): Do not set DECL_COMMON.
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index 6884cb1..e720dab 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -871,9 +871,16 @@ objc_build_struct (tree klass, tree fields, tree super_name)
finish_struct(), and then reinstate it afterwards. */
for (t = TYPE_NEXT_VARIANT (s); t; t = TYPE_NEXT_VARIANT (t))
- objc_info
- = chainon (objc_info,
- build_tree_list (NULL_TREE, TYPE_OBJC_INFO (t)));
+ {
+ if (!TYPE_HAS_OBJC_INFO (t))
+ {
+ INIT_TYPE_OBJC_INFO (t);
+ TYPE_OBJC_INTERFACE (t) = klass;
+ }
+ objc_info
+ = chainon (objc_info,
+ build_tree_list (NULL_TREE, TYPE_OBJC_INFO (t)));
+ }
/* Point the struct at its related Objective-C class. */
INIT_TYPE_OBJC_INFO (s);