diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2017-07-18 22:31:00 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2017-07-18 22:31:00 +0000 |
commit | ab86687fee4024af20d852e26fbb743de05d0efe (patch) | |
tree | 1185231f100fa749f63c64473ba49aadec9a9a88 /gcc | |
parent | eb80664a39e8bb876bfc6b9ef7ad8578e3c76fa4 (diff) | |
download | gcc-ab86687fee4024af20d852e26fbb743de05d0efe.zip gcc-ab86687fee4024af20d852e26fbb743de05d0efe.tar.gz gcc-ab86687fee4024af20d852e26fbb743de05d0efe.tar.bz2 |
compiler: pass correct 'function' flag to circular_pointer_type
The code in Named_type::do_get_backend was not passing the correct
flag value for circular function types to Backend::circular_pointer_type
(it was always setting this flag to false). Pass a true value if the
type being converted is a function type.
Reviewed-on: https://go-review.googlesource.com/49330
From-SVN: r250325
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/go/gofrontend/MERGE | 2 | ||||
-rw-r--r-- | gcc/go/gofrontend/types.cc | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 06a8731..cc71379 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -21775ae119830810d9e415a02e85349f4190c68c +0036bd04d077f8bbe5aa9a62fb8830c53068209e The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/gcc/go/gofrontend/types.cc b/gcc/go/gofrontend/types.cc index b2756fd..ca5f512 100644 --- a/gcc/go/gofrontend/types.cc +++ b/gcc/go/gofrontend/types.cc @@ -10994,13 +10994,13 @@ Named_type::do_get_backend(Gogo* gogo) if (this->seen_in_get_backend_) { this->is_circular_ = true; - return gogo->backend()->circular_pointer_type(bt, false); + return gogo->backend()->circular_pointer_type(bt, true); } this->seen_in_get_backend_ = true; bt1 = Type::get_named_base_btype(gogo, base); this->seen_in_get_backend_ = false; if (this->is_circular_) - bt1 = gogo->backend()->circular_pointer_type(bt, false); + bt1 = gogo->backend()->circular_pointer_type(bt, true); if (!gogo->backend()->set_placeholder_pointer_type(bt, bt1)) bt = gogo->backend()->error_type(); return bt; |