[LLVMbugs] [Bug 15581] New: ARM: GMP 5.1.1 'make check' fails with optimization levels >= -O0

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Mar 24 23:50:18 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=15581

            Bug ID: 15581
           Summary: ARM: GMP 5.1.1 'make check' fails with optimization
                    levels >= -O0
           Product: clang
           Version: trunk
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: antipov at dev.rtsoft.ru
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 10234
  --> http://llvm.org/bugs/attachment.cgi?id=10234&action=edit
Change default target CPU to Cortex-A9

On OMAP4430 (Pandaboard) and Clang version 3.3 (trunk 177849), GMP 5.1.1 'make
check' doesn't work with any optimization level higher than -O0. To reproduce:

1) Configure GMP 5.1.1 with:

CC=arm-linux-gnueabihf-clang CXX=arm-linux-gnueabihf-clang++ CFLAGS='-O1'
CXXFLAGS='-O1' ./configure --disable-shared -disable-assembly

2) Run:

make && make check

Results are:

...
make[4]: Entering directory `/root/gmp-5.1.1/build-O1/tests'
in free: redzone clobbered before block
/bin/bash: line 5:  9534 Aborted                 ${dir}$tst
FAIL: t-bswap
PASS: t-constants
in free: redzone clobbered before block
/bin/bash: line 5:  9542 Aborted                 ${dir}$tst
FAIL: t-count_zeros
PASS: t-gmpmax
PASS: t-hightomask
in free: redzone clobbered before block
/bin/bash: line 5:  9553 Aborted                 ${dir}$tst
FAIL: t-modlinv
in free: redzone clobbered before block
/bin/bash: line 5:  9558 Aborted                 ${dir}$tst
FAIL: t-popc
in free: redzone clobbered before block
/bin/bash: line 5:  9563 Aborted                 ${dir}$tst
FAIL: t-parity
in free: redzone clobbered before block
/bin/bash: line 5:  9568 Aborted                 ${dir}$tst
FAIL: t-sub
======================================================================================
6 of 9 tests failed
Please report to gmp-bugs at gmplib.org, see
http://gmplib.org/manual/Reporting-Bugs.html
======================================================================================

When using CFLAGS='-O0' and CXXFLAGS='-O0', all tests are OK.

Most probably the buggy code comes from tests/memory.c.

On X86, everything looks fine with all optimization options up to -O3.

LLVM was configured with:

./configure --enable-targets=arm --enable-optimized --host=arm-linux-gnueabihf
--build=x86_64-pc-linux-gnu --target=arm-linux-gnueabihf --enable-bindings=none
--enable-keep-symbols

and the default target CPU was changed to "cortex-a9" (patch is attached).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130325/2fa86d33/attachment.html>


More information about the llvm-bugs mailing list