* c-typeck.c (comptypes): Exit early on NULL input.
authorRichard Henderson <rth@cygnus.com>
Tue, 13 Jan 1998 21:40:27 +0000 (13:40 -0800)
committerJeff Law <law@gcc.gnu.org>
Tue, 13 Jan 1998 21:40:27 +0000 (14:40 -0700)
From-SVN: r17347

gcc/ChangeLog
gcc/c-typeck.c

index 1ac803a762185d74f97b184fc051a48df3ed6591..ef5bb6347c2c3da1a21c351549d5fc8470d56421 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 5bf265ac2083e4ea87b7d1048038d50103cd973c..fb5efd76bdbab06e07c6e2e8ca4b393b14dece49 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