https://bugs.llvm.org/show_bug.cgi?id=47268

            Bug ID: 47268
           Summary: Assertion failed: (!D->isInvalidDecl() && "Cannot get
                    layout of invalid decl!"), function
                    getASTRecordLayout, file
                    /usr/src/contrib/llvm-project/clang/lib/AST/RecordLayo
                    utBuilder.cpp, line 3049.
           Product: clang
           Version: 11.0
          Hardware: Other
                OS: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]

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 https://bugs.freebsd.org/submit/ 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)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to