<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - ARM: GMP 5.1.1 'make check' fails with optimization levels >= -O0"
href="http://llvm.org/bugs/show_bug.cgi?id=15581">15581</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>ARM: GMP 5.1.1 'make check' fails with optimization levels >= -O0
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>LLVM Codegen
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>antipov@dev.rtsoft.ru
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=10234" name="attach_10234" title="Change default target CPU to Cortex-A9">attachment 10234</a> <a href="attachment.cgi?id=10234&action=edit" title="Change default target CPU to Cortex-A9">[details]</a></span>
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 <a href="mailto:gmp-bugs@gmplib.org">gmp-bugs@gmplib.org</a>, see
<a href="http://gmplib.org/manual/Reporting-Bugs.html">http://gmplib.org/manual/Reporting-Bugs.html</a>
======================================================================================
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).</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>