<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 --- - std::bitset<63> test fails on 32 bit target"
href="http://llvm.org/bugs/show_bug.cgi?id=15444">15444</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>std::bitset<63> test fails on 32 bit target
</td>
</tr>
<tr>
<th>Product</th>
<td>libc++
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>All Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>hhinnant@apple.com
</td>
</tr>
<tr>
<th>Reporter</th>
<td>bruce.mitchener@gmail.com
</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>If you modify testit to pass "-O2 -arch i386" when building tests, you get some
failures that don't happen when targeting -arch x86_64:
passed 2 tests in
/Users/bruce/Development/libcxx/test/utilities/template.bitset
Assertion failed: (v[i] == (i & 1)), function test_val_ctor, file
ull_ctor.pass.cpp, line 25.
./testit: line 90: 38754 Abort trap: 6 ./$TEST_EXE
/Users/bruce/Development/libcxx/test/utilities/template.bitset/bitset.cons/ull_ctor.pass.cpp
failed at run time
Compile line was: xcrun clang++ -std=c++0x -stdlib=libc++ -arch i386 -O2
-I/Users/bruce/Development/libcxx/test/support
-I/Users/bruce/Development/libcxx/include -L/Users/bruce/Development/libcxx/lib
ull_ctor.pass.cpp
failed 1 tests in
/Users/bruce/Development/libcxx/test/utilities/template.bitset/bitset.cons
passed 3 tests in
/Users/bruce/Development/libcxx/test/utilities/template.bitset/bitset.cons
passed 1 tests in
/Users/bruce/Development/libcxx/test/utilities/template.bitset/bitset.hash
Assertion failed: (j == v.to_ullong()), function test_to_ullong, file
to_ullong.pass.cpp, line 35.
./testit: line 90: 38896 Abort trap: 6 ./$TEST_EXE
/Users/bruce/Development/libcxx/test/utilities/template.bitset/bitset.members/to_ullong.pass.cpp
failed at run time
Compile line was: xcrun clang++ -std=c++0x -stdlib=libc++ -arch i386 -O2
-I/Users/bruce/Development/libcxx/test/support
-I/Users/bruce/Development/libcxx/include -L/Users/bruce/Development/libcxx/lib
to_ullong.pass.cpp
failed 1 tests in
/Users/bruce/Development/libcxx/test/utilities/template.bitset/bitset.members
passed 25 tests in
/Users/bruce/Development/libcxx/test/utilities/template.bitset/bitset.members
passed 5 tests in
/Users/bruce/Development/libcxx/test/utilities/template.bitset/bitset.operators
While I reproduced this on Mac OS X (Mountain Lion), I initially found it when
porting the current version of libcxx to run with emscripten which targets a 32
bit processor.
The problem appears (to me) to be due to the 64 bit store for the "unsigned
long long" initial value being truncated to a 32 bit value (by inspecting the
LLVM IR). This seems to happen during the SROA pass, but it wasn't clear to me
if perhaps this was due to __first_ having an invalid type, since it is an
array of size_type so a 64 bit value shouldn't be stored into it.</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>