compiler: Fix type of result of shortcut calculation.
authorIan Lance Taylor <ian@gcc.gnu.org>
Wed, 18 Sep 2013 18:36:21 +0000 (18:36 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Wed, 18 Sep 2013 18:36:21 +0000 (18:36 +0000)
From-SVN: r202717

gcc/go/gofrontend/gogo.cc

index be8ec5939f32e8c06c8b9b3e616a61c44aa8478f..17cbb6b9b49eaed30387481b2602eb403e4b83f0 100644 (file)
@@ -2367,7 +2367,7 @@ Shortcuts::convert_shortcut(Block* enclosing, Expression** pshortcut)
   Block* retblock = new Block(enclosing, loc);
   retblock->set_end_location(loc);
 
-  Temporary_statement* ts = Statement::make_temporary(Type::lookup_bool_type(),
+  Temporary_statement* ts = Statement::make_temporary(shortcut->type(),
                                                      left, loc);
   retblock->add_statement(ts);