Don't crash on invalid comparison of complex constants.
authorIan Lance Taylor <ian@gcc.gnu.org>
Fri, 11 Feb 2011 00:19:15 +0000 (00:19 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Fri, 11 Feb 2011 00:19:15 +0000 (00:19 +0000)
From-SVN: r170037

gcc/go/gofrontend/expressions.cc

index bc27480ce2950224487cd2fb14b636dca71cdabe..8e7651636a56af3f26a42a1547136f3edb2c5b07 100644 (file)
@@ -5159,7 +5159,7 @@ Binary_expression::do_lower(Gogo*, Named_object*, int)
          {
            // May be a type error--let it be diagnosed later.
          }
-       else if (is_comparison)
+       else if (op == OPERATOR_EQEQ || op == OPERATOR_NOTEQ)
          {
            bool b = Binary_expression::compare_complex(op,
                                                        (left_type != NULL