Skip to content

Commit

Permalink
compiler: Don't make erroneous type descriptors.
Browse files Browse the repository at this point in the history
    
    There is no need to make type descriptors for named types when there
    are errors during package compilation.  Particularly, if the error in
    package compilation is from a malformed named type, there is no
    guarantee a type descriptor can be created.
    
    Fixes golang/go#11560.
    
    Reviewed-on: https://go-review.googlesource.com/12792


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@226527 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information
ian committed Aug 3, 2015
1 parent fc2edda commit e6d1c8b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gcc/go/gofrontend/MERGE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
33d59eff1bd5de29f1fbde3b7625db28595835fd
2b1a79c6395991fc4e60e20312ff44065fdb816b

The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
2 changes: 1 addition & 1 deletion gcc/go/gofrontend/gogo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7151,7 +7151,7 @@ Named_object::get_backend(Gogo* gogo, std::vector<Bexpression*>& const_decls,
// still be returned by some function. Simply calling the
// type_descriptor method is enough to create the type
// descriptor, even though we don't do anything with it.
if (this->package_ == NULL)
if (this->package_ == NULL && !saw_errors())
{
named_type->
type_descriptor_pointer(gogo, Linemap::predeclared_location());
Expand Down

0 comments on commit e6d1c8b

Please sign in to comment.