<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 - Assertion failed: (!D->isInvalidDecl() && "Cannot get layout of invalid decl!"), function getASTRecordLayout, file /usr/src/contrib/llvm-project/clang/lib/AST/RecordLayoutBuilder.cpp, line 3049."
href="https://bugs.llvm.org/show_bug.cgi?id=47268">47268</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Assertion failed: (!D->isInvalidDecl() && "Cannot get layout of invalid decl!"), function getASTRecordLayout, file /usr/src/contrib/llvm-project/clang/lib/AST/RecordLayoutBuilder.cpp, line 3049.
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>11.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>FreeBSD
</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>pkubaj@anongoth.pl
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>FreeBSD head, LLVM 11 rc1, powerpc64 elfv2
Reduced test case:
struct { a() { (int *)this } b
Compile with:
/usr/bin/c++ -cc1 -triple powerpc64-unknown-freebsd13.0 -Wcast-align test.cpp
Result:
Assertion failed: (!D->isInvalidDecl() && "Cannot get layout of invalid
decl!"), function getASTRecordLayout, file
/usr/src/contrib/llvm-project/clang/lib/AST/RecordLayoutBuilder.cpp, line 3049.
PLEASE submit a bug report to <a href="https://bugs.freebsd.org/submit/">https://bugs.freebsd.org/submit/</a> and include the
crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /usr/bin/c++ -cc1 -triple
powerpc64-unknown-freebsd13.0 -Wcast-align test.cpp
1. drcbex86-285265.cpp:1:47: current parser token '}'
2. drcbex86-285265.cpp:1:1: parsing struct/union/class body '(anonymous)'
3. drcbex86-285265.cpp:1:23: parsing function body '(anonymous struct)::a'
4. drcbex86-285265.cpp:1:23: in compound statement ('{}')
Segmentation fault (core dumped)</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>