This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gccgo] Fix last patch


This patch fixes my last patch, so that it doesn't crash on switches
with empty values.  Committed to gccgo branch.  This time with
testing.

Ian

diff -r 303179b475c0 go/statements.cc
--- a/go/statements.cc	Thu May 13 11:58:25 2010 -0700
+++ b/go/statements.cc	Tue May 18 12:54:31 2010 -0700
@@ -3337,8 +3337,9 @@
 {
   source_location loc = this->location();
 
-  if (this->val_->is_error_expression()
-      || this->val_->type()->is_error_type())
+  if (this->val_ != NULL
+      && (this->val_->is_error_expression()
+	  || this->val_->type()->is_error_type()))
     return Statement::make_error_statement(loc);
 
   if (this->val_ != NULL

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]