aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2021-11-10 18:15:12 -0800
committerIan Lance Taylor <iant@golang.org>2021-11-11 12:21:56 -0800
commit7846156274db4c58317871c7d5e049e6f2b0ca10 (patch)
treee3a5bf4f89dd612ffcb61e7277d2956cdc9ef830 /libgcc
parent083fd73202fb7387c16b6c9beab9841939a62acb (diff)
downloadgcc-7846156274db4c58317871c7d5e049e6f2b0ca10.zip
gcc-7846156274db4c58317871c7d5e049e6f2b0ca10.tar.gz
gcc-7846156274db4c58317871c7d5e049e6f2b0ca10.tar.bz2
compiler: traverse func subexprs when creating func descriptors
Fix the Create_func_descriptors pass to traverse the subexpressions of the function in a Call_expression. There are no subexpressions in the normal case of calling a function a method directly, but there are subexpressions when in code like F().M() when F returns an interface type. Forgetting to traverse the function subexpressions was almost entirely hidden by the fact that we also created the necessary thunks in Bound_method_expression::do_flatten and Interface_field_reference_expression::do_get_backend. However, when the thunks were created there, they did not go through the order_evaluations pass. This almost always worked, but failed in the case in which the function being thunked returned multiple results, as order_evaluations takes the necessary step of moving the Call_expression into its own statement, and that would not happen when order_evaluations was not called. Avoid hiding errors like this by changing those methods to only lookup the previously created thunk, rather than creating it if it was not already created. The test case for this is https://golang.org/cl/363156. Fixes https://golang.org/issue/49512 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/363274
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions