Don't crash on erroneous type descriptor in interface conversion.
authorIan Lance Taylor <ian@gcc.gnu.org>
Wed, 23 Feb 2011 05:02:40 +0000 (05:02 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Wed, 23 Feb 2011 05:02:40 +0000 (05:02 +0000)
From-SVN: r170429

gcc/go/gofrontend/expressions.cc

index 264dd579b6f4fe2184247c864206068e5813e0ef..050942c619c48133f7e01548228aa36d51f64abf 100644 (file)
@@ -362,6 +362,8 @@ Expression::convert_type_to_interface(Translate_context* context,
       first_field_value = fold_convert_loc(location, const_ptr_type_node,
                                           method_table);
     }
+  if (first_field_value == error_mark_node)
+    return error_mark_node;
 
   // Start building a constructor for the value we will return.