This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug go/63172] New: gccgo testcase cplx2.go execution provides incorrect answers on trunk for powerpc64, powerpc64le
- From: "boger at us dot ibm.com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 04 Sep 2014 15:38:38 +0000
- Subject: [Bug go/63172] New: gccgo testcase cplx2.go execution provides incorrect answers on trunk for powerpc64, powerpc64le
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63172
Bug ID: 63172
Summary: gccgo testcase cplx2.go execution provides incorrect
answers on trunk for powerpc64, powerpc64le
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: go
Assignee: ian at airs dot com
Reporter: boger at us dot ibm.com
CC: bergner at vnet dot ibm.com, cmang at google dot com
Built gccgo from trunk.
Testcase cplx2.go in the go testsuite fails with incorrect answers.
>From the go.log when running 'make check-gcc-go'
opcode x (+7.218935e-001-5.325444e-001i) (+7.218935e-001-5.325444e-001i)
panic: fail
goroutine 16 [running]:
main.main
/home/boger/gccgo.work/orig/trunk-src/gcc/testsuite/go.test/test/ken/cplx2.go:102
created by main
/home/boger/gccgo.work/orig/trunk-src/libgo/runtime/go-main.c:42
FAIL: go.test/test/ken/cplx2.go execution, -O2 -g
Looking at an objdump of the executable, the compiler has determined at compile
time that the values are not correct, omits the code to do the conversion and
compare and generates the printlns and panic directly.
r64 := real(complex128(ce))
if r64 != real(Ce) {
println("real(complex128(ce))", r64, real(Ce))
10001318: 30 00 9f e8 ld r4,48(r31)
1000131c: 28 00 7f e8 ld r3,40(r31)
10001320: 41 fc ff 4b bl 10000f60
<0000005f.plt_call.__go_print_string>
10001324: 18 00 41 e8 ld r2,24(r1)
10001328: 09 fc ff 4b bl 10000f30
<0000005f.plt_call.__go_print_space>
1000132c: 18 00 41 e8 ld r2,24(r1)
10001330: 90 f8 20 fc fmr f1,f31
10001334: 5d fc ff 4b bl 10000f90
<0000005f.plt_call.__go_print_double>
10001338: 18 00 41 e8 ld r2,24(r1)
1000133c: f5 fb ff 4b bl 10000f30
<0000005f.plt_call.__go_print_space>
10001340: 18 00 41 e8 ld r2,24(r1)
10001344: 90 e8 20 fc fmr f1,f29
10001348: 49 fc ff 4b bl 10000f90
<0000005f.plt_call.__go_print_double>
1000134c: 18 00 41 e8 ld r2,24(r1)
10001350: d1 fb ff 4b bl 10000f20
<0000005f.plt_call.__go_print_nl>
10001354: 18 00 41 e8 ld r2,24(r1)
/home/boger/gccgo.work/orig/trunk-src/gcc/testsuite/go.test/test/ken/cplx2.go:120
panic("fail")
10001358: 10 00 60 38 li r3,16
1000135c: f5 fb ff 4b bl 10000f50 <0000005f.plt_call.__go_new>
10001360: 18 00 41 e8 ld r2,24(r1)
10001364: 04 00 20 39 li r9,4
10001368: 78 1b 64 7c mr r4,r3
1000136c: 00 00 e3 fb std r31,0(r3)
10001370: 08 00 23 f9 std r9,8(r3)
10001374: ff ff 62 3c addis r3,r2,-1
10001378: 98 7c 63 38 addi r3,r3,31896
1000137c: c5 fb ff 4b bl 10000f40 <0000005f.plt_call.__go_panic>
10001380: 18 00 41 e8 ld r2,24(r1)