gcc/libgo
Ian Lance Taylor f432d1282d re PR go/72814 (reflect FAILs on 32-bit Solaris/SPARC: SIGILL)
PR go/72814

    runtime: treat zero-sized result value as void
    
    Change the FFI interface to treat a call to a function that returns a
    zero-sized result as a call to a function that returns void.
    
    This is part of the fix for https://gcc.gnu.org/PR72814.  On 32-bit
    SPARC systems, a call to a function that returns a non-zero-sized struct
    is followed by an unimp instruction that describes the size of the
    struct.  The function returns to the address after the unimp
    instruction.  The libffi library can not represent a zero-sized struct,
    so we wind up treating it as a 1-byte struct.  Thus in that case libffi
    calls the function with an unimp instruction, but the function does not
    adjust the return address.  The result is that the program attempts to
    execute the unimp instruction, causing a crash.
    
    This is part of a change that fixes the crash by treating all functions
    that return zero bytes as functions that return void.
    
    Reviewed-on: https://go-review.googlesource.com/25585

	* go-gcc.cc (Gcc_backend::function_type): If the return type is
	zero bytes, treat the function as returning void.
	(return_statement): If the return type is zero bytes, don't
	actually return any values.

From-SVN: r239252
2016-08-08 19:53:44 +00:00
..
config
go internal/syscall/unix: fix syscalls for alpha, ia64, s390 2016-08-07 22:32:46 +00:00
runtime re PR go/72814 (reflect FAILs on 32-bit Solaris/SPARC: SIGILL) 2016-08-08 19:53:44 +00:00
testsuite internal/syscall/unix: fix syscalls for alpha, ia64, s390 2016-08-07 22:32:46 +00:00
aclocal.m4 libgo: don't provide ustat on arm64 GNU/Linux 2015-09-15 03:43:01 +00:00
config.h.in libgo: Use __USING_SJLJ_EXCEPTIONS__ rather than configure test. 2015-05-16 00:17:46 +00:00
configure internal/syscall/unix: fix syscalls for alpha, ia64, s390 2016-08-07 22:32:46 +00:00
configure.ac internal/syscall/unix: fix syscalls for alpha, ia64, s390 2016-08-07 22:32:46 +00:00
godeps.sh libgo: change build procedure to use build tags 2016-08-06 00:36:33 +00:00
LICENSE
Makefile.am libgo: change build procedure to use build tags 2016-08-06 00:36:33 +00:00
Makefile.in libgo: change build procedure to use build tags 2016-08-06 00:36:33 +00:00
match.sh internal/syscall/unix: fix syscalls for alpha, ia64, s390 2016-08-07 22:32:46 +00:00
MERGE libgo: update to go1.7rc3 2016-07-22 18:15:38 +00:00
merge.sh libgo: update to go1.7rc3 2016-07-22 18:15:38 +00:00
mksysinfo.sh libgo: update to go1.7rc3 2016-07-22 18:15:38 +00:00
mvifdiff.sh runtime: introduce mvifdiff.sh script to replace GCC's move-if-change 2014-12-01 01:06:29 +00:00
PATENTS
README libgo/README: Minor updates. 2015-03-13 18:53:13 +00:00
README.gcc
VERSION libgo: update to go1.7rc3 2016-07-22 18:15:38 +00:00

See ../README.

This is the runtime support library for the Go programming language.
This library is intended for use with the Go frontend.

This library should not be stripped when it is installed.  Go code
relies on being able to look up file/line information, which comes
from the debugging info using the libbacktrace library.

The library has only been tested on GNU/Linux using glibc, and on
Solaris.  It should not be difficult to port to other operating
systems.

Directories:

go
  A copy of the Go library from http://golang.org/, with several
  changes for gccgo.

runtime
  Runtime functions, written in C, which are called directly by the
  compiler or by the library.

Contributing
============

To contribute patches to the files in this directory, please see
http://golang.org/doc/gccgo_contribute.html .

The master copy of these files is hosted at
http://code.google.com/p/gofrontend .  Changes to these files require
signing a Google contributor license agreement.  If you are the
copyright holder, you will need to agree to the individual contributor
license agreement at
http://code.google.com/legal/individual-cla-v1.0.html.  This agreement
can be completed online.

If your organization is the copyright holder, the organization will
need to agree to the corporate contributor license agreement at
http://code.google.com/legal/corporate-cla-v1.0.html.

If the copyright holder for your code has already completed the
agreement in connection with another Google open source project, it
does not need to be completed again.