<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 - clang segfault with tuple get and overloaded =="
href="https://bugs.llvm.org/show_bug.cgi?id=46033">46033</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang segfault with tuple get and overloaded ==
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>9.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>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>mexx@sunrise.ch
</td>
</tr>
<tr>
<th>CC</th>
<td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=23518" name="attach_23518" title="source code (original an preprocessed), and clang output">attachment 23518</a> <a href="attachment.cgi?id=23518&action=edit" title="source code (original an preprocessed), and clang output">[details]</a></span>
source code (original an preprocessed), and clang output
compiling the attached crashtest.cc file crashes clang with a segmentation
fault. The offending part seems to be the comparison between the two results of
"get<0>" in main:
std::cout << (std::get<0>(t1) == std::get<0>(t2)) << std::endl;
changing this line to the following compiles without error:
std::cout << (std::get<0>(t1).get() == std::get<0>(t2).get()) << std::endl;
so I'm guessing it has to do with the lookup of the overloaded operator== for
the maybe<> template.
Reproduced with clang 6.0 and clang 9.0 (debian packages on Linux Mint xfvm)</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>