]> git.ipfire.org Git - thirdparty/gcc.git/commit
compiler: resolve importing ambiguity for more complex function calls
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 28 Sep 2019 00:16:57 +0000 (00:16 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 28 Sep 2019 00:16:57 +0000 (00:16 +0000)
commitf840368602ba6e9cf46b9572bc8000a6c88a041d
tree2c71cfb349624a0f9729cc90aedcf9dd028b30d6
parent1eedf33ccdc5170c9cd8151903cd7025646a5c55
compiler: resolve importing ambiguity for more complex function calls

    Tweak the exporter for inlinable function bodies to work around a
    problem with importing of function calls whose function expressions
    are not simple function names. In the bug in question, the function
    body exporter was writing out a function call of the form

           (*(*FuncTyp)(var))(arg)

    which produced an export data representation of

           *$convert(<type 5>, var)(x)

    which is hard to parse unambiguously. Fix: change the export data
    emitter to introduce parens around the function expression for more
    complex calls.

    Testcase for this bug is in CL 197217.

    Fixes golang/go#34503.

    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/197122

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@276228 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/expressions.cc