https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61877
Bug ID: 61877
Summary: [4.10 Regression]: reflect: cannot use []string as
type string in Call
Product: gcc
Version: 4.10.0
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: go
Assignee: ian at airs dot com
Reporter: lists at kambanaria dot org
CC: cmang at google dot com
Created attachment 33171
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33171&action=edit
test case that can be executed with "go test -compiler gccgo -test.v
reflect_test"
There is a regression in the runtime behavior of the reflection module.
Attached is a very simple ( < 30 lines) test case (that can be execured via go
test command). I hope this can be included in the normal test suite
Expected behavior:
go run -compiler gccgo src/ref_main.go go test -compiler gccgo -test.v
reflect_test
should result in:
=== RUN TestFindingVarargMethod
--- PASS: TestFindingVarargMethod (0.00 seconds)
PASS
ok
Actual behavior:
=== RUN TestFindingVarargMethod
--- FAIL: TestFindingVarargMethod (0.00 seconds)
panic: reflect: cannot use []string as type string in Call [recovered]
panic: reflect: cannot use []string as type string in Call
goroutine 20 [running]:
testing.$nested5
../.././libgo/go/testing/testing.go:406
reflect.call.N13_reflect.Value
../.././libgo/go/reflect/value.go:494
reflect.Call.N13_reflect.Value
../.././libgo/go/reflect/value.go:412
reflect.call.pN20_reflect.makeFuncImpl
../.././libgo/go/reflect/makefunc.go:198
reflect.MakeFuncStubGo
../.././libgo/go/reflect/makefuncgo_amd64.go:322
reflect_test_test.TestFindingVarargMethod
/home/ashopov/WORK/GO/src/reflect_test/finder_test.go:19
testing.tRunner
../.././libgo/go/testing/testing.go:422
created by testing.RunTests
../.././libgo/go/testing/testing.go:504
goroutine 16 [chan receive]:
testing.RunTests
../.././libgo/go/testing/testing.go:505
testing.Main
../.././libgo/go/testing/testing.go:435
main.main
/tmp/go-build886615920/reflect_test/_test/_testmain.go:47
created by main
../.././libgo/runtime/go-main.c:42
goroutine 18 [finalizer wait]:
created by runtime_createfing
../.././libgo/runtime/mgc0.c:2596
exit status 2
FAIL reflect_test 0.058s
This test case is WORKING fine with:
1. golang-pkg-bin-linux-amd64-1.2.2-7 distributed with Fedora 20
which corresponds to
2. gcc 4.9:
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/ashopov/WORK/GCC/libexec/gcc/x86_64-linux-gnu/4.9.1/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../configure --prefix=/home/ashopov/WORK/GCC
--build=x86_64-linux-gnu --disable-browser-plugin --disable-libgcj
--disable-libmudflap --disable-vtable-verify --disable-libunwind-exceptions
--enable-checking=release --disable-bootstrap --enable-__cxa_atexit
--enable-gnu-unique-object --enable-languages=c,c++,go,lto
--enable-linker-build-id --enable-multilib --enable-plugin --enable-shared
--enable-threads=posix --with-linker-hash-style=gnu --with-system-zlib
--with-tune=generic --enable-multiarch
Thread model: posix
gcc version 4.9.1 20140709 (prerelease) (GCC)
This test case is FAILING with:
1. gcc 4.10
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/ashopov/WORK/GCC-TRUNK/libexec/gcc/x86_64-linux-gnu/4.10.0/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ./configure --prefix=/home/ashopov/WORK/GCC-TRUNK
--build=x86_64-linux-gnu --disable-browser-plugin --disable-libgcj
--disable-libmudflap --disable-vtable-verify --disable-libunwind-exceptions
--enable-checking=release --disable-bootstrap --enable-__cxa_atexit
--enable-gnu-unique-object --enable-languages=c,c++,go,lto
--enable-linker-build-id --enable-multilib --enable-plugin --enable-shared
--enable-threads=posix --with-linker-hash-style=gnu --with-system-zlib
--with-tune=generic --enable-multiarch
Thread model: posix
gcc version 4.10.0 20140721 (experimental) (GCC)
Machine used for tests:
uname -a
Linux ashopov-dev 3.15.6-200.fc20.x86_64 #1 SMP Fri Jul 18 02:36:27 UTC 2014
x86_64 x86_64 x86_64 GNU/Linux