]> git.ipfire.org Git - thirdparty/gcc.git/commit
compiler: traverse expressions when exporting constants
authorJulia Lapenko <julia.lapenko@gmail.com>
Mon, 16 May 2022 07:37:49 +0000 (10:37 +0300)
committerIan Lance Taylor <iant@golang.org>
Thu, 19 May 2022 02:34:49 +0000 (19:34 -0700)
commitb8944f0438a183a0245ffe17aeaeaf3a1a00069c
tree479a7909cff1ed8753c874357248b16696809172
parent1cda629f96b4e982bb87343a35a6db39445d3962
compiler: traverse expressions when exporting constants

When exporting a constant A that is expressed through a constant
B from another package, it is necessary to traverse an expression
representing the constant A to generate a sequence of type casts
from the constant B. Current implementation doesn't collect types
of constants contained in such expressions. This change fetches
these types.

Fixes golang/go#51291

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/405976
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/export.cc