Bug 79443 - libgo/math test fails on s390x (undefined symbols cosh, sinh, tanh, hasVX)
Summary: libgo/math test fails on s390x (undefined symbols cosh, sinh, tanh, hasVX)
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: go (show other bugs)
Version: 7.0
: P3 normal
Target Milestone: ---
Assignee: Ian Lance Taylor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-09 16:00 UTC by Dominik Vogt
Modified: 2017-02-13 17:38 UTC (History)
1 user (show)

See Also:
Host: s390x
Target: s390x
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Possible patch (248 bytes, patch)
2017-02-09 16:20 UTC, Ian Lance Taylor
Details | Diff
crypto patch (227 bytes, patch)
2017-02-09 17:52 UTC, Ian Lance Taylor
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dominik Vogt 2017-02-09 16:00:28 UTC
Currently (r245298) there are some libgo/math test failures on s390x:

--
 var CoshNoVec = cosh
                 ^
export_s390x_test.go:12:17: error: reference to undefined name 'sinh'
 var SinhNoVec = sinh
                 ^
export_s390x_test.go:13:17: error: reference to undefined name 'tanh'
 var TanhNoVec = tanh
                 ^
export_s390x_test.go:14:13: error: reference to undefined name 'hasVX'
 var HasVX = hasVX
             ^
--
Comment 1 Ian Lance Taylor 2017-02-09 16:20:51 UTC
Created attachment 40707 [details]
Possible patch

Can you check whether this patch fixes the problem?  Thanks.
Comment 2 Dominik Vogt 2017-02-09 17:23:23 UTC
Yes, that fixes it.  Now there's another one in crypto/sha256.  Do you want me to open another bug report for that?

--
fallback_test.go:19:5: error: reference to undefined name 'useAsm'
  if useAsm == false {
     ^
fallback_test.go:22:2: error: reference to undefined name 'useAsm'
  useAsm = false
  ^
fallback_test.go:23:17: error: reference to undefined name 'useAsm'
  defer func() { useAsm = true }()
                 ^
FAIL: crypto/sha256
--
Comment 3 Ian Lance Taylor 2017-02-09 17:52:44 UTC
Created attachment 40708 [details]
crypto patch

This patch may fix the crypto/sha256 problem.

Any other problems?  `make check-target-libgo` should show all of them.

No need to open separate bugs for each one.
Comment 4 Dominik Vogt 2017-02-09 20:02:10 UTC
No more than that, and the fix works.

(Except for the issue with cplx2.go that has been there from the start
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60181).
Comment 5 ian@gcc.gnu.org 2017-02-13 17:37:34 UTC
Author: ian
Date: Mon Feb 13 17:37:02 2017
New Revision: 245397

URL: https://gcc.gnu.org/viewcvs?rev=245397&root=gcc&view=rev
Log:
	PR go/79443
    libgo: fix some s390x tests
    
    Add `+build ignore` to ignore tests that rely on s390x assembly code
    not yet implemented for gccgo.
    
    Fixes GCC PR 79443.
    
    Reviewed-on: https://go-review.googlesource.com/36909

Modified:
    trunk/gcc/go/gofrontend/MERGE
    trunk/libgo/go/crypto/sha256/fallback_test.go
    trunk/libgo/go/math/export_s390x_test.go
Comment 6 Ian Lance Taylor 2017-02-13 17:38:16 UTC
Fix committed to mainline.