aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2022-05-11 19:23:01 -0700
committerIan Lance Taylor <iant@golang.org>2022-05-13 15:21:12 -0700
commitdd7813f05df50d2ad8e0dc34503f2dff0b521d89 (patch)
tree737f1de3db3655c45a6997804f567e91fd57ba8b /libgcc
parentd75d4293dcc029a7b00f902d9b03416c9439af4d (diff)
downloadgcc-dd7813f05df50d2ad8e0dc34503f2dff0b521d89.zip
gcc-dd7813f05df50d2ad8e0dc34503f2dff0b521d89.tar.gz
gcc-dd7813f05df50d2ad8e0dc34503f2dff0b521d89.tar.bz2
compiler: always sort interface parse methods
The exporter relies on sorting interface parse methods. It would sort them as it encountered interface types. However, when an interface type is an element of a struct or array type, the exporter might encounter that interface type before sorting the parse methods. If it then encountered an identical interface type again, it could get confused about whether the two types are identical or not. Fix the problem by always sorting the parse methods in the finalize_methods pass. Also firm up the export type sorting to make sure we never have this kind of confusion again. Doing this revealed that we need to be more careful about sorting in order to handle aliases correctly. Also fix the interface type hash computation to use the right hash value when looking at parse methods rather than all methods. The test case for this is https://go.dev/cl/405759. Fixes golang/go#52841 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/405556
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions