Go to file
Ian Lance Taylor 7846156274 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
2021-11-11 12:21:56 -08:00
c++tools
config
contrib Daily bump. 2021-11-09 00:16:21 +00:00
fixincludes
gcc compiler: traverse func subexprs when creating func descriptors 2021-11-11 12:21:56 -08:00
gnattools
gotools
include Daily bump. 2021-11-06 00:16:24 +00:00
INSTALL
intl
libada
libatomic
libbacktrace
libcc1
libcody
libcpp
libdecnumber
libffi Daily bump. 2021-11-05 00:16:36 +00:00
libgcc libgcc: Fix backtrace fallback on PowerPC Big-endian 2021-11-11 15:29:25 +00:00
libgfortran
libgo
libgomp Fortran/openmp: Add support for 2 argument num_teams clause 2021-11-11 17:27:00 +01:00
libiberty
libitm
libobjc
liboffloadmic
libphobos
libquadmath
libsanitizer libsanitizer: update LOCAL_PATCHES. 2021-11-05 18:21:42 +01:00
libssp
libstdc++-v3 libstdc++: Make pmr::memory_resource::allocate implicitly create objects 2021-11-11 18:16:17 +00:00
libvtv
lto-plugin
maintainer-scripts
zlib
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ar-lib
ChangeLog
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure
configure.ac
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.RUNTIME
depcomp
install-sh
libtool-ldflags
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS
Makefile.def
Makefile.in
Makefile.tpl
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
symlink-tree
test-driver
ylwrap

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.