Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 180834 - dev-libs/gmp-4.2.1-r1 - TEST "t_import" fails with "-funroll-loops"/"-O3"
Summary: dev-libs/gmp-4.2.1-r1 - TEST "t_import" fails with "-funroll-loops"/"-O3"
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-04 10:49 UTC by Steffen Bergner
Modified: 2007-06-04 10:50 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steffen Bergner 2007-06-04 10:49:04 UTC
Problem:
--------
 - Test of gmp fails for t_import, because of bad loop-optimizations from gcc

---
PASS: t-io_raw
PASS: t-import
wrong result data
    at data[0]  align=0
    src "0"
    src=0x0
    order=1  size=1 endian=1 nail=0
    want count 0
    got count  0
    want
    got
/bin/sh: line 4: 31526 Aborted                 ${dir}$tst
FAIL: t-export
PASS: t-pprime_p
==================================
1 of 56 tests failed
Please report to gmp-bugs@swox.com
==================================
make[4]: *** [check-TESTS] Error 1
make[4]: Leaving directory `/var/tmp/portage/dev-libs/gmp-4.2.1-r1/work/gmp-4.2.1/tests/mpz'
make[3]: *** [check-am] Error 2
make[3]: Leaving directory `/var/tmp/portage/dev-libs/gmp-4.2.1-r1/work/gmp-4.2.1/tests/mpz'
make[2]: *** [check-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/dev-libs/gmp-4.2.1-r1/work/gmp-4.2.1/tests'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/dev-libs/gmp-4.2.1-r1/work/gmp-4.2.1'
make: *** [check] Error 2

!!! ERROR: dev-libs/gmp-4.2.1-r1 failed.
Call stack:
  ebuild.sh, line 1621:   Called dyn_test
  ebuild.sh, line 1033:   Called qa_call 'src_test'
  ebuild.sh, line 44:   Called src_test
  ebuild.sh, line 655:   Called die

!!! Make check failed. See above for details.
---

Steps to reproduce:
-------------------
 - use "-funroll-loops" or "-O3"  in your CFLAGS->make.conf
 - FEATURES="test" emerge gmp
Comment 1 Steffen Bergner 2007-06-04 10:50:48 UTC
Fix:
----

Use the Warning of gcc for unsafe loop optimizations in CFLAGS->make.conf, one of my CFLAGS looks like: "-floop-optimize2 -fomit-frame-pointer -funroll-loops -march=pentium3 -msse -O3 -pipe -Wunsafe-loop-optimizations"

from "man gcc":
---
-funsafe-loop-optimizations
 If given, the loop optimizer will assume that loop indices do not overflow, and that the loops with nontrivial exit condition are not infinite.  This enables a wider range of loop optimizations even if the loop optimizer itself cannot prove that these assumptions are valid.  Using -Wunsafe-loop-optimizations, the compiler will warn you if it finds this kind of loop."
---