]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR middle-end/58179
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 17 Aug 2013 18:14:18 +0000 (18:14 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 17 Aug 2013 18:14:18 +0000 (18:14 +0000)
* tree.c (obj_type_ref_class): Do not ICE on non-method calls.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201817 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tree.c

index 66048e115228b277feebe401191f5fb07edf9789..6462a0559be5636c0ee2a190777f7fd80ad82f09 100644 (file)
@@ -1,3 +1,8 @@
+2013-08-16  Jan Hubicka  <jh@suse.cz>
+
+       PR middle-end/58179
+       * tree.c (obj_type_ref_class): Do not ICE on non-method calls.
+
 2013-08-16  David Edelsohn  <dje.gcc@gmail.com>
 
        * config/rs6000/rs6000.md (rs6000_get_timebase_ppc32): Add length
index 9480c7308dac3223ccb9ea8cf985b4dbb86e413f..8b4d86585bbd6cb1287990746d40cc9528435e7e 100644 (file)
@@ -11873,7 +11873,11 @@ obj_type_ref_class (tree ref)
   ref = TREE_TYPE (ref);
   gcc_checking_assert (TREE_CODE (ref) == POINTER_TYPE);
   ref = TREE_TYPE (ref);
-  gcc_checking_assert (TREE_CODE (ref) == METHOD_TYPE);
+  /* We look for type THIS points to.  ObjC also builds
+     OBJ_TYPE_REF with non-method calls, Their first parameter
+     ID however also corresponds to class type. */
+  gcc_checking_assert (TREE_CODE (ref) == METHOD_TYPE
+                      || TREE_CODE (ref) == FUNCTION_TYPE);
   ref = TREE_VALUE (TYPE_ARG_TYPES (ref));
   gcc_checking_assert (TREE_CODE (ref) == POINTER_TYPE);
   return TREE_TYPE (ref);