<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - Incorrect size of std::array"
href="https://bugs.llvm.org/show_bug.cgi?id=36436">36436</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Incorrect size of std::array
</td>
</tr>
<tr>
<th>Product</th>
<td>lldb
</td>
</tr>
<tr>
<th>Version</th>
<td>6.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</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>lldb-dev@lists.llvm.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>dantipov@nvidia.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=19899" name="attach_19899" title="Sample program">attachment 19899</a> <a href="attachment.cgi?id=19899&action=edit" title="Sample program">[details]</a></span>
Sample program
$ /home/dantipov/.local/llvm-6.0.0/bin/lldb t-array
(lldb) target create "t-array"
Current executable set to 't-array' (x86_64).
(lldb) b t-array.cc:10
Breakpoint 1: where = t-array`main + 92 at t-array.cc:10, address =
0x0000000000400573
(lldb) r
Process 16720 launched: '/home/dantipov/tmp/t-array' (x86_64)
Process 16720 stopped
* thread #1, name = 't-array', stop reason = breakpoint 1.1
frame #0: 0x0000000000400573 t-array`main(argc=1, argv=0x00007fffffffe318)
at t-array.cc:10
7 std::array<float, 3> y { 1.1111, 2.2222, 3.3333 };
8 (void) x;
9 (void) y;
-> 10 return 0;
11 }
(lldb) fr v -a
(std::array<int, 8>) x = { ;; Why 8?
_M_elems = ([0] = 1, [1] = 2, [2] = 3, [3] = 4, [4] = 5, [5] = 6)
}
(std::array<float, 8>) y = { ;;
Likewise
_M_elems = ([0] = 1.11109996, [1] = 2.22219992, [2] = 3.33330011)
}</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>