OSDN Git Service

* c-typeck.c (comptypes): Exit early on NULL input.
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 13 Jan 1998 21:40:27 +0000 (21:40 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 13 Jan 1998 21:40:27 +0000 (21:40 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@17347 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/c-typeck.c

index 1ac803a..ef5bb63 100644 (file)
@@ -1,5 +1,7 @@
 Tue Jan 13 22:39:40 1998  Richard Henderson  (rth@cygnus.com)
 
+       * c-typeck.c (comptypes): Exit early on NULL input.
+
        * haifa-sched.c (schedule_insns): Correctly remove inter-block
        dependencies after reload.
 
index 5bf265a..fb5efd7 100644 (file)
@@ -441,7 +441,8 @@ comptypes (type1, type2)
 
   /* Suppress errors caused by previously reported errors.  */
 
-  if (t1 == t2 || TREE_CODE (t1) == ERROR_MARK || TREE_CODE (t2) == ERROR_MARK)
+  if (t1 == t2 || !t1 || !t2
+      || TREE_CODE (t1) == ERROR_MARK || TREE_CODE (t2) == ERROR_MARK)
     return 1;
 
   /* Treat an enum type as the integer type of the same width and