aboutsummaryrefslogtreecommitdiff
path: root/gcc/objc
diff options
context:
space:
mode:
authorAndrew Pinski <pinskia@gmail.com>2008-03-25 20:19:58 -0700
committerAndrew Pinski <pinskia@gcc.gnu.org>2008-03-25 20:19:58 -0700
commit9c349a39eb5b2466b60a0be488a0c55bbf7915b2 (patch)
treef670c74040d2bd7c9bc34b8ce4221f2debfbe61a /gcc/objc
parent0f9c821f73c3aa06933f94c4974b42db9a049da8 (diff)
downloadgcc-9c349a39eb5b2466b60a0be488a0c55bbf7915b2.zip
gcc-9c349a39eb5b2466b60a0be488a0c55bbf7915b2.tar.gz
gcc-9c349a39eb5b2466b60a0be488a0c55bbf7915b2.tar.bz2
re PR objc/29197 (ICE after error with array type with undefined variable)
2008-03-25 Andrew Pinski <pinskia@gmail.com> PR objc/29197 * objc-act.c (encode_type): Handle when type is error_mark_node. (objc_push_parm): Handle when the type of parm is error_mark_node. 2008-03-25 Andrew Pinski <pinskia@gmail.com> PR objc/29197 * objc.dg/method-20.m: New testcase. From-SVN: r133540
Diffstat (limited to 'gcc/objc')
-rw-r--r--gcc/objc/ChangeLog6
-rw-r--r--gcc/objc/objc-act.c10
2 files changed, 16 insertions, 0 deletions
diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog
index b558eb6..7584ed1 100644
--- a/gcc/objc/ChangeLog
+++ b/gcc/objc/ChangeLog
@@ -1,3 +1,9 @@
+2008-03-25 Andrew Pinski <pinskia@gmail.com>
+
+ PR objc/29197
+ * objc-act.c (encode_type): Handle when type is error_mark_node.
+ (objc_push_parm): Handle when the type of parm is error_mark_node.
+
2008-03-25 Tom Tromey <tromey@redhat.com>
* Make-lang.in (objc_OBJS): New variable.
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index 576e569..48bf974 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -8075,6 +8075,9 @@ encode_type (tree type, int curtype, int format)
enum tree_code code = TREE_CODE (type);
char c;
+ if (type == error_mark_node)
+ return;
+
if (TYPE_READONLY (type))
obstack_1grow (&util_obstack, 'r');
@@ -8231,6 +8234,13 @@ static void
objc_push_parm (tree parm)
{
bool relayout_needed = false;
+
+ if (TREE_TYPE (parm) == error_mark_node)
+ {
+ objc_parmlist = chainon (objc_parmlist, parm);
+ return;
+ }
+
/* Decay arrays and functions into pointers. */
if (TREE_CODE (TREE_TYPE (parm)) == ARRAY_TYPE)
{