diff options
author | Ian Lance Taylor <iant@google.com> | 2014-08-08 17:40:51 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2014-08-08 17:40:51 +0000 |
commit | ff09769fac4d76ae93c1ca473d788b9be6809923 (patch) | |
tree | 50efcd58ad17c6fdb1d216216974aff573070a0b /gcc/go/go-gcc.cc | |
parent | 7ca26091fc02486e0fe9469fa8b8dc8bc4ab442c (diff) | |
download | gcc-ff09769fac4d76ae93c1ca473d788b9be6809923.zip gcc-ff09769fac4d76ae93c1ca473d788b9be6809923.tar.gz gcc-ff09769fac4d76ae93c1ca473d788b9be6809923.tar.bz2 |
go-gcc.cc (Gcc_backend::compound_statement): Don't return NULL_TREE.
* go-gcc.cc (Gcc_backend::compound_statement): Don't return
NULL_TREE.
From-SVN: r213761
Diffstat (limited to 'gcc/go/go-gcc.cc')
-rw-r--r-- | gcc/go/go-gcc.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/go/go-gcc.cc b/gcc/go/go-gcc.cc index 97904d0..a34fad8 100644 --- a/gcc/go/go-gcc.cc +++ b/gcc/go/go-gcc.cc @@ -2123,6 +2123,12 @@ Gcc_backend::compound_statement(Bstatement* s1, Bstatement* s2) if (t == error_mark_node) return this->error_statement(); append_to_statement_list(t, &stmt_list); + + // If neither statement has any side effects, stmt_list can be NULL + // at this point. + if (stmt_list == NULL_TREE) + stmt_list = integer_zero_node; + return this->make_statement(stmt_list); } |