summaryrefslogtreecommitdiff
path: root/gcc/objc
diff options
context:
space:
mode:
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2006-09-26 15:36:21 +0000
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2006-09-26 15:36:21 +0000
commitea028b590cba888d909410be1c0f725c7b159cdf (patch)
treec375a10a62d82187241f5638ddcb0c9b2d0368cf /gcc/objc
parent19c27464eaa1c758e45672faa5928c41bea75078 (diff)
downloadlinaro-gcc-ea028b590cba888d909410be1c0f725c7b159cdf.tar.gz
linaro-gcc-ea028b590cba888d909410be1c0f725c7b159cdf.tar.bz2
linaro-gcc-ea028b590cba888d909410be1c0f725c7b159cdf.zip
2006-09-26 Andrew Pinski <pinskia@physics.uc.edu>
PR objc/29195 * objc-act.c (objc_push_parm): If we change the type of the decl, relayout the decl. 2006-09-26 Andrew Pinski <pinskia@physics.uc.edu> PR objc/29195 * objc/compile/method-1.m: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117229 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/objc')
-rw-r--r--gcc/objc/ChangeLog6
-rw-r--r--gcc/objc/objc-act.c15
2 files changed, 19 insertions, 2 deletions
diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog
index ec777a64ac0..df8a5872220 100644
--- a/gcc/objc/ChangeLog
+++ b/gcc/objc/ChangeLog
@@ -1,3 +1,9 @@
+2006-09-26 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR objc/29195
+ * objc-act.c (objc_push_parm): If we change the type of the
+ decl, relayout the decl.
+
2006-09-19 Eric Christopher <echristo@apple.com>
* objc-act.c (JBLEN): Rename to OBJC_JBLEN,
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index 7ac785f5390..1d3513b6a58 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -8223,11 +8223,22 @@ static GTY(()) tree objc_parmlist = NULL_TREE;
static void
objc_push_parm (tree parm)
{
+ bool relayout_needed = false;
/* Decay arrays and functions into pointers. */
if (TREE_CODE (TREE_TYPE (parm)) == ARRAY_TYPE)
- TREE_TYPE (parm) = build_pointer_type (TREE_TYPE (TREE_TYPE (parm)));
+ {
+ TREE_TYPE (parm) = build_pointer_type (TREE_TYPE (TREE_TYPE (parm)));
+ relayout_needed = true;
+ }
else if (TREE_CODE (TREE_TYPE (parm)) == FUNCTION_TYPE)
- TREE_TYPE (parm) = build_pointer_type (TREE_TYPE (parm));
+ {
+ TREE_TYPE (parm) = build_pointer_type (TREE_TYPE (parm));
+ relayout_needed = true;
+ }
+
+ if (relayout_needed)
+ relayout_decl (parm);
+
DECL_ARG_TYPE (parm)
= lang_hooks.types.type_promotes_to (TREE_TYPE (parm));