Go to file
Ian Lance Taylor dadcc51c88 compiler: fix undefined symbol error with unexported method
When an interface I1 in an imported package has an unexported method,
    and is then embedded into another interface I2, in a different
    package, that has other methods, and a type T2 is converted to I2, we
    failed to ever define the required interface method table.  Naturally
    T2 must implement the unexported method, and must therefore either be
    defined in the same package as I1, or embed a type from that package.
    In this case the compiler was assuming that that package would define
    the interface method table, but of course, since I2 was not defined in
    that package, that did not happen.
    
    The fix is to only assume that the interface method table will be
    defined elsewhere in the case where T2 and I2 are defined in the same
    package.  The compiler ensures that all such interface method tables
    are created, in Gogo::build_interface_method_tables.  This requires
    knowing the package in which an interface type is defined, a simple
    tweak to the importer.
    
    Testing this revealed that the special case for stub methods created
    for the embedded unexported methods of T2 needs to be done for
    function declarations as it currently is for function definitions, so
    that the newly created interface method tables use the correct name.
    
    Testing that revealed that the code to determine the pkgpath symbol
    for such stub methods was wrong.  It assumed that one could call
    pkgpath_for_symbol on the pkgpath to get the pkgpath symbol.  Would
    that it twere so simple.  Instead, add a function to look up the
    package, which must be known, and fetch the pkgpath symbol.
    
    The test for this is https://golang.org/cl/45085.
    
    Reviewed-on: https://go-review.googlesource.com/45086

From-SVN: r249024
2017-06-08 16:40:21 +00:00
config configure.ac (*-*-linux-android*): Set target_makefile_frag. 2017-06-03 08:23:22 +00:00
contrib Doxygen: transform ENUM_BITFIELD and comments starting with '/**'. 2017-05-31 14:08:36 +00:00
fixincludes
gcc compiler: fix undefined symbol error with unexported method 2017-06-08 16:40:21 +00:00
gnattools
gotools
include
INSTALL
intl
libada re PR ada/80921 (cross compiling fails to build Ada shared libraries) 2017-06-01 10:51:15 +00:00
libatomic
libbacktrace
libcc1
libcilkrts
libcpp libcpp: add callback for comment-handling 2017-06-05 20:53:06 +00:00
libdecnumber
libffi
libgcc t-vxworks (LIBGCC2_INCLUDES): Add path to wrn/coreip to the set of -I options... 2017-06-08 14:08:56 +00:00
libgfortran re PR fortran/80975 (matmul for zero-length arrays) 2017-06-06 19:18:37 +00:00
libgo runtime: support ia64 in lfstack 2017-06-07 18:12:58 +00:00
libgomp invoke.texi: Document the -Wsizeof-pointer-div warning. 2017-06-02 04:06:59 +00:00
libhsail-rt
libiberty simple-object-xcoff.c (simple_object_xcoff_find_sections): Search symbol table for .go_export symbol and apply pfn if found. 2017-06-07 19:23:55 -04:00
libitm
libmpx
libobjc
liboffloadmic
libquadmath
libsanitizer
libssp
libstdc++-v3 PR libstdc++/81017 add noexcept to std::function move operations 2017-06-08 15:27:45 +01:00
libvtv
lto-plugin
maintainer-scripts
zlib
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ChangeLog configure.ac (*-*-linux-android*): Set target_makefile_frag. 2017-06-03 08:23:22 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure configure.ac (*-*-linux-android*): Set target_makefile_frag. 2017-06-03 08:23:22 +00:00
configure.ac configure.ac (*-*-linux-android*): Set target_makefile_frag. 2017-06-03 08:23:22 +00:00
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 MAINTAINERS: Add self to Write After Approval 2017-05-31 08:25:25 +00:00
Makefile.def
Makefile.in
Makefile.tpl
missing
mkdep
mkinstalldirs
move-if-change
README
symlink-tree
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.